]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/AndroidManifest.xml
ac3c4a3224f761847e90816da473571a7ecf0fc1
[PrivacyBrowserAndroid.git] / app / src / main / AndroidManifest.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2015-2021 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
7
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.
12
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.
17
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/>. -->
20
21 <!-- Install location auto allows users to move Privacy Browser to an SD card if desired. -->
22 <manifest
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" >
27
28     <!-- Required to load websites. -->
29     <uses-permission android:name="android.permission.INTERNET" />
30
31     <!-- Required to create home screen shortcuts. -->
32     <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
33
34
35     <!-- Support Chromebooks that don't have a touch screen. -->
36     <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
37
38     <!-- List the apps that Privacy Browser needs to query to see if they are installed. -->
39     <queries>
40         <!-- I2P. -->
41         <package android:name="net.i2p.android.router" />
42
43         <!-- Orbot. -->
44         <package android:name="org.torproject.android" />
45
46         <!-- For some reason, OpenKeychain is visible without having to be listed in the quaries. -->
47     </queries>
48
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     <application
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:networkSecurityConfig="@xml/network_security_config"
58         tools:ignore="UnusedAttribute" >
59
60         <!-- 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> -->
61         <meta-data
62             android:name="android.webkit.WebView.MetricsOptOut"
63             android:value="true" />
64
65         <!-- Explicitly disable "Safe Browsing". -->
66         <meta-data
67             android:name="android.webkit.WebView.EnableSafeBrowsing"
68             android:value="false" />
69
70         <!-- Specify the Application ID used by the ads in the free flavor. -->
71         <meta-data
72             android:name="com.google.android.gms.ads.APPLICATION_ID"
73             android:value="@string/google_app_id" />
74
75         <!-- Don't initialize the ad system in the free flavor until it is explicitly called. -->
76         <meta-data
77             android:name="com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT"
78             android:value="true"/>
79
80         <!-- The file provider is required to encrypt files with OpenKeychain. -->
81         <provider
82             android:name="androidx.core.content.FileProvider"
83             android:authorities="@string/file_provider"
84             android:exported="false"
85             android:grantUriPermissions="true" >
86
87             <meta-data
88                 android:name="android.support.FILE_PROVIDER_PATHS"
89                 android:resource="@xml/file_provider_paths" />
90         </provider>
91         
92         <!-- The label uses the short name so that it isn't truncated under the icon in the launcher on most phones.
93             The theme has to be defined here or an ugly title bar is displayed when the app launches.
94             `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
95             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
96             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
97             `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
98             It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
99             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
100             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
101         <activity
102             android:name=".activities.MainWebViewActivity"
103             android:label="@string/short_name"
104             android:theme="@style/PrivacyBrowser"
105             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
106             android:launchMode="singleTask"
107             android:screenOrientation="fullUser"
108             android:persistableMode="persistNever"
109             tools:ignore="UnusedAttribute" >
110
111             <intent-filter>
112                 <action android:name="android.intent.action.MAIN" />
113                 <category android:name="android.intent.category.LAUNCHER" />
114             </intent-filter>
115
116             <!-- Process web intents. -->
117             <intent-filter>
118                 <action android:name="android.intent.action.VIEW" />
119
120                 <category android:name="android.intent.category.BROWSABLE" />
121                 <category android:name="android.intent.category.DEFAULT" />
122
123                 <data android:scheme="http" />
124                 <data android:scheme="https" />
125             </intent-filter>
126
127             <!-- Process content intents for text files. -->
128             <intent-filter>
129                 <action android:name="android.intent.action.VIEW" />
130
131                 <category android:name="android.intent.category.BROWSABLE" />
132                 <category android:name="android.intent.category.DEFAULT" />
133
134                 <data android:scheme="content" />
135                 <data android:mimeType="text/*" />
136             </intent-filter>
137
138             <!-- Process intents for text strings.  Sometimes URLs are presented this way. -->
139             <intent-filter>
140                 <action android:name="android.intent.action.SEND" />
141
142                 <category android:name="android.intent.category.DEFAULT" />
143
144                 <data android:mimeType="text/plain" />
145             </intent-filter>
146
147             <!-- Process web search intents. -->
148             <intent-filter>
149                 <action android:name="android.intent.action.WEB_SEARCH" />
150
151                 <category android:name="android.intent.category.BROWSABLE" />
152                 <category android:name="android.intent.category.DEFAULT" />
153             </intent-filter>
154         </activity>
155
156
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. -->
162         <activity
163             android:name=".activities.BookmarksActivity"
164             android:label="@string/bookmarks"
165             android:parentActivityName=".activities.MainWebViewActivity"
166             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
167             android:screenOrientation="fullUser"
168             android:persistableMode="persistNever"
169             tools:ignore="UnusedAttribute" />
170
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. -->
176         <activity
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"
183             tools:ignore="UnusedAttribute" />
184
185         <!-- `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.
189             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
190         <activity
191             android:name=".activities.RequestsActivity"
192             android:label="@string/requests"
193             android:parentActivityName=".activities.MainWebViewActivity"
194             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
195             android:screenOrientation="fullUser"
196             android:persistableMode="persistNever"
197             tools:ignore="UnusedAttribute" />
198
199         <!-- `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
200             `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
201             `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
202             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
203             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
204         <activity
205             android:name=".activities.DomainsActivity"
206             android:label="@string/domains"
207             android:parentActivityName=".activities.MainWebViewActivity"
208             android:configChanges="screenLayout|keyboard|keyboardHidden"
209             android:screenOrientation="fullUser"
210             android:windowSoftInputMode="stateAlwaysHidden"
211             android:persistableMode="persistNever"
212             tools:ignore="UnusedAttribute" />
213
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. -->
219         <activity
220             android:name=".activities.SettingsActivity"
221             android:label="@string/settings"
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" />
227
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. -->
233         <activity
234             android:name=".activities.ImportExportActivity"
235             android:label="@string/import_export"
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" />
241
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. -->
247         <activity
248             android:name=".activities.LogcatActivity"
249             android:label="@string/logcat"
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" />
255
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. -->
261         <activity
262             android:name=".activities.GuideActivity"
263             android:label="@string/guide"
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" />
269
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. -->
275         <activity
276             android:name=".activities.AboutActivity"
277             android:label="@string/about_privacy_browser"
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" />
283
284         <!-- `android:configChanges="orientation|screenSize"` makes the activity not restart when the orientation changes, which preserves scroll location in the WebView.
285             `android:configChanges="screenLayout"` makes the activity not restart when entering or exiting split screen mode.
286             `android:configChanges="keyboard|keyboardHidden"` makes the activity not restart when a bluetooth keyboard is activated/goes to sleep.
287             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
288             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
289         <activity
290             android:name=".activities.ViewSourceActivity"
291             android:label="@string/view_source"
292             android:parentActivityName=".activities.MainWebViewActivity"
293             android:configChanges="orientation|screenSize|screenLayout|keyboard|keyboardHidden"
294             android:screenOrientation="fullUser"
295             android:persistableMode="persistNever"
296             tools:ignore="UnusedAttribute" />
297     </application>
298 </manifest>