]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/AndroidManifest.xml
Fix crash when adding domain settings with null domain. https://redmine.stoutner...
[PrivacyBrowserAndroid.git] / app / src / main / AndroidManifest.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2015-2022 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
7
8   Privacy Browser is free software: you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation, either version 3 of the License, or
11   (at your option) any later version.
12
13   Privacy Browser is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18   You should have received a copy of the GNU General Public License
19   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
20
21 <!-- Install location `auto` allows users to move Privacy Browser to an SD card if desired. -->
22 <manifest
23     xmlns:android="http://schemas.android.com/apk/res/android"
24     xmlns:tools="http://schemas.android.com/tools"
25     android:installLocation="auto" >
26
27     <!-- Required to load websites. -->
28     <uses-permission android:name="android.permission.INTERNET" />
29
30     <!-- Required to create home screen shortcuts. -->
31     <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
32
33
34     <!-- Support Chromebooks that don't have a touch screen. -->
35     <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
36
37     <!-- List the apps that Privacy Browser needs to query to see if they are installed. -->
38     <queries>
39         <!-- I2P. -->
40         <package android:name="net.i2p.android.router" />
41
42         <!-- Orbot. -->
43         <package android:name="org.torproject.android" />
44
45         <!-- OpenKeyChain. -->
46         <package android:name="org.sufficientlysecure.keychain" />
47     </queries>
48
49     <!-- For API >= 23, app data is automatically backed up to Google cloud servers unless `android:allowBackup="false"` and `android:fullBackupContent="false"` is set.
50         `tools:ignore="DataExtractionRules` removes the warning that backups can still transfer data device to device. -->
51     <application
52         android:label="@string/privacy_browser"
53         android:icon="@mipmap/privacy_browser"
54         android:roundIcon="@mipmap/privacy_browser_round"
55         android:allowBackup="false"
56         android:fullBackupContent="false"
57         android:supportsRtl="true"
58         android:theme="@style/PrivacyBrowser"
59         android:networkSecurityConfig="@xml/network_security_config"
60         android:enableOnBackInvokedCallback="true"
61         tools:ignore="DataExtractionRules,UnusedAttribute" >
62
63         <!-- If `android:name="android.webkit.WebView.MetricsOptOut"` is not `true` then `WebViews` will upload metrics to Google.  <https://developer.android.com/reference/android/webkit/WebView.html> -->
64         <meta-data
65             android:name="android.webkit.WebView.MetricsOptOut"
66             android:value="true" />
67
68         <!-- Explicitly disable "Safe Browsing". -->
69         <meta-data
70             android:name="android.webkit.WebView.EnableSafeBrowsing"
71             android:value="false" />
72
73         <!-- Specify the Application ID used by the ads in the free flavor. -->
74         <meta-data
75             android:name="com.google.android.gms.ads.APPLICATION_ID"
76             android:value="@string/google_app_id" />
77
78         <!-- The file provider is required to encrypt files with OpenKeychain. -->
79         <provider
80             android:name="androidx.core.content.FileProvider"
81             android:authorities="@string/file_provider"
82             android:exported="false"
83             android:grantUriPermissions="true" >
84
85             <meta-data
86                 android:name="android.support.FILE_PROVIDER_PATHS"
87                 android:resource="@xml/file_provider_paths" />
88         </provider>
89         
90         <!-- MainWebViewActivity.  The label uses the short name so that it isn't truncated under the icon in the launcher on most phones.
91             The theme has to be defined here or an ugly title bar is displayed when the app launches.
92             `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
93             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
94             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
95             `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
96             It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
97             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
98             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
99         <activity
100             android:name=".activities.MainWebViewActivity"
101             android:label="@string/short_name"
102             android:theme="@style/PrivacyBrowser"
103             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
104             android:launchMode="singleTask"
105             android:screenOrientation="fullUser"
106             android:persistableMode="persistNever"
107             android:exported="true"
108             tools:ignore="UnusedAttribute" >
109
110             <intent-filter>
111                 <action android:name="android.intent.action.MAIN" />
112                 <category android:name="android.intent.category.LAUNCHER" />
113             </intent-filter>
114
115             <!-- Process web intents. -->
116             <intent-filter>
117                 <action android:name="android.intent.action.VIEW" />
118
119                 <category android:name="android.intent.category.BROWSABLE" />
120                 <category android:name="android.intent.category.DEFAULT" />
121
122                 <data android:scheme="http" />
123                 <data android:scheme="https" />
124             </intent-filter>
125
126             <!-- Process all content intents. -->
127             <intent-filter>
128                 <action android:name="android.intent.action.VIEW" />
129
130                 <category android:name="android.intent.category.BROWSABLE" />
131                 <category android:name="android.intent.category.DEFAULT" />
132
133                 <data android:scheme="content" />
134
135                 <!-- Process text and images. -->
136                 <data android:mimeType="text/*" />
137                 <data android:mimeType="image/*" />
138
139                 <!-- Process MHT web archives. -->
140                 <data android:mimeType="multipart/related" />
141                 <data android:mimeType="message/rfc822" />
142             </intent-filter>
143
144             <!-- Process intents for text strings.  Sometimes URLs are presented this way. -->
145             <intent-filter>
146                 <action android:name="android.intent.action.SEND" />
147
148                 <category android:name="android.intent.category.DEFAULT" />
149
150                 <data android:mimeType="text/plain" />
151             </intent-filter>
152
153             <!-- Process web search intents. -->
154             <intent-filter>
155                 <action android:name="android.intent.action.WEB_SEARCH" />
156
157                 <category android:name="android.intent.category.BROWSABLE" />
158                 <category android:name="android.intent.category.DEFAULT" />
159             </intent-filter>
160         </activity>
161
162
163         <!-- BookmarksActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
164             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
165             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
166             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
167             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
168         <activity
169             android:name=".activities.BookmarksActivity"
170             android:label="@string/bookmarks"
171             android:parentActivityName=".activities.MainWebViewActivity"
172             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
173             android:screenOrientation="fullUser"
174             android:persistableMode="persistNever"
175             tools:ignore="UnusedAttribute" />
176
177         <!-- BookmarksDatabaseViewActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
178             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
179             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
180             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
181             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
182         <activity
183             android:name=".activities.BookmarksDatabaseViewActivity"
184             android:label="@string/bookmarks_database_view"
185             android:parentActivityName=".activities.BookmarksActivity"
186             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
187             android:screenOrientation="fullUser"
188             android:persistableMode="persistNever"
189             tools:ignore="UnusedAttribute" />
190
191         <!-- RequestsActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
192             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
193             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
194             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
195             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
196         <activity
197             android:name=".activities.RequestsActivity"
198             android:label="@string/requests"
199             android:parentActivityName=".activities.MainWebViewActivity"
200             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
201             android:screenOrientation="fullUser"
202             android:persistableMode="persistNever"
203             tools:ignore="UnusedAttribute" />
204
205         <!-- DomainsActivity.  `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
206             `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
207             `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
208             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
209             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
210         <activity
211             android:name=".activities.DomainsActivity"
212             android:label="@string/domains"
213             android:parentActivityName=".activities.MainWebViewActivity"
214             android:configChanges="screenLayout|keyboard|keyboardHidden"
215             android:screenOrientation="fullUser"
216             android:windowSoftInputMode="stateAlwaysHidden"
217             android:persistableMode="persistNever"
218             tools:ignore="UnusedAttribute" />
219
220         <!-- SettingsActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
221             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
222             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
223             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
224             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
225         <activity
226             android:name=".activities.SettingsActivity"
227             android:label="@string/settings"
228             android:parentActivityName=".activities.MainWebViewActivity"
229             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
230             android:screenOrientation="fullUser"
231             android:persistableMode="persistNever"
232             android:theme="@style/PrivacyBrowserSettings"
233             tools:ignore="UnusedAttribute" />
234
235         <!-- ImportExportActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
236             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
237             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
238             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
239             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
240         <activity
241             android:name=".activities.ImportExportActivity"
242             android:label="@string/import_export"
243             android:parentActivityName=".activities.MainWebViewActivity"
244             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
245             android:screenOrientation="fullUser"
246             android:persistableMode="persistNever"
247             tools:ignore="UnusedAttribute" />
248
249         <!-- LogcatActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
250             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
251             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
252             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
253             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
254         <activity
255             android:name=".activities.LogcatActivity"
256             android:label="@string/logcat"
257             android:parentActivityName=".activities.MainWebViewActivity"
258             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
259             android:screenOrientation="fullUser"
260             android:persistableMode="persistNever"
261             tools:ignore="UnusedAttribute" />
262
263         <!-- GuideActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
264             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
265             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
266             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
267             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
268         <activity
269             android:name=".activities.GuideActivity"
270             android:label="@string/guide"
271             android:parentActivityName=".activities.MainWebViewActivity"
272             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
273             android:screenOrientation="fullUser"
274             android:persistableMode="persistNever"
275             tools:ignore="UnusedAttribute" />
276
277         <!-- AboutActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
278             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
279             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
280             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
281             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
282         <activity
283             android:name=".activities.AboutActivity"
284             android:label="@string/about_privacy_browser"
285             android:parentActivityName=".activities.MainWebViewActivity"
286             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
287             android:screenOrientation="fullUser"
288             android:persistableMode="persistNever"
289             tools:ignore="UnusedAttribute" />
290
291         <!-- ViewSourceActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
292             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
293             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
294             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
295             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
296         <activity
297             android:name=".activities.ViewSourceActivity"
298             android:label="@string/view_source"
299             android:parentActivityName=".activities.MainWebViewActivity"
300             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
301             android:screenOrientation="fullUser"
302             android:persistableMode="persistNever"
303             tools:ignore="UnusedAttribute" />
304     </application>
305 </manifest>