]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/AndroidManifest.xml
b4998dd31d0b036e84e6bb5096aeb68cec582653
[PrivacyBrowserAndroid.git] / app / src / main / AndroidManifest.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2015-2020 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     <!-- Required to import settings from external storage. -->
35     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
36
37     <!-- Required to export settings and save files to public storage. -->
38     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
39
40
41     <!-- Support Chromebooks that don't have a touch screen. -->
42     <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
43
44
45     <!-- For API >= 23, app data is automatically backed up to Google cloud servers unless `android:allowBackup="false"` and `android:fullBackupContent="false"` is set.
46         `android:requestLegacyExternalStorage="true"` makes Android 10 storage permissions work like previous versions of Android.  It is a temporary workaround.  <https://redmine.stoutner.com/issues/546> -->
47     <application
48         android:label="@string/privacy_browser"
49         android:icon="@mipmap/privacy_browser"
50         android:roundIcon="@mipmap/privacy_browser_round"
51         android:allowBackup="false"
52         android:fullBackupContent="false"
53         android:supportsRtl="true"
54         android:networkSecurityConfig="@xml/network_security_config"
55         android:requestLegacyExternalStorage="true"
56         tools:ignore="UnusedAttribute" >
57
58         <!-- 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> -->
59         <meta-data
60             android:name="android.webkit.WebView.MetricsOptOut"
61             android:value="true" />
62
63         <!-- Explicitly disable "Safe Browsing". -->
64         <meta-data
65             android:name="android.webkit.WebView.EnableSafeBrowsing"
66             android:value="false" />
67
68         <!-- Specify the Application ID used by the ads in the free flavor. -->
69         <meta-data
70             android:name="com.google.android.gms.ads.APPLICATION_ID"
71             android:value="@string/google_app_id" />
72
73         <!-- Don't initialize the ad system in the free flavor until it is explicitly called. -->
74         <meta-data
75             android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT"
76             android:value="true"/>
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         <!-- 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             tools:ignore="UnusedAttribute" >
108
109             <intent-filter>
110                 <action android:name="android.intent.action.MAIN" />
111                 <category android:name="android.intent.category.LAUNCHER" />
112             </intent-filter>
113
114             <!-- Process web intents. -->
115             <intent-filter>
116                 <action android:name="android.intent.action.VIEW" />
117
118                 <category android:name="android.intent.category.BROWSABLE" />
119                 <category android:name="android.intent.category.DEFAULT" />
120
121                 <data android:scheme="http" />
122                 <data android:scheme="https" />
123             </intent-filter>
124
125             <!-- Process content intents for text files. -->
126             <intent-filter>
127                 <action android:name="android.intent.action.VIEW" />
128
129                 <category android:name="android.intent.category.BROWSABLE" />
130                 <category android:name="android.intent.category.DEFAULT" />
131
132                 <data android:scheme="content" />
133                 <data android:mimeType="text/*" />
134             </intent-filter>
135
136             <!-- Process intents for MHT archives. -->
137             <intent-filter>
138                 <action android:name="android.intent.action.VIEW" />
139
140                 <category android:name="android.intent.category.BROWSABLE" />
141                 <category android:name="android.intent.category.DEFAULT" />
142
143                 <data android:scheme="file" />
144                 <data android:scheme="content" />
145
146                 <data android:host="*" />
147
148                 <!-- This pattern matches any file that starts with a `/`, has at least one character, followed by any number of other characters, terminating with `.mht`. -->
149                 <data android:pathPattern="/.*\.mht" />
150                 <data android:mimeType="*/*" />
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         <!-- `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         <!-- `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         <!-- `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         <!-- `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         <!-- `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             tools:ignore="UnusedAttribute" />
233
234         <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
235             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
236             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
237             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
238             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
239         <activity
240             android:name=".activities.ImportExportActivity"
241             android:label="@string/import_export"
242             android:parentActivityName=".activities.MainWebViewActivity"
243             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
244             android:screenOrientation="fullUser"
245             android:persistableMode="persistNever"
246             tools:ignore="UnusedAttribute" />
247
248         <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
249             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
250             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
251             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
252             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
253         <activity
254             android:name=".activities.LogcatActivity"
255             android:label="@string/logcat"
256             android:parentActivityName=".activities.MainWebViewActivity"
257             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
258             android:screenOrientation="fullUser"
259             android:persistableMode="persistNever"
260             tools:ignore="UnusedAttribute" />
261
262         <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
263             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
264             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
265             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
266             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
267         <activity
268             android:name=".activities.GuideActivity"
269             android:label="@string/guide"
270             android:parentActivityName=".activities.MainWebViewActivity"
271             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
272             android:screenOrientation="fullUser"
273             android:persistableMode="persistNever"
274             tools:ignore="UnusedAttribute" />
275
276         <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
277             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
278             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
279             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
280             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
281         <activity
282             android:name=".activities.AboutActivity"
283             android:label="@string/about_privacy_browser"
284             android:parentActivityName=".activities.MainWebViewActivity"
285             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
286             android:screenOrientation="fullUser"
287             android:persistableMode="persistNever"
288             tools:ignore="UnusedAttribute" />
289
290         <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
291             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
292             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
293             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
294             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
295         <activity
296             android:name=".activities.ViewSourceActivity"
297             android:label="@string/view_source"
298             android:parentActivityName=".activities.MainWebViewActivity"
299             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
300             android:screenOrientation="fullUser"
301             android:persistableMode="persistNever"
302             tools:ignore="UnusedAttribute" />
303     </application>
304 </manifest>