GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Bug 40109: Reduce requested permissions

Exclude LOCATION and NETWORK_STATE
parent 082939b7
Pipeline #2961 failed with stages
......@@ -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" />
......
......@@ -50,7 +50,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
......@@ -119,6 +119,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
}
}
......
......@@ -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)
}
......
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment