1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2015-2021 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 package="com.stoutner.privacybrowser"
26 android:installLocation="auto" >
28 <!-- Required to load websites. -->
29 <uses-permission android:name="android.permission.INTERNET" />
31 <!-- Required to create home screen shortcuts. -->
32 <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
35 <!-- Support Chromebooks that don't have a touch screen. -->
36 <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
38 <!-- List the apps that Privacy Browser needs to query to see if they are installed. -->
41 <package android:name="net.i2p.android.router" />
44 <package android:name="org.torproject.android" />
46 <!-- OpenKeyChain. -->
47 <package android:name="org.sufficientlysecure.keychain" />
50 <!-- For API >= 23, app data is automatically backed up to Google cloud servers unless `android:allowBackup="false"` and `android:fullBackupContent="false"` is set. -->
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" >
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> -->
63 android:name="android.webkit.WebView.MetricsOptOut"
64 android:value="true" />
66 <!-- Explicitly disable "Safe Browsing". -->
68 android:name="android.webkit.WebView.EnableSafeBrowsing"
69 android:value="false" />
71 <!-- Specify the Application ID used by the ads in the free flavor. -->
73 android:name="com.google.android.gms.ads.APPLICATION_ID"
74 android:value="@string/google_app_id" />
76 <!-- Don't initialize the ad system in the free flavor until it is explicitly called. -->
78 android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT"
79 android:value="true"/>
81 <!-- The file provider is required to encrypt files with OpenKeychain. -->
83 android:name="androidx.core.content.FileProvider"
84 android:authorities="@string/file_provider"
85 android:exported="false"
86 android:grantUriPermissions="true" >
89 android:name="android.support.FILE_PROVIDER_PATHS"
90 android:resource="@xml/file_provider_paths" />
93 <!-- 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. -->
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 tools:ignore="UnusedAttribute" >
113 <action android:name="android.intent.action.MAIN" />
114 <category android:name="android.intent.category.LAUNCHER" />
117 <!-- Process web intents. -->
119 <action android:name="android.intent.action.VIEW" />
121 <category android:name="android.intent.category.BROWSABLE" />
122 <category android:name="android.intent.category.DEFAULT" />
124 <data android:scheme="http" />
125 <data android:scheme="https" />
128 <!-- Process all content intents, including text, images, and MHT archives. -->
130 <action android:name="android.intent.action.VIEW" />
132 <category android:name="android.intent.category.BROWSABLE" />
133 <category android:name="android.intent.category.DEFAULT" />
135 <data android:scheme="content" />
136 <data android:mimeType="*/*" />
139 <!-- Process intents for text strings. Sometimes URLs are presented this way. -->
141 <action android:name="android.intent.action.SEND" />
143 <category android:name="android.intent.category.DEFAULT" />
145 <data android:mimeType="text/plain" />
148 <!-- Process web search intents. -->
150 <action android:name="android.intent.action.WEB_SEARCH" />
152 <category android:name="android.intent.category.BROWSABLE" />
153 <category android:name="android.intent.category.DEFAULT" />
158 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
159 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
160 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
161 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
162 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
164 android:name=".activities.BookmarksActivity"
165 android:label="@string/bookmarks"
166 android:parentActivityName=".activities.MainWebViewActivity"
167 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
168 android:screenOrientation="fullUser"
169 android:persistableMode="persistNever"
170 tools:ignore="UnusedAttribute" />
172 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
173 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
174 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
175 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
176 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
178 android:name=".activities.BookmarksDatabaseViewActivity"
179 android:label="@string/bookmarks_database_view"
180 android:parentActivityName=".activities.BookmarksActivity"
181 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
182 android:screenOrientation="fullUser"
183 android:persistableMode="persistNever"
184 tools:ignore="UnusedAttribute" />
186 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
187 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
188 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
189 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
190 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
192 android:name=".activities.RequestsActivity"
193 android:label="@string/requests"
194 android:parentActivityName=".activities.MainWebViewActivity"
195 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
196 android:screenOrientation="fullUser"
197 android:persistableMode="persistNever"
198 tools:ignore="UnusedAttribute" />
200 <!-- `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
201 `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
202 `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
203 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
204 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
206 android:name=".activities.DomainsActivity"
207 android:label="@string/domains"
208 android:parentActivityName=".activities.MainWebViewActivity"
209 android:configChanges="screenLayout|keyboard|keyboardHidden"
210 android:screenOrientation="fullUser"
211 android:windowSoftInputMode="stateAlwaysHidden"
212 android:persistableMode="persistNever"
213 tools:ignore="UnusedAttribute" />
215 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
216 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
217 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
218 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
219 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
221 android:name=".activities.SettingsActivity"
222 android:label="@string/settings"
223 android:parentActivityName=".activities.MainWebViewActivity"
224 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
225 android:screenOrientation="fullUser"
226 android:persistableMode="persistNever"
227 tools:ignore="UnusedAttribute" />
229 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
230 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
231 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
232 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
233 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
235 android:name=".activities.ImportExportActivity"
236 android:label="@string/import_export"
237 android:parentActivityName=".activities.MainWebViewActivity"
238 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
239 android:screenOrientation="fullUser"
240 android:persistableMode="persistNever"
241 tools:ignore="UnusedAttribute" />
243 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
244 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
245 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
246 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
247 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
249 android:name=".activities.LogcatActivity"
250 android:label="@string/logcat"
251 android:parentActivityName=".activities.MainWebViewActivity"
252 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
253 android:screenOrientation="fullUser"
254 android:persistableMode="persistNever"
255 tools:ignore="UnusedAttribute" />
257 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
258 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
259 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
260 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
261 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
263 android:name=".activities.GuideActivity"
264 android:label="@string/guide"
265 android:parentActivityName=".activities.MainWebViewActivity"
266 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
267 android:screenOrientation="fullUser"
268 android:persistableMode="persistNever"
269 tools:ignore="UnusedAttribute" />
271 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
272 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
273 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
274 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
275 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
277 android:name=".activities.AboutActivity"
278 android:label="@string/about_privacy_browser"
279 android:parentActivityName=".activities.MainWebViewActivity"
280 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
281 android:screenOrientation="fullUser"
282 android:persistableMode="persistNever"
283 tools:ignore="UnusedAttribute" />
285 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
286 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
287 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
288 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
289 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
291 android:name=".activities.ViewSourceActivity"
292 android:label="@string/view_source"
293 android:parentActivityName=".activities.MainWebViewActivity"
294 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
295 android:screenOrientation="fullUser"
296 android:persistableMode="persistNever"
297 tools:ignore="UnusedAttribute" />