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" /> <!-- Google Play flavor. -->
40 <package android:name="net.i2p.android.router" /> <!-- F-Droid flavor. -->
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 android:enableOnBackInvokedCallback="true"
61 android:localeConfig="@xml/locales_config"
62 tools:ignore="DataExtractionRules,UnusedAttribute" >
64 <!-- 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> -->
66 android:name="android.webkit.WebView.MetricsOptOut"
67 android:value="true" />
69 <!-- Explicitly disable "Safe Browsing". -->
71 android:name="android.webkit.WebView.EnableSafeBrowsing"
72 android:value="false" />
74 <!-- The file provider is required to encrypt files with OpenKeychain. -->
76 android:name="androidx.core.content.FileProvider"
77 android:authorities="@string/file_provider"
78 android:exported="false"
79 android:grantUriPermissions="true" >
82 android:name="android.support.FILE_PROVIDER_PATHS"
83 android:resource="@xml/file_provider_paths" />
86 <!-- MainWebViewActivity. The label uses the short name so that it isn't truncated under the icon in the launcher on most phones.
87 The theme has to be defined here or an ugly title bar is displayed when the app launches.
88 `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
89 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
90 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
91 `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
92 It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
93 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
95 android:name=".activities.MainWebViewActivity"
96 android:label="@string/short_name"
97 android:theme="@style/PrivacyBrowser"
98 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
99 android:launchMode="singleTask"
100 android:screenOrientation="fullUser"
101 android:persistableMode="persistNever"
102 android:exported="true" >
105 <action android:name="android.intent.action.MAIN" />
106 <category android:name="android.intent.category.LAUNCHER" />
109 <!-- Process web intents. -->
111 <action android:name="android.intent.action.VIEW" />
113 <category android:name="android.intent.category.BROWSABLE" />
114 <category android:name="android.intent.category.DEFAULT" />
116 <data android:scheme="http" />
117 <data android:scheme="https" />
120 <!-- Process all content intents. -->
122 <action android:name="android.intent.action.VIEW" />
124 <category android:name="android.intent.category.BROWSABLE" />
125 <category android:name="android.intent.category.DEFAULT" />
127 <data android:scheme="content" />
129 <!-- Process text and images. -->
130 <data android:mimeType="text/*" />
131 <data android:mimeType="image/*" />
133 <!-- Process MHT web archives. -->
134 <data android:mimeType="multipart/related" />
135 <data android:mimeType="message/rfc822" />
138 <!-- Process intents for text strings. Sometimes URLs are presented this way. -->
140 <action android:name="android.intent.action.SEND" />
142 <category android:name="android.intent.category.DEFAULT" />
144 <data android:mimeType="text/plain" />
147 <!-- Process web search intents. -->
149 <action android:name="android.intent.action.WEB_SEARCH" />
151 <category android:name="android.intent.category.BROWSABLE" />
152 <category android:name="android.intent.category.DEFAULT" />
157 <!-- BookmarksActivity. `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. -->
162 android:name=".activities.BookmarksActivity"
163 android:label="@string/bookmarks"
164 android:parentActivityName=".activities.MainWebViewActivity"
165 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
166 android:screenOrientation="fullUser"
167 android:persistableMode="persistNever" />
169 <!-- BookmarksDatabaseViewActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
170 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
171 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
172 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
174 android:name=".activities.BookmarksDatabaseViewActivity"
175 android:label="@string/bookmarks_database_view"
176 android:parentActivityName=".activities.BookmarksActivity"
177 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
178 android:screenOrientation="fullUser"
179 android:persistableMode="persistNever" />
181 <!-- RequestsActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
182 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
183 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
184 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
186 android:name=".activities.RequestsActivity"
187 android:label="@string/requests"
188 android:parentActivityName=".activities.MainWebViewActivity"
189 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
190 android:screenOrientation="fullUser"
191 android:persistableMode="persistNever" />
193 <!-- DomainsActivity. `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
194 `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
195 `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
196 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
198 android:name=".activities.DomainsActivity"
199 android:label="@string/domains"
200 android:parentActivityName=".activities.MainWebViewActivity"
201 android:configChanges="screenLayout|keyboard|keyboardHidden"
202 android:screenOrientation="fullUser"
203 android:windowSoftInputMode="stateAlwaysHidden"
204 android:persistableMode="persistNever" />
206 <!-- SettingsActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
207 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
208 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
209 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
211 android:name=".activities.SettingsActivity"
212 android:label="@string/settings"
213 android:parentActivityName=".activities.MainWebViewActivity"
214 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
215 android:screenOrientation="fullUser"
216 android:persistableMode="persistNever" />
218 <!-- ImportExportActivity. `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. -->
223 android:name=".activities.ImportExportActivity"
224 android:label="@string/import_export"
225 android:parentActivityName=".activities.MainWebViewActivity"
226 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
227 android:screenOrientation="fullUser"
228 android:persistableMode="persistNever" />
230 <!-- LogcatActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
231 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
232 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
233 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
235 android:name=".activities.LogcatActivity"
236 android:label="@string/logcat"
237 android:parentActivityName=".activities.MainWebViewActivity"
238 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
239 android:screenOrientation="fullUser"
240 android:persistableMode="persistNever" />
242 <!-- GuideActivity. `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. -->
247 android:name=".activities.GuideActivity"
248 android:label="@string/guide"
249 android:parentActivityName=".activities.MainWebViewActivity"
250 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
251 android:screenOrientation="fullUser"
252 android:persistableMode="persistNever" />
254 <!-- AboutActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
255 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
256 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
257 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
259 android:name=".activities.AboutActivity"
260 android:label="@string/about_privacy_browser"
261 android:parentActivityName=".activities.MainWebViewActivity"
262 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
263 android:screenOrientation="fullUser"
264 android:persistableMode="persistNever" />
266 <!-- ViewSourceActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
267 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
268 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
269 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
271 android:name=".activities.ViewSourceActivity"
272 android:label="@string/view_source"
273 android:parentActivityName=".activities.MainWebViewActivity"
274 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
275 android:screenOrientation="fullUser"
276 android:persistableMode="persistNever" />