mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] Add support for EME permission.
This accompanies the changes in https://github.com/mozilla-mobile/android-components/pull/9121. Closes https://github.com/mozilla-mobile/fenix/issues/1175
This commit is contained in:
parent
ee96af1b9a
commit
042f7dd697
@ -26,6 +26,7 @@ fun SitePermissions.get(field: PhoneFeature) = when (field) {
|
|||||||
PhoneFeature.AUTOPLAY_AUDIBLE -> autoplayAudible
|
PhoneFeature.AUTOPLAY_AUDIBLE -> autoplayAudible
|
||||||
PhoneFeature.AUTOPLAY_INAUDIBLE -> autoplayInaudible
|
PhoneFeature.AUTOPLAY_INAUDIBLE -> autoplayInaudible
|
||||||
PhoneFeature.PERSISTENT_STORAGE -> localStorage
|
PhoneFeature.PERSISTENT_STORAGE -> localStorage
|
||||||
|
PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS -> mediaKeySystemAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
fun SitePermissions.update(field: PhoneFeature, value: SitePermissions.Status) = when (field) {
|
fun SitePermissions.update(field: PhoneFeature, value: SitePermissions.Status) = when (field) {
|
||||||
@ -36,6 +37,7 @@ fun SitePermissions.update(field: PhoneFeature, value: SitePermissions.Status) =
|
|||||||
PhoneFeature.AUTOPLAY_AUDIBLE -> copy(autoplayAudible = value)
|
PhoneFeature.AUTOPLAY_AUDIBLE -> copy(autoplayAudible = value)
|
||||||
PhoneFeature.AUTOPLAY_INAUDIBLE -> copy(autoplayInaudible = value)
|
PhoneFeature.AUTOPLAY_INAUDIBLE -> copy(autoplayInaudible = value)
|
||||||
PhoneFeature.PERSISTENT_STORAGE -> copy(localStorage = value)
|
PhoneFeature.PERSISTENT_STORAGE -> copy(localStorage = value)
|
||||||
|
PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS -> copy(mediaKeySystemAccess = value)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +31,8 @@ enum class PhoneFeature(val androidPermissionsList: Array<String>) : Parcelable
|
|||||||
NOTIFICATION(emptyArray()),
|
NOTIFICATION(emptyArray()),
|
||||||
AUTOPLAY_AUDIBLE(emptyArray()),
|
AUTOPLAY_AUDIBLE(emptyArray()),
|
||||||
AUTOPLAY_INAUDIBLE(emptyArray()),
|
AUTOPLAY_INAUDIBLE(emptyArray()),
|
||||||
PERSISTENT_STORAGE(emptyArray());
|
PERSISTENT_STORAGE(emptyArray()),
|
||||||
|
MEDIA_KEY_SYSTEM_ACCESS(emptyArray());
|
||||||
|
|
||||||
fun isAndroidPermissionGranted(context: Context): Boolean {
|
fun isAndroidPermissionGranted(context: Context): Boolean {
|
||||||
return context.isPermissionGranted(androidPermissionsList.asIterable())
|
return context.isPermissionGranted(androidPermissionsList.asIterable())
|
||||||
@ -80,6 +81,7 @@ enum class PhoneFeature(val androidPermissionsList: Array<String>) : Parcelable
|
|||||||
MICROPHONE -> context.getString(R.string.preference_phone_feature_microphone)
|
MICROPHONE -> context.getString(R.string.preference_phone_feature_microphone)
|
||||||
NOTIFICATION -> context.getString(R.string.preference_phone_feature_notification)
|
NOTIFICATION -> context.getString(R.string.preference_phone_feature_notification)
|
||||||
PERSISTENT_STORAGE -> context.getString(R.string.preference_phone_feature_persistent_storage)
|
PERSISTENT_STORAGE -> context.getString(R.string.preference_phone_feature_persistent_storage)
|
||||||
|
MEDIA_KEY_SYSTEM_ACCESS -> context.getString(R.string.preference_phone_feature_media_key_system_access)
|
||||||
AUTOPLAY_AUDIBLE, AUTOPLAY_INAUDIBLE -> context.getString(R.string.preference_browser_feature_autoplay)
|
AUTOPLAY_AUDIBLE, AUTOPLAY_INAUDIBLE -> context.getString(R.string.preference_browser_feature_autoplay)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,6 +100,7 @@ enum class PhoneFeature(val androidPermissionsList: Array<String>) : Parcelable
|
|||||||
AUTOPLAY_AUDIBLE -> R.string.pref_key_browser_feature_autoplay_audible
|
AUTOPLAY_AUDIBLE -> R.string.pref_key_browser_feature_autoplay_audible
|
||||||
AUTOPLAY_INAUDIBLE -> R.string.pref_key_browser_feature_autoplay_inaudible
|
AUTOPLAY_INAUDIBLE -> R.string.pref_key_browser_feature_autoplay_inaudible
|
||||||
PERSISTENT_STORAGE -> R.string.pref_key_browser_feature_persistent_storage
|
PERSISTENT_STORAGE -> R.string.pref_key_browser_feature_persistent_storage
|
||||||
|
MEDIA_KEY_SYSTEM_ACCESS -> R.string.pref_key_browser_feature_media_key_system_access
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +67,10 @@ class WebsitePermissionsView(
|
|||||||
PhoneFeature.PERSISTENT_STORAGE to PermissionViewHolder(
|
PhoneFeature.PERSISTENT_STORAGE to PermissionViewHolder(
|
||||||
view.persistentStorageLabel,
|
view.persistentStorageLabel,
|
||||||
view.persistentStorageStatus
|
view.persistentStorageStatus
|
||||||
|
),
|
||||||
|
PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS to PermissionViewHolder(
|
||||||
|
view.mediaKeySystemAccessLabel,
|
||||||
|
view.mediaKeySystemAccessStatus
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -26,6 +26,7 @@ import org.mozilla.fenix.settings.PhoneFeature.LOCATION
|
|||||||
import org.mozilla.fenix.settings.PhoneFeature.MICROPHONE
|
import org.mozilla.fenix.settings.PhoneFeature.MICROPHONE
|
||||||
import org.mozilla.fenix.settings.PhoneFeature.NOTIFICATION
|
import org.mozilla.fenix.settings.PhoneFeature.NOTIFICATION
|
||||||
import org.mozilla.fenix.settings.PhoneFeature.PERSISTENT_STORAGE
|
import org.mozilla.fenix.settings.PhoneFeature.PERSISTENT_STORAGE
|
||||||
|
import org.mozilla.fenix.settings.PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS
|
||||||
import org.mozilla.fenix.settings.requirePreference
|
import org.mozilla.fenix.settings.requirePreference
|
||||||
|
|
||||||
class SitePermissionsDetailsExceptionsFragment : PreferenceFragmentCompat() {
|
class SitePermissionsDetailsExceptionsFragment : PreferenceFragmentCompat() {
|
||||||
@ -59,6 +60,7 @@ class SitePermissionsDetailsExceptionsFragment : PreferenceFragmentCompat() {
|
|||||||
initPhoneFeature(MICROPHONE)
|
initPhoneFeature(MICROPHONE)
|
||||||
initPhoneFeature(NOTIFICATION)
|
initPhoneFeature(NOTIFICATION)
|
||||||
initPhoneFeature(PERSISTENT_STORAGE)
|
initPhoneFeature(PERSISTENT_STORAGE)
|
||||||
|
initPhoneFeature(MEDIA_KEY_SYSTEM_ACCESS)
|
||||||
bindClearPermissionsButton()
|
bindClearPermissionsButton()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ import org.mozilla.fenix.ext.settings
|
|||||||
import org.mozilla.fenix.ext.showToolbar
|
import org.mozilla.fenix.ext.showToolbar
|
||||||
import org.mozilla.fenix.settings.PhoneFeature.AUTOPLAY_AUDIBLE
|
import org.mozilla.fenix.settings.PhoneFeature.AUTOPLAY_AUDIBLE
|
||||||
import org.mozilla.fenix.settings.PhoneFeature.AUTOPLAY_INAUDIBLE
|
import org.mozilla.fenix.settings.PhoneFeature.AUTOPLAY_INAUDIBLE
|
||||||
|
import org.mozilla.fenix.settings.PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS
|
||||||
import org.mozilla.fenix.settings.setStartCheckedIndicator
|
import org.mozilla.fenix.settings.setStartCheckedIndicator
|
||||||
import org.mozilla.fenix.utils.Settings
|
import org.mozilla.fenix.utils.Settings
|
||||||
|
|
||||||
@ -132,6 +133,13 @@ class SitePermissionsManagePhoneFeatureFragment : Fragment() {
|
|||||||
saveActionInSettings(AUTOPLAY_BLOCK_AUDIBLE)
|
saveActionInSettings(AUTOPLAY_BLOCK_AUDIBLE)
|
||||||
}
|
}
|
||||||
restoreState(AUTOPLAY_BLOCK_AUDIBLE)
|
restoreState(AUTOPLAY_BLOCK_AUDIBLE)
|
||||||
|
} else if (args.phoneFeature == MEDIA_KEY_SYSTEM_ACCESS) {
|
||||||
|
visibility = View.VISIBLE
|
||||||
|
text = getString(R.string.preference_option_phone_feature_allowed)
|
||||||
|
setOnClickListener {
|
||||||
|
saveActionInSettings(ALLOWED)
|
||||||
|
}
|
||||||
|
restoreState(ALLOWED)
|
||||||
} else {
|
} else {
|
||||||
visibility = View.GONE
|
visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
@ -746,7 +746,8 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|||||||
camera = getSitePermissionsPhoneFeatureAction(PhoneFeature.CAMERA),
|
camera = getSitePermissionsPhoneFeatureAction(PhoneFeature.CAMERA),
|
||||||
autoplayAudible = getSitePermissionsPhoneFeatureAutoplayAction(PhoneFeature.AUTOPLAY_AUDIBLE),
|
autoplayAudible = getSitePermissionsPhoneFeatureAutoplayAction(PhoneFeature.AUTOPLAY_AUDIBLE),
|
||||||
autoplayInaudible = getSitePermissionsPhoneFeatureAutoplayAction(PhoneFeature.AUTOPLAY_INAUDIBLE),
|
autoplayInaudible = getSitePermissionsPhoneFeatureAutoplayAction(PhoneFeature.AUTOPLAY_INAUDIBLE),
|
||||||
persistentStorage = getSitePermissionsPhoneFeatureAction(PhoneFeature.PERSISTENT_STORAGE)
|
persistentStorage = getSitePermissionsPhoneFeatureAction(PhoneFeature.PERSISTENT_STORAGE),
|
||||||
|
mediaKeySystemAccess = getSitePermissionsPhoneFeatureAction(PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -757,7 +758,9 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|||||||
PhoneFeature.LOCATION,
|
PhoneFeature.LOCATION,
|
||||||
PhoneFeature.CAMERA,
|
PhoneFeature.CAMERA,
|
||||||
PhoneFeature.AUTOPLAY_AUDIBLE,
|
PhoneFeature.AUTOPLAY_AUDIBLE,
|
||||||
PhoneFeature.AUTOPLAY_INAUDIBLE
|
PhoneFeature.AUTOPLAY_INAUDIBLE,
|
||||||
|
PhoneFeature.PERSISTENT_STORAGE,
|
||||||
|
PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS
|
||||||
).map { it.getPreferenceKey(appContext) }
|
).map { it.getPreferenceKey(appContext) }
|
||||||
|
|
||||||
preferences.registerOnSharedPreferenceChangeListener(lifecycleOwner) { _, key ->
|
preferences.registerOnSharedPreferenceChangeListener(lifecycleOwner) { _, key ->
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
app:drawableStartCompat="@drawable/ic_storage"
|
app:drawableStartCompat="@drawable/ic_storage"
|
||||||
android:text="@string/preference_phone_feature_persistent_storage"
|
android:text="@string/preference_phone_feature_persistent_storage"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toTopOf="@id/mediaKeySystemAccessLabel"
|
||||||
app:layout_constraintEnd_toStartOf="@id/persistentStorageStatus"
|
app:layout_constraintEnd_toStartOf="@id/persistentStorageStatus"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
@ -131,10 +131,35 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/quicksettings_item_height"
|
android:layout_height="@dimen/quicksettings_item_height"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toTopOf="@id/mediaKeySystemAccessStatus"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/persistentStorageLabel"
|
app:layout_constraintStart_toEndOf="@id/persistentStorageLabel"
|
||||||
tools:text="@string/preference_option_phone_feature_blocked"
|
tools:text="@string/preference_option_phone_feature_blocked"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/mediaKeySystemAccessLabel"
|
||||||
|
style="@style/QuickSettingsText.Icon"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/quicksettings_item_height"
|
||||||
|
app:drawableStartCompat="@drawable/ic_link"
|
||||||
|
android:text="@string/preference_phone_feature_media_key_system_access"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/mediaKeySystemAccessStatus"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/mediaKeySystemAccessStatus"
|
||||||
|
style="@style/QuickSettingsText.PermissionItemEnd"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/quicksettings_item_height"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/mediaKeySystemAccessLabel"
|
||||||
|
tools:text="@string/preference_option_phone_feature_blocked"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -111,6 +111,7 @@
|
|||||||
<string name="pref_key_browser_feature_autoplay_audible" translatable="false">pref_key_browser_feature_autoplay</string>
|
<string name="pref_key_browser_feature_autoplay_audible" translatable="false">pref_key_browser_feature_autoplay</string>
|
||||||
<string name="pref_key_browser_feature_autoplay_inaudible" translatable="false">pref_key_browser_feature_autoplay_inaudible</string>
|
<string name="pref_key_browser_feature_autoplay_inaudible" translatable="false">pref_key_browser_feature_autoplay_inaudible</string>
|
||||||
<string name="pref_key_browser_feature_persistent_storage" translatable="false">pref_key_browser_feature_persistent_storage</string>
|
<string name="pref_key_browser_feature_persistent_storage" translatable="false">pref_key_browser_feature_persistent_storage</string>
|
||||||
|
<string name="pref_key_browser_feature_media_key_system_access" translatable="false">pref_key_browser_feature_media_key_system_access</string>
|
||||||
<string name="pref_key_phone_feature_camera" translatable="false">pref_key_phone_feature_camera</string>
|
<string name="pref_key_phone_feature_camera" translatable="false">pref_key_phone_feature_camera</string>
|
||||||
<string name="pref_key_phone_feature_location" translatable="false">pref_key_phone_feature_location</string>
|
<string name="pref_key_phone_feature_location" translatable="false">pref_key_phone_feature_location</string>
|
||||||
<string name="pref_key_phone_feature_microphone" translatable="false">pref_key_phone_feature_microphone</string>
|
<string name="pref_key_phone_feature_microphone" translatable="false">pref_key_phone_feature_microphone</string>
|
||||||
|
@ -843,6 +843,8 @@
|
|||||||
<string name="preference_phone_feature_notification">Notification</string>
|
<string name="preference_phone_feature_notification">Notification</string>
|
||||||
<!-- Preference for altering the persistent storage access for all websites -->
|
<!-- Preference for altering the persistent storage access for all websites -->
|
||||||
<string name="preference_phone_feature_persistent_storage">Persistent Storage</string>
|
<string name="preference_phone_feature_persistent_storage">Persistent Storage</string>
|
||||||
|
<!-- Preference for altering the EME access for all websites -->
|
||||||
|
<string name="preference_phone_feature_media_key_system_access">DRM-controlled content</string>
|
||||||
<!-- Label that indicates that a permission must be asked always -->
|
<!-- Label that indicates that a permission must be asked always -->
|
||||||
<string name="preference_option_phone_feature_ask_to_allow">Ask to allow</string>
|
<string name="preference_option_phone_feature_ask_to_allow">Ask to allow</string>
|
||||||
<!-- Label that indicates that a permission must be blocked -->
|
<!-- Label that indicates that a permission must be blocked -->
|
||||||
|
@ -34,6 +34,12 @@
|
|||||||
android:title="@string/preference_phone_feature_persistent_storage"
|
android:title="@string/preference_phone_feature_persistent_storage"
|
||||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||||
|
|
||||||
|
<androidx.preference.Preference
|
||||||
|
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"
|
||||||
|
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
||||||
|
|
||||||
<androidx.preference.Preference
|
<androidx.preference.Preference
|
||||||
android:key="@string/pref_key_exceptions_clear_site_permissions"
|
android:key="@string/pref_key_exceptions_clear_site_permissions"
|
||||||
android:layout="@layout/layout_clear_permission_button"/>
|
android:layout="@layout/layout_clear_permission_button"/>
|
||||||
|
@ -43,6 +43,13 @@
|
|||||||
android:summary="@string/preference_option_phone_feature_ask_to_allow"
|
android:summary="@string/preference_option_phone_feature_ask_to_allow"
|
||||||
app:allowDividerBelow="true"/>
|
app:allowDividerBelow="true"/>
|
||||||
|
|
||||||
|
<androidx.preference.Preference
|
||||||
|
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"
|
||||||
|
android:summary="@string/preference_option_phone_feature_ask_to_allow"
|
||||||
|
app:allowDividerBelow="true"/>
|
||||||
|
|
||||||
<androidx.preference.Preference
|
<androidx.preference.Preference
|
||||||
android:icon="@drawable/ic_internet"
|
android:icon="@drawable/ic_internet"
|
||||||
android:key="@string/pref_key_show_site_exceptions"
|
android:key="@string/pref_key_show_site_exceptions"
|
||||||
|
@ -95,6 +95,7 @@ class QuickSettingsFragmentStoreTest {
|
|||||||
every { permissions.notification } returns SitePermissions.Status.BLOCKED
|
every { permissions.notification } returns SitePermissions.Status.BLOCKED
|
||||||
every { permissions.location } returns SitePermissions.Status.ALLOWED
|
every { permissions.location } returns SitePermissions.Status.ALLOWED
|
||||||
every { permissions.localStorage } returns SitePermissions.Status.ALLOWED
|
every { permissions.localStorage } returns SitePermissions.Status.ALLOWED
|
||||||
|
every { permissions.mediaKeySystemAccess } returns SitePermissions.Status.NO_DECISION
|
||||||
every { permissions.autoplayAudible } returns SitePermissions.Status.BLOCKED
|
every { permissions.autoplayAudible } returns SitePermissions.Status.BLOCKED
|
||||||
every { permissions.autoplayInaudible } returns SitePermissions.Status.BLOCKED
|
every { permissions.autoplayInaudible } returns SitePermissions.Status.BLOCKED
|
||||||
every { appSettings.getAutoplayUserSetting(any()) } returns AUTOPLAY_BLOCK_ALL
|
every { appSettings.getAutoplayUserSetting(any()) } returns AUTOPLAY_BLOCK_ALL
|
||||||
@ -113,6 +114,7 @@ class QuickSettingsFragmentStoreTest {
|
|||||||
assertNotNull(state[PhoneFeature.AUTOPLAY_AUDIBLE])
|
assertNotNull(state[PhoneFeature.AUTOPLAY_AUDIBLE])
|
||||||
assertNotNull(state[PhoneFeature.AUTOPLAY_INAUDIBLE])
|
assertNotNull(state[PhoneFeature.AUTOPLAY_INAUDIBLE])
|
||||||
assertNotNull(state[PhoneFeature.PERSISTENT_STORAGE])
|
assertNotNull(state[PhoneFeature.PERSISTENT_STORAGE])
|
||||||
|
assertNotNull(state[PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS])
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -32,7 +32,8 @@ class SettingsTest {
|
|||||||
notification = ASK_TO_ALLOW,
|
notification = ASK_TO_ALLOW,
|
||||||
autoplayAudible = AutoplayAction.BLOCKED,
|
autoplayAudible = AutoplayAction.BLOCKED,
|
||||||
autoplayInaudible = AutoplayAction.BLOCKED,
|
autoplayInaudible = AutoplayAction.BLOCKED,
|
||||||
persistentStorage = ASK_TO_ALLOW
|
persistentStorage = ASK_TO_ALLOW,
|
||||||
|
mediaKeySystemAccess = ASK_TO_ALLOW
|
||||||
)
|
)
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
@ -608,6 +609,23 @@ class SettingsTest {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun getSitePermissionsCustomSettingsRules_mediaKeySystemAccess() {
|
||||||
|
settings.setSitePermissionsPhoneFeatureAction(PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS, ALLOWED)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
defaultPermissions.copy(mediaKeySystemAccess = ALLOWED),
|
||||||
|
settings.getSitePermissionsCustomSettingsRules()
|
||||||
|
)
|
||||||
|
|
||||||
|
settings.setSitePermissionsPhoneFeatureAction(PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS, BLOCKED)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
defaultPermissions.copy(mediaKeySystemAccess = BLOCKED),
|
||||||
|
settings.getSitePermissionsCustomSettingsRules()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun overrideAmoCollection() {
|
fun overrideAmoCollection() {
|
||||||
// When just created
|
// When just created
|
||||||
|
Loading…
Reference in New Issue
Block a user