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 tools:ignore="DataExtractionRules,UnusedAttribute" >
63 <!-- 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> -->
65 android:name="android.webkit.WebView.MetricsOptOut"
66 android:value="true" />
68 <!-- Explicitly disable "Safe Browsing". -->
70 android:name="android.webkit.WebView.EnableSafeBrowsing"
71 android:value="false" />
73 <!-- Specify the Application ID used by the ads in the free flavor. -->
75 android:name="com.google.android.gms.ads.APPLICATION_ID"
76 android:value="@string/google_app_id" />
78 <!-- The file provider is required to encrypt files with OpenKeychain. -->
80 android:name="androidx.core.content.FileProvider"
81 android:authorities="@string/file_provider"
82 android:exported="false"
83 android:grantUriPermissions="true" >
86 android:name="android.support.FILE_PROVIDER_PATHS"
87 android:resource="@xml/file_provider_paths" />
90 <!-- MainWebViewActivity. The label uses the short name so that it isn't truncated under the icon in the launcher on most phones.
91 The theme has to be defined here or an ugly title bar is displayed when the app launches.
92 `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
93 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
94 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
95 `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
96 It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
97 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
99 android:name=".activities.MainWebViewActivity"
100 android:label="@string/short_name"
101 android:theme="@style/PrivacyBrowser"
102 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
103 android:launchMode="singleTask"
104 android:screenOrientation="fullUser"
105 android:persistableMode="persistNever"
106 android:exported="true" >
109 <action android:name="android.intent.action.MAIN" />
110 <category android:name="android.intent.category.LAUNCHER" />
113 <!-- Process web intents. -->
115 <action android:name="android.intent.action.VIEW" />
117 <category android:name="android.intent.category.BROWSABLE" />
118 <category android:name="android.intent.category.DEFAULT" />
120 <data android:scheme="http" />
121 <data android:scheme="https" />
124 <!-- Process all content intents. -->
126 <action android:name="android.intent.action.VIEW" />
128 <category android:name="android.intent.category.BROWSABLE" />
129 <category android:name="android.intent.category.DEFAULT" />
131 <data android:scheme="content" />
133 <!-- Process text and images. -->
134 <data android:mimeType="text/*" />
135 <data android:mimeType="image/*" />
137 <!-- Process MHT web archives. -->
138 <data android:mimeType="multipart/related" />
139 <data android:mimeType="message/rfc822" />
142 <!-- Process intents for text strings. Sometimes URLs are presented this way. -->
144 <action android:name="android.intent.action.SEND" />
146 <category android:name="android.intent.category.DEFAULT" />
148 <data android:mimeType="text/plain" />
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 <!-- BookmarksActivity. `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. -->
166 android:name=".activities.BookmarksActivity"
167 android:label="@string/bookmarks"
168 android:parentActivityName=".activities.MainWebViewActivity"
169 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
170 android:screenOrientation="fullUser"
171 android:persistableMode="persistNever" />
173 <!-- BookmarksDatabaseViewActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
174 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
175 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
176 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
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" />
185 <!-- RequestsActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
186 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
187 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
188 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
190 android:name=".activities.RequestsActivity"
191 android:label="@string/requests"
192 android:parentActivityName=".activities.MainWebViewActivity"
193 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
194 android:screenOrientation="fullUser"
195 android:persistableMode="persistNever" />
197 <!-- DomainsActivity. `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
198 `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
199 `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
200 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
202 android:name=".activities.DomainsActivity"
203 android:label="@string/domains"
204 android:parentActivityName=".activities.MainWebViewActivity"
205 android:configChanges="screenLayout|keyboard|keyboardHidden"
206 android:screenOrientation="fullUser"
207 android:windowSoftInputMode="stateAlwaysHidden"
208 android:persistableMode="persistNever" />
210 <!-- SettingsActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
211 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
212 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
213 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
215 android:name=".activities.SettingsActivity"
216 android:label="@string/settings"
217 android:parentActivityName=".activities.MainWebViewActivity"
218 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
219 android:screenOrientation="fullUser"
220 android:persistableMode="persistNever" />
222 <!-- ImportExportActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
223 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
224 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
225 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
227 android:name=".activities.ImportExportActivity"
228 android:label="@string/import_export"
229 android:parentActivityName=".activities.MainWebViewActivity"
230 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
231 android:screenOrientation="fullUser"
232 android:persistableMode="persistNever" />
234 <!-- LogcatActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
235 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
236 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
237 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
239 android:name=".activities.LogcatActivity"
240 android:label="@string/logcat"
241 android:parentActivityName=".activities.MainWebViewActivity"
242 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
243 android:screenOrientation="fullUser"
244 android:persistableMode="persistNever" />
246 <!-- GuideActivity. `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. -->
251 android:name=".activities.GuideActivity"
252 android:label="@string/guide"
253 android:parentActivityName=".activities.MainWebViewActivity"
254 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
255 android:screenOrientation="fullUser"
256 android:persistableMode="persistNever" />
258 <!-- AboutActivity. `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
259 `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
260 `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
261 `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot. -->
263 android:name=".activities.AboutActivity"
264 android:label="@string/about_privacy_browser"
265 android:parentActivityName=".activities.MainWebViewActivity"
266 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
267 android:screenOrientation="fullUser"
268 android:persistableMode="persistNever" />
270 <!-- ViewSourceActivity. `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. -->
275 android:name=".activities.ViewSourceActivity"
276 android:label="@string/view_source"
277 android:parentActivityName=".activities.MainWebViewActivity"
278 android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
279 android:screenOrientation="fullUser"
280 android:persistableMode="persistNever" />