1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2015-2019 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" />
34 <!-- Required to import settings from external storage. -->
35 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
37 <!-- Required to export settings and save files to public storage. -->
38 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
41 <!-- Support Chromebooks that don't have a touch screen. -->
42 <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
45 <!-- For API >= 23, app data is automatically backed up to Google cloud servers unless `android:allowBackup="false"` and `android:fullBackupContent="false"` is set. -->
47 android:label="@string/privacy_browser"
48 android:icon="@mipmap/privacy_browser"
49 android:roundIcon="@mipmap/privacy_browser_round"
50 android:allowBackup="false"
51 android:fullBackupContent="false"
52 android:supportsRtl="true"
53 android:networkSecurityConfig="@xml/network_security_config"
54 tools:ignore="UnusedAttribute" >
56 <!-- 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> -->
58 android:name="android.webkit.WebView.MetricsOptOut"
59 android:value="true" />
61 <!-- Explicitly disable "Safe Browsing". -->
63 android:name="android.webkit.WebView.EnableSafeBrowsing"
64 android:value="false" />
66 <!-- Specify the Application ID used by the ads in the free flavor. -->
68 android:name="com.google.android.gms.ads.APPLICATION_ID"
69 android:value="@string/google_app_id" />
71 <!-- Don't initialize the ad system in the free flavor until it is explicitly called. -->
73 android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT"
74 android:value="true"/>
76 <!-- The file provider is required to encrypt files with OpenKeychain. -->
78 android:name="androidx.core.content.FileProvider"
79 android:authorities="@string/file_provider"
80 android:exported="false"
81 android:grantUriPermissions="true" >
84 android:name="android.support.FILE_PROVIDER_PATHS"
85 android:resource="@xml/file_provider_paths" />
88 <!-- The label uses the short name so that it isn't truncated under the icon in the launcher on most phones.
89 The theme has to be defined here or an ugly title bar is displayed when the app launches.
90 `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
91 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
92 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
93 `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
94 It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
95 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
96 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
98 android:name=".activities.MainWebViewActivity"
99 android:label="@string/short_name"
100 android:theme="@style/PrivacyBrowserLight"
101 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
102 android:launchMode="singleTask"
103 android:screenOrientation="fullUser"
104 android:persistableMode="persistNever"
105 tools:ignore="UnusedAttribute" >
108 <action android:name="android.intent.action.MAIN" />
109 <category android:name="android.intent.category.LAUNCHER" />
112 <!-- Process web intents. -->
114 <action android:name="android.intent.action.VIEW" />
116 <category android:name="android.intent.category.BROWSABLE" />
117 <category android:name="android.intent.category.DEFAULT" />
119 <data android:scheme="http" />
120 <data android:scheme="https" />
123 <!-- Process content intents for text files. -->
125 <action android:name="android.intent.action.VIEW" />
127 <category android:name="android.intent.category.BROWSABLE" />
128 <category android:name="android.intent.category.DEFAULT" />
130 <data android:scheme="content" />
131 <data android:mimeType="text/*" />
134 <!-- Process intents for MHT archives. -->
136 <action android:name="android.intent.action.VIEW" />
138 <category android:name="android.intent.category.BROWSABLE" />
139 <category android:name="android.intent.category.DEFAULT" />
141 <data android:scheme="file" />
142 <data android:scheme="content" />
144 <data android:host="*" />
146 <!-- This pattern matches any file that starts with a `/`, has at least one character, followed by any number of other characters, terminating with `.mht`. -->
147 <data android:pathPattern="/.*\.mht" />
148 <data android:mimeType="*/*" />
151 <!-- Process web search intents. -->
153 <action android:name="android.intent.action.WEB_SEARCH" />
155 <category android:name="android.intent.category.BROWSABLE" />
156 <category android:name="android.intent.category.DEFAULT" />
161 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
162 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
163 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
164 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
165 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
167 android:name=".activities.BookmarksActivity"
168 android:label="@string/bookmarks"
169 android:parentActivityName=".activities.MainWebViewActivity"
170 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
171 android:screenOrientation="fullUser"
172 android:persistableMode="persistNever"
173 tools:ignore="UnusedAttribute" />
175 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
176 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
177 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
178 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
179 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
181 android:name=".activities.BookmarksDatabaseViewActivity"
182 android:label="@string/bookmarks_database_view"
183 android:parentActivityName=".activities.BookmarksActivity"
184 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
185 android:screenOrientation="fullUser"
186 android:persistableMode="persistNever"
187 tools:ignore="UnusedAttribute" />
189 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
190 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
191 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
192 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
193 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
195 android:name=".activities.RequestsActivity"
196 android:label="@string/requests"
197 android:parentActivityName=".activities.MainWebViewActivity"
198 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
199 android:screenOrientation="fullUser"
200 android:persistableMode="persistNever"
201 tools:ignore="UnusedAttribute" />
203 <!-- `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
204 `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
205 `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
206 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
207 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
209 android:name=".activities.DomainsActivity"
210 android:label="@string/domains"
211 android:parentActivityName=".activities.MainWebViewActivity"
212 android:configChanges="screenLayout|keyboard|keyboardHidden"
213 android:screenOrientation="fullUser"
214 android:windowSoftInputMode="stateAlwaysHidden"
215 android:persistableMode="persistNever"
216 tools:ignore="UnusedAttribute" />
218 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
219 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
220 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
221 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
222 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
224 android:name=".activities.SettingsActivity"
225 android:label="@string/settings"
226 android:parentActivityName=".activities.MainWebViewActivity"
227 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
228 android:screenOrientation="fullUser"
229 android:persistableMode="persistNever"
230 tools:ignore="UnusedAttribute" />
232 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
233 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
234 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
235 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
236 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
238 android:name=".activities.ImportExportActivity"
239 android:label="@string/import_export"
240 android:parentActivityName=".activities.MainWebViewActivity"
241 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
242 android:screenOrientation="fullUser"
243 android:persistableMode="persistNever"
244 tools:ignore="UnusedAttribute" />
246 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
247 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
248 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
249 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
250 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
252 android:name=".activities.LogcatActivity"
253 android:label="@string/logcat"
254 android:parentActivityName=".activities.MainWebViewActivity"
255 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
256 android:screenOrientation="fullUser"
257 android:persistableMode="persistNever"
258 tools:ignore="UnusedAttribute" />
260 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
261 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
262 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
263 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
264 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
266 android:name=".activities.GuideActivity"
267 android:label="@string/guide"
268 android:parentActivityName=".activities.MainWebViewActivity"
269 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
270 android:screenOrientation="fullUser"
271 android:persistableMode="persistNever"
272 tools:ignore="UnusedAttribute" />
274 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
275 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
276 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
277 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
278 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
280 android:name=".activities.AboutActivity"
281 android:label="@string/about_privacy_browser"
282 android:parentActivityName=".activities.MainWebViewActivity"
283 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
284 android:screenOrientation="fullUser"
285 android:persistableMode="persistNever"
286 tools:ignore="UnusedAttribute" />
288 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
289 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
290 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
291 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
292 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
294 android:name=".activities.ViewSourceActivity"
295 android:label="@string/view_source"
296 android:parentActivityName=".activities.MainWebViewActivity"
297 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
298 android:screenOrientation="fullUser"
299 android:persistableMode="persistNever"
300 tools:ignore="UnusedAttribute" />