Matthew Finkel pushed to branch tor-browser-85.1.0-10.5-1 at The Tor Project / Applications / fenix
Commits: 9951b3da by Matthew Finkel at 2021-01-27T23:19:21+00:00 Bug 40109: Reduce requested permissions
Exclude LOCATION and NETWORK_STATE
- - - - - dd2dbe8e by Matthew Finkel at 2021-02-03T00:05:46+00:00 Merge branch 'bug_40109_01' into tor-browser-85.1.0-10.5-1
- - - - -
4 changed files:
- app/src/main/AndroidManifest.xml - app/src/main/java/org/mozilla/fenix/settings/PhoneFeature.kt - app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsFragment.kt - app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsManagePhoneFeatureFragment.kt
Changes:
===================================== app/src/main/AndroidManifest.xml ===================================== @@ -4,11 +4,8 @@ package="org.mozilla.fenix">
<uses-permission android:name="android.permission.INTERNET" /> - <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> - <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> - <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
===================================== app/src/main/java/org/mozilla/fenix/settings/PhoneFeature.kt ===================================== @@ -49,7 +49,7 @@ enum class PhoneFeature(val androidPermissionsList: Array<String>) : Parcelable AUTOPLAY_AUDIBLE -> when (settings?.getAutoplayUserSetting(default = AUTOPLAY_BLOCK_ALL) ?: AUTOPLAY_BLOCK_ALL) { AUTOPLAY_ALLOW_ALL -> R.string.preference_option_autoplay_allowed2 - AUTOPLAY_ALLOW_ON_WIFI -> R.string.preference_option_autoplay_allowed_wifi_only2 + // AUTOPLAY_ALLOW_ON_WIFI -> R.string.preference_option_autoplay_allowed_wifi_only2 AUTOPLAY_BLOCK_AUDIBLE -> R.string.preference_option_autoplay_block_audio2 AUTOPLAY_BLOCK_ALL -> R.string.preference_option_autoplay_blocked3 else -> R.string.preference_option_autoplay_blocked3 @@ -116,6 +116,7 @@ enum class PhoneFeature(val androidPermissionsList: Array<String>) : Parcelable return when (this) { AUTOPLAY_AUDIBLE -> SitePermissionsRules.Action.BLOCKED AUTOPLAY_INAUDIBLE -> SitePermissionsRules.Action.ALLOWED + LOCATION -> SitePermissionsRules.Action.BLOCKED else -> SitePermissionsRules.Action.ASK_TO_ALLOW } }
===================================== app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsFragment.kt ===================================== @@ -52,6 +52,7 @@ class SitePermissionsFragment : PreferenceFragmentCompat() { // Autoplay inaudible should be set in the same menu as autoplay audible, so it does // not need to be bound .filter { it != PhoneFeature.AUTOPLAY_INAUDIBLE } + .filter { it != PhoneFeature.LOCATION } .forEach(::initPhoneFeature) }
===================================== app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsManagePhoneFeatureFragment.kt ===================================== @@ -115,6 +115,7 @@ class SitePermissionsManagePhoneFeatureFragment : Fragment() { saveActionInSettings(AUTOPLAY_ALLOW_ALL) } restoreState(AUTOPLAY_ALLOW_ON_WIFI) + visibility = View.GONE } else { text = getString(R.string.preference_option_phone_feature_blocked) setOnClickListener {
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/a6c84e3e91a7c...
tbb-commits@lists.torproject.org