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 theme has to be defined here or an ugly title bar is displayed when the app launches.
89 `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
90 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
91 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
92 `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
93 It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
94 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
95 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
97 android:name=".activities.MainWebViewActivity"
98 android:label="@string/privacy_browser"
99 android:theme="@style/PrivacyBrowserLight"
100 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
101 android:launchMode="singleTask"
102 android:screenOrientation="fullUser"
103 android:persistableMode="persistNever"
104 tools:ignore="UnusedAttribute" >
107 <action android:name="android.intent.action.MAIN" />
108 <category android:name="android.intent.category.LAUNCHER" />
111 <!-- Process web intents. -->
113 <action android:name="android.intent.action.VIEW" />
115 <category android:name="android.intent.category.BROWSABLE" />
116 <category android:name="android.intent.category.DEFAULT" />
118 <data android:scheme="http" />
119 <data android:scheme="https" />
122 <!-- Process content intents for text files. -->
124 <action android:name="android.intent.action.VIEW" />
126 <category android:name="android.intent.category.BROWSABLE" />
127 <category android:name="android.intent.category.DEFAULT" />
129 <data android:scheme="content" />
130 <data android:mimeType="text/*" />
133 <!-- Process web search intents. -->
135 <action android:name="android.intent.action.WEB_SEARCH" />
137 <category android:name="android.intent.category.BROWSABLE" />
138 <category android:name="android.intent.category.DEFAULT" />
143 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
144 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
145 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
146 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
147 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
149 android:name=".activities.BookmarksActivity"
150 android:label="@string/bookmarks"
151 android:parentActivityName=".activities.MainWebViewActivity"
152 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
153 android:screenOrientation="fullUser"
154 android:persistableMode="persistNever"
155 tools:ignore="UnusedAttribute" />
157 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
158 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
159 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
160 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
161 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
163 android:name=".activities.BookmarksDatabaseViewActivity"
164 android:label="@string/bookmarks_database_view"
165 android:parentActivityName=".activities.BookmarksActivity"
166 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
167 android:screenOrientation="fullUser"
168 android:persistableMode="persistNever"
169 tools:ignore="UnusedAttribute" />
171 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
172 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
173 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
174 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
175 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
177 android:name=".activities.RequestsActivity"
178 android:label="@string/requests"
179 android:parentActivityName=".activities.MainWebViewActivity"
180 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
181 android:screenOrientation="fullUser"
182 android:persistableMode="persistNever"
183 tools:ignore="UnusedAttribute" />
185 <!-- `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
186 `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
187 `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
188 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
189 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
191 android:name=".activities.DomainsActivity"
192 android:label="@string/domains"
193 android:parentActivityName=".activities.MainWebViewActivity"
194 android:configChanges="screenLayout|keyboard|keyboardHidden"
195 android:screenOrientation="fullUser"
196 android:windowSoftInputMode="stateAlwaysHidden"
197 android:persistableMode="persistNever"
198 tools:ignore="UnusedAttribute" />
200 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
201 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
202 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
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.SettingsActivity"
207 android:label="@string/settings"
208 android:parentActivityName=".activities.MainWebViewActivity"
209 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
210 android:screenOrientation="fullUser"
211 android:persistableMode="persistNever"
212 tools:ignore="UnusedAttribute" />
214 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
215 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
216 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
217 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
218 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
220 android:name=".activities.ImportExportActivity"
221 android:label="@string/import_export"
222 android:parentActivityName=".activities.MainWebViewActivity"
223 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
224 android:screenOrientation="fullUser"
225 android:persistableMode="persistNever"
226 tools:ignore="UnusedAttribute" />
228 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
229 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
230 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
231 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
232 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
234 android:name=".activities.LogcatActivity"
235 android:label="@string/logcat"
236 android:parentActivityName=".activities.MainWebViewActivity"
237 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
238 android:screenOrientation="fullUser"
239 android:persistableMode="persistNever"
240 tools:ignore="UnusedAttribute" />
242 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
243 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
244 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
245 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
246 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
248 android:name=".activities.GuideActivity"
249 android:label="@string/guide"
250 android:parentActivityName=".activities.MainWebViewActivity"
251 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
252 android:screenOrientation="fullUser"
253 android:persistableMode="persistNever"
254 tools:ignore="UnusedAttribute" />
256 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
257 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
258 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
259 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
260 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
262 android:name=".activities.AboutActivity"
263 android:label="@string/about_privacy_browser"
264 android:parentActivityName=".activities.MainWebViewActivity"
265 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
266 android:screenOrientation="fullUser"
267 android:persistableMode="persistNever"
268 tools:ignore="UnusedAttribute" />
270 <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
271 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
272 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
273 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
274 `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
276 android:name=".activities.ViewSourceActivity"
277 android:label="@string/view_source"
278 android:parentActivityName=".activities.MainWebViewActivity"
279 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
280 android:screenOrientation="fullUser"
281 android:persistableMode="persistNever"
282 tools:ignore="UnusedAttribute" />