1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2015-2022 Soren Stoutner <soren@stoutner.com>.
6 This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
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.
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.
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/>. -->
21 <!-- Install location `auto` allows users to move Privacy Browser to an SD card if desired. -->
23 xmlns:android="http://schemas.android.com/apk/res/android"
24 xmlns:tools="http://schemas.android.com/tools"
25 android:installLocation="auto" >
27 <!-- Required to load websites. -->
28 <uses-permission android:name="android.permission.INTERNET" />
30 <!-- Required to create home screen shortcuts. -->
31 <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
34 <!-- Support Chromebooks that don't have a touch screen. -->
35 <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
37 <!-- List the apps that Privacy Browser needs to query to see if they are installed. -->
40 <package android:name="net.i2p.android.router" />
43 <package android:name="org.torproject.android" />
45 <!-- OpenKeyChain. -->
46 <package android:name="org.sufficientlysecure.keychain" />
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. -->
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 tools:ignore="DataExtractionRules,UnusedAttribute" >
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> -->
64 android:name="android.webkit.WebView.MetricsOptOut"
65 android:value="true" />
67 <!-- Explicitly disable "Safe Browsing". -->
69 android:name="android.webkit.WebView.EnableSafeBrowsing"
70 android:value="false" />
72 <!-- Specify the Application ID used by the ads in the free flavor. -->
74 android:name="com.google.android.gms.ads.APPLICATION_ID"
75 android:value="@string/google_app_id" />
77 <!-- The file provider is required to encrypt files with OpenKeychain. -->
79 android:name="androidx.core.content.FileProvider"
80 android:authorities="@string/file_provider"
81 android:exported="false"
82 android:grantUriPermissions="true" >
85 android:name="android.support.FILE_PROVIDER_PATHS"
86 android:resource="@xml/file_provider_paths" />
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. -->
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" >
110 <action android:name="android.intent.action.MAIN" />
111 <category android:name="android.intent.category.LAUNCHER" />
114 <!-- Process web intents. -->
116 <action android:name="android.intent.action.VIEW" />
118 <category android:name="android.intent.category.BROWSABLE" />
119 <category android:name="android.intent.category.DEFAULT" />
121 <data android:scheme="http" />
122 <data android:scheme="https" />
125 <!-- Process all content intents. -->
127 <action android:name="android.intent.action.VIEW" />
129 <category android:name="android.intent.category.BROWSABLE" />
130 <category android:name="android.intent.category.DEFAULT" />
132 <data android:scheme="content" />
134 <!-- Process text and images. -->
135 <data android:mimeType="text/*" />
136 <data android:mimeType="image/*" />
138 <!-- Process MHT web archives. -->
139 <data android:mimeType="multipart/related" />
140 <data android:mimeType="message/rfc822" />
143 <!-- Process intents for text strings. Sometimes URLs are presented this way. -->
145 <action android:name="android.intent.action.SEND" />
147 <category android:name="android.intent.category.DEFAULT" />
149 <data android:mimeType="text/plain" />
152 <!-- Process web search intents. -->
154 <action android:name="android.intent.action.WEB_SEARCH" />
156 <category android:name="android.intent.category.BROWSABLE" />
157 <category android:name="android.intent.category.DEFAULT" />
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. -->
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" />
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. -->
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" />
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. -->
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" />
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. -->
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" />
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. -->
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 android:theme="@style/PrivacyBrowserSettings"
232 tools:ignore="UnusedAttribute" />
234 <!-- ImportExportActivity. `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. -->
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" />
248 <!-- LogcatActivity. `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. -->
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" />
262 <!-- GuideActivity. `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. -->
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" />
276 <!-- AboutActivity. `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. -->
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" />
290 <!-- ViewSourceActivity. `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. -->
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" />