]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/AndroidManifest.xml
Fix unwanted restarts when a keyboard is connected/disconnected. https://redmine...
[PrivacyBrowserAndroid.git] / app / src / main / AndroidManifest.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2015-2019 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     <!-- Required to import settings from external storage. -->
35     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
36
37     <!-- Required to export settings and save files to public storage. -->
38     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
39
40
41     <!-- Support Chromebooks that don't have a touch screen. -->
42     <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
43
44
45     <!-- For API >= 23, app data is automatically backed up to Google cloud servers unless `android:allowBackup="false"` and `android:fullBackupContent="false"` is set. -->
46     <application
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" >
55
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> -->
57         <meta-data
58             android:name="android.webkit.WebView.MetricsOptOut"
59             android:value="true" />
60
61         <!-- Explicitly disable "Safe Browsing". -->
62         <meta-data
63             android:name="android.webkit.WebView.EnableSafeBrowsing"
64             android:value="false" />
65
66         <!-- Specify the Application ID used by the ads in the free flavor. -->
67         <meta-data
68             android:name="com.google.android.gms.ads.APPLICATION_ID"
69             android:value="@string/google_app_id" />
70
71         <!-- The file provider is required to encrypt files with OpenKeychain. -->
72         <provider
73             android:name="androidx.core.content.FileProvider"
74             android:authorities="@string/file_provider"
75             android:exported="false"
76             android:grantUriPermissions="true" >
77
78             <meta-data
79                 android:name="android.support.FILE_PROVIDER_PATHS"
80                 android:resource="@xml/file_provider_paths" />
81         </provider>
82         
83         <!-- The theme has to be defined here or an ugly title bar is displayed when the app launches.
84              `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes, which preserves scroll location in the WebView.
85              `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
86              `android:launchMode="singleTask"` makes the app launch in a new task instead of inside the task of the program that sends it an intent.
87              It also makes it reuse an existing Privacy Browser activity if available instead of launching a new one.
88              `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
89              `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
90         <activity
91             android:name=".activities.MainWebViewActivity"
92             android:label="@string/privacy_browser"
93             android:theme="@style/PrivacyBrowserLight"
94             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
95             android:launchMode="singleTask"
96             android:screenOrientation="fullUser"
97             android:persistableMode="persistNever"
98             tools:ignore="UnusedAttribute" >
99
100             <intent-filter>
101                 <action android:name="android.intent.action.MAIN" />
102                 <category android:name="android.intent.category.LAUNCHER" />
103             </intent-filter>
104
105             <!-- Process web intents. -->
106             <intent-filter>
107                 <action android:name="android.intent.action.VIEW" />
108
109                 <category android:name="android.intent.category.BROWSABLE" />
110                 <category android:name="android.intent.category.DEFAULT" />
111
112                 <data android:scheme="http" />
113                 <data android:scheme="https" />
114             </intent-filter>
115
116             <!-- Process content intents for text files. -->
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="content" />
124                 <data android:mimeType="text/*" />
125             </intent-filter>
126
127             <!-- Process web search intents. -->
128             <intent-filter>
129                 <action android:name="android.intent.action.WEB_SEARCH" />
130
131                 <category android:name="android.intent.category.BROWSABLE" />
132                 <category android:name="android.intent.category.DEFAULT" />
133             </intent-filter>
134         </activity>
135
136
137         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
138             `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
139             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
140             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
141         <activity
142             android:name=".activities.BookmarksActivity"
143             android:label="@string/bookmarks"
144             android:parentActivityName=".activities.MainWebViewActivity"
145             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
146             android:screenOrientation="fullUser"
147             android:persistableMode="persistNever"
148             tools:ignore="UnusedAttribute" />
149
150         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
151             `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
152             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
153             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
154         <activity
155             android:name=".activities.BookmarksDatabaseViewActivity"
156             android:label="@string/bookmarks_database_view"
157             android:parentActivityName=".activities.BookmarksActivity"
158             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
159             android:screenOrientation="fullUser"
160             android:persistableMode="persistNever"
161             tools:ignore="UnusedAttribute" />
162
163         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
164             `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
165             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
166             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
167         <activity
168             android:name=".activities.RequestsActivity"
169             android:label="@string/requests"
170             android:parentActivityName=".activities.MainWebViewActivity"
171             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
172             android:screenOrientation="fullUser"
173             android:persistableMode="persistNever"
174             tools:ignore="UnusedAttribute" />
175
176         <!-- `android:configChanges="keyboard|keyboardHidden"` makes the activity not reload when a bluetooth keyboard is activated/goes to sleep.
177             `android:windowSoftInputMode="stateAlwaysHidden"` keeps the keyboard from displaying when the screen is rotated and after the `AddDomainDialog` is dismissed.
178             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
179             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
180         <activity
181             android:name=".activities.DomainsActivity"
182             android:label="@string/domains"
183             android:parentActivityName=".activities.MainWebViewActivity"
184             android:configChanges="keyboard|keyboardHidden"
185             android:screenOrientation="fullUser"
186             android:windowSoftInputMode="stateAlwaysHidden"
187             android:persistableMode="persistNever"
188             tools:ignore="UnusedAttribute" />
189
190         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
191             `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
192             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
193             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
194         <activity
195             android:name=".activities.SettingsActivity"
196             android:label="@string/settings"
197             android:parentActivityName=".activities.MainWebViewActivity"
198             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
199             android:screenOrientation="fullUser"
200             android:persistableMode="persistNever"
201             tools:ignore="UnusedAttribute" />
202
203         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
204             `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
205             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
206             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
207         <activity
208             android:name=".activities.ImportExportActivity"
209             android:label="@string/import_export"
210             android:parentActivityName=".activities.MainWebViewActivity"
211             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
212             android:screenOrientation="fullUser"
213             android:persistableMode="persistNever"
214             tools:ignore="UnusedAttribute" />
215
216         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
217             `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
218             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
219             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
220         <activity
221             android:name=".activities.LogcatActivity"
222             android:label="@string/logcat"
223             android:parentActivityName=".activities.MainWebViewActivity"
224             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
225             android:screenOrientation="fullUser"
226             android:persistableMode="persistNever"
227             tools:ignore="UnusedAttribute" />
228
229         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
230             `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
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.GuideActivity"
235             android:label="@string/guide"
236             android:parentActivityName=".activities.MainWebViewActivity"
237             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
238             android:screenOrientation="fullUser"
239             android:persistableMode="persistNever"
240             tools:ignore="UnusedAttribute" />
241
242         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
243             `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
244             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
245             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
246         <activity
247             android:name=".activities.AboutActivity"
248             android:label="@string/about_privacy_browser"
249             android:parentActivityName=".activities.MainWebViewActivity"
250             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
251             android:screenOrientation="fullUser"
252             android:persistableMode="persistNever"
253             tools:ignore="UnusedAttribute" />
254
255         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
256             `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
257             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
258             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
259         <activity
260             android:name=".activities.ViewSourceActivity"
261             android:label="@string/view_source"
262             android:parentActivityName=".activities.MainWebViewActivity"
263             android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
264             android:screenOrientation="fullUser"
265             android:persistableMode="persistNever"
266             tools:ignore="UnusedAttribute" />
267     </application>
268 </manifest>