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" />
33 <!-- Support Chromebooks that don't have a touch screen. -->
34 <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
36 <!-- List the apps that Privacy Browser needs to query to see if they are installed. -->
39 <package android:name="net.i2p.android.router" />
42 <package android:name="org.torproject.android" />
44 <!-- OpenKeyChain. -->
45 <package android:name="org.sufficientlysecure.keychain" />
48 <!-- For API >= 23, app data is automatically backed up to Google cloud servers unless `android:allowBackup="false"` and `android:fullBackupContent="false"` is set.
49 `tools:ignore="DataExtractionRules` removes the warning that backups can still transfer data device to device. -->
51 android:label="@string/privacy_browser"
52 android:icon="@mipmap/privacy_browser"
53 android:roundIcon="@mipmap/privacy_browser_round"
54 android:allowBackup="false"
55 android:fullBackupContent="false"
56 android:supportsRtl="true"
57 android:theme="@style/PrivacyBrowser"
58 android:networkSecurityConfig="@xml/network_security_config"
59 android:enableOnBackInvokedCallback="true"
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. -->
98 android:name=".activities.MainWebViewActivity"
99 android:label="@string/short_name"
100 android:theme="@style/PrivacyBrowser"
101 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
102 android:launchMode="singleTask"
103 android:screenOrientation="fullUser"
104 android:persistableMode="persistNever"
105 android:exported="true" >
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 all content intents. -->
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" />
132 <!-- Process text and images. -->
133 <data android:mimeType="text/*" />
134 <data android:mimeType="image/*" />
136 <!-- Process MHT web archives. -->
137 <data android:mimeType="multipart/related" />
138 <data android:mimeType="message/rfc822" />
141 <!-- Process intents for text strings. Sometimes URLs are presented this way. -->
143 <action android:name="android.intent.action.SEND" />
145 <category android:name="android.intent.category.DEFAULT" />
147 <data android:mimeType="text/plain" />
150 <!-- Process web search intents. -->
152 <action android:name="android.intent.action.WEB_SEARCH" />
154 <category android:name="android.intent.category.BROWSABLE" />
155 <category android:name="android.intent.category.DEFAULT" />
160 <!-- BookmarksActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
161 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
162 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
163 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
165 android:name=".activities.BookmarksActivity"
166 android:label="@string/bookmarks"
167 android:parentActivityName=".activities.MainWebViewActivity"
168 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
169 android:screenOrientation="fullUser"
170 android:persistableMode="persistNever" />
172 <!-- BookmarksDatabaseViewActivity. `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. -->
177 android:name=".activities.BookmarksDatabaseViewActivity"
178 android:label="@string/bookmarks_database_view"
179 android:parentActivityName=".activities.BookmarksActivity"
180 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
181 android:screenOrientation="fullUser"
182 android:persistableMode="persistNever" />
184 <!-- RequestsActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
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 restart when a bluetooth keyboard is activated/goes to sleep.
187 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
189 android:name=".activities.RequestsActivity"
190 android:label="@string/requests"
191 android:parentActivityName=".activities.MainWebViewActivity"
192 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
193 android:screenOrientation="fullUser"
194 android:persistableMode="persistNever" />
196 <!-- DomainsActivity. `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
197 `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
198 `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
199 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
201 android:name=".activities.DomainsActivity"
202 android:label="@string/domains"
203 android:parentActivityName=".activities.MainWebViewActivity"
204 android:configChanges="screenLayout|keyboard|keyboardHidden"
205 android:screenOrientation="fullUser"
206 android:windowSoftInputMode="stateAlwaysHidden"
207 android:persistableMode="persistNever" />
209 <!-- SettingsActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
210 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
211 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
212 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
214 android:name=".activities.SettingsActivity"
215 android:label="@string/settings"
216 android:parentActivityName=".activities.MainWebViewActivity"
217 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
218 android:screenOrientation="fullUser"
219 android:persistableMode="persistNever" />
221 <!-- ImportExportActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
222 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
223 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
224 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
226 android:name=".activities.ImportExportActivity"
227 android:label="@string/import_export"
228 android:parentActivityName=".activities.MainWebViewActivity"
229 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
230 android:screenOrientation="fullUser"
231 android:persistableMode="persistNever" />
233 <!-- LogcatActivity. `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. -->
238 android:name=".activities.LogcatActivity"
239 android:label="@string/logcat"
240 android:parentActivityName=".activities.MainWebViewActivity"
241 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
242 android:screenOrientation="fullUser"
243 android:persistableMode="persistNever" />
245 <!-- GuideActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
246 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
247 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
248 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
250 android:name=".activities.GuideActivity"
251 android:label="@string/guide"
252 android:parentActivityName=".activities.MainWebViewActivity"
253 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
254 android:screenOrientation="fullUser"
255 android:persistableMode="persistNever" />
257 <!-- AboutActivity. `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. -->
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" />
269 <!-- ViewSourceActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
270 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
271 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
272 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
274 android:name=".activities.ViewSourceActivity"
275 android:label="@string/view_source"
276 android:parentActivityName=".activities.MainWebViewActivity"
277 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
278 android:screenOrientation="fullUser"
279 android:persistableMode="persistNever" />