[tbb-commits] [tor-browser/tor-browser-78.13.0esr-11.0-1] Bug 24796 - Comment out excess permissions from GeckoView

boklm at torproject.org boklm at torproject.org
Tue Aug 10 15:52:20 UTC 2021


commit f8b174b3fb96e14cb2a6a8215ea8572dbe9fbef8
Author: Matthew Finkel <Matthew.Finkel at gmail.com>
Date:   Wed Apr 11 17:52:59 2018 +0000

    Bug 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.
---
 .../android/geckoview/src/main/AndroidManifest.xml   | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/mobile/android/geckoview/src/main/AndroidManifest.xml b/mobile/android/geckoview/src/main/AndroidManifest.xml
index 87ad6dc28047..4c8ab2a9d996 100644
--- a/mobile/android/geckoview/src/main/AndroidManifest.xml
+++ b/mobile/android/geckoview/src/main/AndroidManifest.xml
@@ -6,20 +6,32 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="org.mozilla.geckoview">
 
+<!--#ifdef MOZ_ANDROID_NETWORK_STATE-->
+    <!--
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+    -->
+<!--#endif-->
     <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"/>
@@ -28,14 +40,16 @@
             android:required="false"/>
 
     <uses-feature
-            android:name="android.hardware.audio.low_latency"
+            android:name="android.hardware.camera.any"
             android:required="false"/>
     <uses-feature
-            android:name="android.hardware.microphone"
+            android:name="android.hardware.audio.low_latency"
             android:required="false"/>
     <uses-feature
-            android:name="android.hardware.camera.any"
+            android:name="android.hardware.microphone"
             android:required="false"/>
+    -->
+<!--#endif-->
 
     <!-- GeckoView requires OpenGL ES 2.0 -->
     <uses-feature





More information about the tbb-commits mailing list