[tbb-commits] [Git][tpo/applications/fenix][tor-browser-86.0.0b1-10.5-1] 2 commits: squash! Modify UI/UX
Matthew Finkel
gitlab at torproject.org
Wed Feb 3 00:07:03 UTC 2021
Matthew Finkel pushed to branch tor-browser-86.0.0b1-10.5-1 at The Tor Project / Applications / fenix
Commits:
26e874f9 by Matthew Finkel at 2021-02-03T00:06:15+00:00
squash! Modify UI/UX
Bug 40141: Hide EME site permission
- - - - -
1acf180b by Matthew Finkel at 2021-02-03T00:06:16+00:00
Bug 40109: Reduce requested permissions
Exclude LOCATION and NETWORK_STATE
- - - - -
7 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
- app/src/main/res/layout/quicksettings_permissions.xml
- app/src/main/res/xml/site_permissions_details_exceptions_preferences.xml
- app/src/main/res/xml/site_permissions_preferences.xml
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
=====================================
@@ -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
}
}
=====================================
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 {
=====================================
app/src/main/res/layout/quicksettings_permissions.xml
=====================================
@@ -148,7 +148,7 @@
app:layout_constraintBottom_toTopOf="@id/autoplayLabel"
app:layout_constraintEnd_toStartOf="@id/mediaKeySystemAccessStatus"
app:layout_constraintStart_toStartOf="parent"
- tools:visibility="visible" />
+ tools:visibility="gone" />
<TextView
android:id="@+id/mediaKeySystemAccessStatus"
@@ -160,7 +160,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/mediaKeySystemAccessLabel"
tools:text="@string/preference_option_phone_feature_blocked"
- tools:visibility="visible" />
+ tools:visibility="gone" />
<TextView
=====================================
app/src/main/res/xml/site_permissions_details_exceptions_preferences.xml
=====================================
@@ -3,7 +3,8 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.preference.PreferenceScreen
- xmlns:android="http://schemas.android.com/apk/res/android">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto" >
<androidx.preference.Preference
android:icon="@drawable/ic_camera_enabled"
android:key="@string/pref_key_phone_feature_camera"
@@ -38,6 +39,7 @@
android:icon="@drawable/ic_link"
android:key="@string/pref_key_browser_feature_media_key_system_access"
android:title="@string/preference_phone_feature_media_key_system_access"
+ app:isPreferenceVisible="false"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
=====================================
app/src/main/res/xml/site_permissions_preferences.xml
=====================================
@@ -48,6 +48,7 @@
android:key="@string/pref_key_browser_feature_media_key_system_access"
android:title="@string/preference_phone_feature_media_key_system_access"
android:summary="@string/preference_option_phone_feature_ask_to_allow"
+ app:isPreferenceVisible="false"
app:allowDividerBelow="true"/>
<androidx.preference.Preference
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/d95db65de4e9e78f3448c0f812003322e5e27072...1acf180b6306f3941a83a1c2b3e28c3fb60d12f0
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/d95db65de4e9e78f3448c0f812003322e5e27072...1acf180b6306f3941a83a1c2b3e28c3fb60d12f0
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20210203/8a24b156/attachment-0001.htm>
More information about the tbb-commits
mailing list