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