Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
fenix
Commits
9951b3da
Unverified
Commit
9951b3da
authored
Nov 29, 2020
by
Matthew Finkel
Browse files
Bug 40109: Reduce requested permissions
Exclude LOCATION and NETWORK_STATE
parent
d2349239
Pipeline
#2365
failed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/AndroidManifest.xml
View file @
9951b3da
...
...
@@ -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
View file @
9951b3da
...
...
@@ -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
View file @
9951b3da
...
...
@@ -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
View file @
9951b3da
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment