commit 5410e24aad00a8f7fee94e95a72048a311c5c9e0
parent d7da3b8bad33b0b320896c422bf37860cb0119ec
Author: Matthew Finkel <Matthew.Finkel@gmail.com>
Date: Wed, 11 Apr 2018 17:52:59 +0000
BB 24796: Comment out excess permissions from GeckoView
The GeckoView AndroidManifest.xml is not preprocessed unlike Fennec's
manifest, so we can't use the ifdef preprocessor guards around the
permissions we do not want. Commenting the permissions is the
next-best-thing.
Diffstat:
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/mobile/android/geckoview/src/main/AndroidManifest.xml b/mobile/android/geckoview/src/main/AndroidManifest.xml
@@ -6,22 +6,34 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
+<!--#ifdef MOZ_ANDROID_NETWORK_STATE-->
+ <!--
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+ -->
+<!--#endif-->
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"
tools:ignore="HighSamplingRate" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+<!--#ifdef MOZ_ANDROID_LOCATION-->
+ <!--
<uses-feature
android:name="android.hardware.location"
android:required="false"/>
<uses-feature
android:name="android.hardware.location.gps"
android:required="false"/>
+ -->
+<!--#endif-->
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
+<!--#ifdef MOZ_WEBRTC-->
+ <!-- TODO preprocess AndroidManifest.xml so that we can
+ conditionally include WebRTC permissions based on MOZ_WEBRTC. -->
+ <!--
<uses-feature
android:name="android.hardware.camera"
android:required="false"/>
@@ -38,6 +50,8 @@
<uses-feature
android:name="android.hardware.camera.any"
android:required="false"/>
+ -->
+<!--#endif-->
<!-- GeckoView requires OpenGL ES 2.0 -->
<uses-feature
diff --git a/mobile/android/moz.configure b/mobile/android/moz.configure
@@ -235,3 +235,15 @@ def check_host_bin_prog(var, prog, toolchain=None):
check_host_bin_prog("EMBEDDED_UNIFFI_BINDGEN", "embedded-uniffi-bindgen")
check_host_bin_prog("NIMBUS_FML", "nimbus-fml")
+
+project_flag(
+ "MOZ_ANDROID_NETWORK_STATE",
+ help="Include permission for accessing WiFi/network state on Android",
+ default=False,
+)
+
+project_flag(
+ "MOZ_ANDROID_LOCATION",
+ help="Include permission for accessing fine and course-grain Location on Android",
+ default=False,
+)