]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/AndroidManifest.xml
a9747840ad8b4a7a82bf33dba365f16cb2b59ef0
[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     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         `tools:ignore="DataExtractionRules` removes the warning that backups can still transfer data device to device. -->
52     <application
53         android:label="@string/privacy_browser"
54         android:icon="@mipmap/privacy_browser"
55         android:roundIcon="@mipmap/privacy_browser_round"
56         android:allowBackup="false"
57         android:fullBackupContent="false"
58         android:supportsRtl="true"
59         android:networkSecurityConfig="@xml/network_security_config"
60         tools:ignore="DataExtractionRules,UnusedAttribute" >
61
62         <!-- 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> -->
63         <meta-data
64             android:name="android.webkit.WebView.MetricsOptOut"
65             android:value="true" />
66
67         <!-- Explicitly disable "Safe Browsing". -->
68         <meta-data
69             android:name="android.webkit.WebView.EnableSafeBrowsing"
70             android:value="false" />
71
72         <!-- Specify the Application ID used by the ads in the free flavor. -->
73         <meta-data
74             android:name="com.google.android.gms.ads.APPLICATION_ID"
75             android:value="@string/google_app_id" />
76
77         <!-- The file provider is required to encrypt files with OpenKeychain. -->
78         <provider
79             android:name="androidx.core.content.FileProvider"
80             android:authorities="@string/file_provider"
81             android:exported="false"
82             android:grantUriPermissions="true" >
83
84             <meta-data
85                 android:name="android.support.FILE_PROVIDER_PATHS"
86                 android:resource="@xml/file_provider_paths" />
87         </provider>
88         
89         <!-- MainWebViewActivity.  The label uses the short name so that it isn't truncated under the icon in the launcher on most phones.
90             The theme has to be defined here or an ugly title bar is displayed when the app launches.
91             `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
92             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
93             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
94             `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
95             It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
96             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
97             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
98         <activity
99             android:name=".activities.MainWebViewActivity"
100             android:label="@string/short_name"
101             android:theme="@style/PrivacyBrowser"
102             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
103             android:launchMode="singleTask"
104             android:screenOrientation="fullUser"
105             android:persistableMode="persistNever"
106             android:exported="true"
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 all content intents. -->
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
134                 <!-- Process text and images. -->
135                 <data android:mimeType="text/*" />
136                 <data android:mimeType="image/*" />
137
138                 <!-- Process MHT web archives. -->
139                 <data android:mimeType="multipart/related" />
140                 <data android:mimeType="message/rfc822" />
141             </intent-filter>
142
143             <!-- Process intents for text strings.  Sometimes URLs are presented this way. -->
144             <intent-filter>
145                 <action android:name="android.intent.action.SEND" />
146
147                 <category android:name="android.intent.category.DEFAULT" />
148
149                 <data android:mimeType="text/plain" />
150             </intent-filter>
151
152             <!-- Process web search intents. -->
153             <intent-filter>
154                 <action android:name="android.intent.action.WEB_SEARCH" />
155
156                 <category android:name="android.intent.category.BROWSABLE" />
157                 <category android:name="android.intent.category.DEFAULT" />
158             </intent-filter>
159         </activity>
160
161
162         <!-- BookmarksActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
163             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
164             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
165             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
166             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
167         <activity
168             android:name=".activities.BookmarksActivity"
169             android:label="@string/bookmarks"
170             android:parentActivityName=".activities.MainWebViewActivity"
171             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
172             android:screenOrientation="fullUser"
173             android:persistableMode="persistNever"
174             tools:ignore="UnusedAttribute" />
175
176         <!-- BookmarksDatabaseViewActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
177             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
178             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
179             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
180             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
181         <activity
182             android:name=".activities.BookmarksDatabaseViewActivity"
183             android:label="@string/bookmarks_database_view"
184             android:parentActivityName=".activities.BookmarksActivity"
185             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
186             android:screenOrientation="fullUser"
187             android:persistableMode="persistNever"
188             tools:ignore="UnusedAttribute" />
189
190         <!-- RequestsActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
191             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
192             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
193             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
194             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
195         <activity
196             android:name=".activities.RequestsActivity"
197             android:label="@string/requests"
198             android:parentActivityName=".activities.MainWebViewActivity"
199             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
200             android:screenOrientation="fullUser"
201             android:persistableMode="persistNever"
202             tools:ignore="UnusedAttribute" />
203
204         <!-- DomainsActivity.  `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
205             `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
206             `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
207             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
208             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
209         <activity
210             android:name=".activities.DomainsActivity"
211             android:label="@string/domains"
212             android:parentActivityName=".activities.MainWebViewActivity"
213             android:configChanges="screenLayout|keyboard|keyboardHidden"
214             android:screenOrientation="fullUser"
215             android:windowSoftInputMode="stateAlwaysHidden"
216             android:persistableMode="persistNever"
217             tools:ignore="UnusedAttribute" />
218
219         <!-- SettingsActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
220             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
221             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
222             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
223             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
224         <activity
225             android:name=".activities.SettingsActivity"
226             android:label="@string/settings"
227             android:parentActivityName=".activities.MainWebViewActivity"
228             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
229             android:screenOrientation="fullUser"
230             android:persistableMode="persistNever"
231             tools:ignore="UnusedAttribute" />
232
233         <!-- ImportExportActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
234             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
235             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
236             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
237             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
238         <activity
239             android:name=".activities.ImportExportActivity"
240             android:label="@string/import_export"
241             android:parentActivityName=".activities.MainWebViewActivity"
242             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
243             android:screenOrientation="fullUser"
244             android:persistableMode="persistNever"
245             tools:ignore="UnusedAttribute" />
246
247         <!-- LogcatActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
248             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
249             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
250             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
251             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
252         <activity
253             android:name=".activities.LogcatActivity"
254             android:label="@string/logcat"
255             android:parentActivityName=".activities.MainWebViewActivity"
256             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
257             android:screenOrientation="fullUser"
258             android:persistableMode="persistNever"
259             tools:ignore="UnusedAttribute" />
260
261         <!-- GuideActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
262             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
263             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
264             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
265             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
266         <activity
267             android:name=".activities.GuideActivity"
268             android:label="@string/guide"
269             android:parentActivityName=".activities.MainWebViewActivity"
270             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
271             android:screenOrientation="fullUser"
272             android:persistableMode="persistNever"
273             tools:ignore="UnusedAttribute" />
274
275         <!-- AboutActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
276             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
277             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
278             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
279             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
280         <activity
281             android:name=".activities.AboutActivity"
282             android:label="@string/about_privacy_browser"
283             android:parentActivityName=".activities.MainWebViewActivity"
284             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
285             android:screenOrientation="fullUser"
286             android:persistableMode="persistNever"
287             tools:ignore="UnusedAttribute" />
288
289         <!-- ViewSourceActivity.  `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
290             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
291             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
292             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
293             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
294         <activity
295             android:name=".activities.ViewSourceActivity"
296             android:label="@string/view_source"
297             android:parentActivityName=".activities.MainWebViewActivity"
298             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
299             android:screenOrientation="fullUser"
300             android:persistableMode="persistNever"
301             tools:ignore="UnusedAttribute" />
302     </application>
303 </manifest>