Use new naming for Widevine Developer option.
Bug: 301669353 Change-Id: Idf9802fc6bbffdc81c9c0fa3527dc3eb7efbf2a1
This commit is contained in:
@@ -13126,4 +13126,11 @@
|
|||||||
|
|
||||||
<!--Text for Stylus Pointer Icon preference -->
|
<!--Text for Stylus Pointer Icon preference -->
|
||||||
<string name="show_stylus_pointer_icon">Show pointer while hovering</string>
|
<string name="show_stylus_pointer_icon">Show pointer while hovering</string>
|
||||||
|
|
||||||
|
<!-- Developer settings title: Media DRM settings screen. [CHAR LIMIT=50] -->
|
||||||
|
<string name="media_drm_settings_title">Media DRM settings</string>
|
||||||
|
<!-- Developer settings title: select whether to enable force Software Secure Crypto fallback. [CHAR LIMIT=50] -->
|
||||||
|
<string name="force_swcrypto_fallback_title">Force Software Secure Crypto</string>
|
||||||
|
<!-- Developer settings summary: select to force Software Secure Crypto.[CHAR LIMIT=NONE] -->
|
||||||
|
<string name="force_swcrypto_fallback_summary">Force DRM key management to use software-based whitebox crypto</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -645,9 +645,9 @@
|
|||||||
android:fragment="com.android.settings.development.transcode.TranscodeSettingsFragment" />
|
android:fragment="com.android.settings.development.transcode.TranscodeSettingsFragment" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="widevine_settings"
|
android:key="media_drm_settings"
|
||||||
android:title="@string/widevine_settings_title"
|
android:title="@string/media_drm_settings_title"
|
||||||
android:fragment="com.android.settings.development.widevine.WidevineSettingsFragment" />
|
android:fragment="com.android.settings.development.mediadrm.MediaDrmSettingsFragment" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
@@ -18,12 +18,12 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
android:title="@string/widevine_settings_title"
|
android:title="@string/media_drm_settings_title"
|
||||||
settings:searchable="false">
|
settings:searchable="false">
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
android:key="force_l3_fallback"
|
android:key="force_swcrypto_fallback"
|
||||||
android:title="@string/force_l3_fallback_title"
|
android:title="@string/force_swcrypto_fallback_title"
|
||||||
android:summary="@string/force_l3_fallback_summary"
|
android:summary="@string/force_swcrypto_fallback_summary"
|
||||||
settings:controller="com.android.settings.development.widevine.ForceL3FallbackPreferenceController" />
|
settings:controller="com.android.settings.development.mediadrm.ForceSwSecureCryptoFallbackPreferenceController" />
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
@@ -14,9 +14,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.android.settings.development.widevine;
|
package com.android.settings.development.mediadrm;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.media.MediaDrm;
|
||||||
import android.sysprop.WidevineProperties;
|
import android.sysprop.WidevineProperties;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
@@ -29,13 +30,12 @@ import com.android.settingslib.development.DevelopmentSettingsEnabler;
|
|||||||
import com.android.settings.media_drm.Flags;
|
import com.android.settings.media_drm.Flags;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The controller (in the Media Widevine settings) enforces L3 security level
|
* The controller (in the Media Drm settings) enforces software secure crypto.
|
||||||
* of Widevine CDM.
|
|
||||||
*/
|
*/
|
||||||
public class ForceL3FallbackPreferenceController extends TogglePreferenceController {
|
public class ForceSwSecureCryptoFallbackPreferenceController extends TogglePreferenceController {
|
||||||
private static final String TAG = "ForceL3FallbackPreferenceController";
|
private static final String TAG = "ForceSwSecureCryptoFallbackPreferenceController";
|
||||||
|
|
||||||
public ForceL3FallbackPreferenceController(Context context, String preferenceKey) {
|
public ForceSwSecureCryptoFallbackPreferenceController(Context context, String preferenceKey) {
|
||||||
super(context, preferenceKey);
|
super(context, preferenceKey);
|
||||||
}
|
}
|
||||||
|
|
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.android.settings.development.widevine;
|
package com.android.settings.development.mediadrm;
|
||||||
|
|
||||||
import android.app.settings.SettingsEnums;
|
import android.app.settings.SettingsEnums;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -27,12 +27,12 @@ import com.android.settingslib.development.DevelopmentSettingsEnabler;
|
|||||||
import com.android.settingslib.search.SearchIndexable;
|
import com.android.settingslib.search.SearchIndexable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fragment for native widevine settings in Developer options.
|
* Fragment for native mediadrm settings in Developer options.
|
||||||
*/
|
*/
|
||||||
@SearchIndexable
|
@SearchIndexable
|
||||||
public class WidevineSettingsFragment extends DashboardFragment implements
|
public class MediaDrmSettingsFragment extends DashboardFragment implements
|
||||||
DeveloperOptionAwareMixin {
|
DeveloperOptionAwareMixin {
|
||||||
private static final String TAG = "WidevineSettings";
|
private static final String TAG = "MediaDrmSettings";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getLogTag() {
|
protected String getLogTag() {
|
||||||
@@ -41,16 +41,16 @@ public class WidevineSettingsFragment extends DashboardFragment implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getPreferenceScreenResId() {
|
protected int getPreferenceScreenResId() {
|
||||||
return R.xml.widevine_settings;
|
return R.xml.media_drm_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetricsCategory() {
|
public int getMetricsCategory() {
|
||||||
return SettingsEnums.WIDEVINE_SETTINGS;
|
return SettingsEnums.MEDIA_DRM_SETTINGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||||
new BaseSearchIndexProvider(R.xml.widevine_settings) {
|
new BaseSearchIndexProvider(R.xml.media_drm_settings) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isPageSearchEnabled(Context context) {
|
protected boolean isPageSearchEnabled(Context context) {
|
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.android.settings.development.widevine;
|
package com.android.settings.development.mediadrm;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static org.junit.Assume.assumeTrue;
|
import static org.junit.Assume.assumeTrue;
|
||||||
@@ -43,23 +43,23 @@ import org.junit.runner.RunWith;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public class ForceL3FallbackPreferenceControllerTest {
|
public class ForceSwSecureCryptoFallbackPreferenceControllerTest {
|
||||||
|
|
||||||
private static final String PREF_KEY = "force_l3_fallback";
|
private static final String PREF_KEY = "force_swcrypto_fallback";
|
||||||
private static final UUID WIDEVINE_UUID =
|
private static final UUID WIDEVINE_UUID =
|
||||||
new UUID(0xEDEF8BA979D64ACEL, 0xA3C827DCD51D21EDL);
|
new UUID(0xEDEF8BA979D64ACEL, 0xA3C827DCD51D21EDL);
|
||||||
private static final String TAG = "ForceL3FallbackPreferenceControllerTest";
|
private static final String TAG = "ForceSwSecureCryptoFallbackPreferenceControllerTest";
|
||||||
|
|
||||||
@Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
|
@Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private ForceL3FallbackPreferenceController mController;
|
private ForceSwSecureCryptoFallbackPreferenceController mController;
|
||||||
private SwitchPreference mPreference;
|
private SwitchPreference mPreference;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
mContext = ApplicationProvider.getApplicationContext();
|
mContext = ApplicationProvider.getApplicationContext();
|
||||||
mController = new ForceL3FallbackPreferenceController(mContext, PREF_KEY);
|
mController = new ForceSwSecureCryptoFallbackPreferenceController(mContext, PREF_KEY);
|
||||||
mPreference = new SwitchPreference(mContext);
|
mPreference = new SwitchPreference(mContext);
|
||||||
WidevineProperties.forcel3_enabled(false);
|
WidevineProperties.forcel3_enabled(false);
|
||||||
}
|
}
|
Reference in New Issue
Block a user