This makes the verifier device identifier information for this
particular device visible in the "Development" screen of
Settings.
Bug:
5205163
Change-Id: I55e0b32fe98f898e6e8d723ce6696529fdccffd0
<string name="enable_adb">USB debugging</string>
<!-- Setting checkbox summary for Whether to enable USB debugging support on the phone -->
<string name="enable_adb_summary">Debug mode when USB is connected</string>
+ <!-- Development settings: title for the field that shows the "App ID" development identifier
+ for this device. [CHAR LIMIT=40] -->
+ <string name="verifier_device_identifier">Development device ID</string>
+ <!-- Development settings: a string to show when the "App ID" development identifier for this
+ device cannot be read from internal settings. [CHAR LIMIT=60] -->
+ <string name="verifier_device_identifier_not_available">Device information not available</string>
<!-- Setting Checkbox title whether to keep the screen on when plugged in to a power source -->
<string name="keep_screen_on">Stay awake</string>
<!-- setting Checkbox summary whether to keep the screen on when plugged in -->
android:title="@string/enable_adb"
android:summary="@string/enable_adb_summary"/>
+ <Preference
+ android:key="verifier_device_identifier"
+ style="?android:attr/preferenceInformationStyle"
+ android:title="@string/verifier_device_identifier"
+ android:summary="@string/verifier_device_identifier_not_available"
+ android:persistent="false" />
+
<CheckBoxPreference
android:key="keep_screen_on"
android:title="@string/keep_screen_on"
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.VerifierDeviceIdentity;
import android.os.BatteryManager;
import android.os.Build;
import android.os.Bundle;
OnPreferenceChangeListener {
private static final String ENABLE_ADB = "enable_adb";
+
+ private static final String VERIFIER_DEVICE_IDENTIFIER = "verifier_device_identifier";
private static final String KEEP_SCREEN_ON = "keep_screen_on";
private static final String ALLOW_MOCK_LOCATION = "allow_mock_location";
private static final String HDCP_CHECKING_KEY = "hdcp_checking";
mShowAllANRs = (CheckBoxPreference) findPreference(
SHOW_ALL_ANRS_KEY);
+ final Preference verifierDeviceIdentifier = findPreference(VERIFIER_DEVICE_IDENTIFIER);
+ final PackageManager pm = getActivity().getPackageManager();
+ final VerifierDeviceIdentity verifierIndentity = pm.getVerifierDeviceIdentity();
+ if (verifierIndentity != null) {
+ verifierDeviceIdentifier.setSummary(verifierIndentity.toString());
+ }
+
removeHdcpOptionsForProduction();
}