Make verifier device id information visible

This makes the verifier device identifier information for this
particular device visible in the "Development" screen of
Settings.

Bug: 5205163
Change-Id: I55e0b32fe98f898e6e8d723ce6696529fdccffd0
This commit is contained in:
Kenny Root
2011-09-25 09:23:27 -07:00
parent bde64e3d93
commit 498fbe470e
3 changed files with 24 additions and 0 deletions

View File

@@ -2674,6 +2674,12 @@ found in the list of installed applications.</string>
<string name="enable_adb">USB debugging</string> <string name="enable_adb">USB debugging</string>
<!-- Setting checkbox summary for Whether to enable USB debugging support on the phone --> <!-- 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> <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 --> <!-- Setting Checkbox title whether to keep the screen on when plugged in to a power source -->
<string name="keep_screen_on">Stay awake</string> <string name="keep_screen_on">Stay awake</string>
<!-- setting Checkbox summary whether to keep the screen on when plugged in --> <!-- setting Checkbox summary whether to keep the screen on when plugged in -->

View File

@@ -22,6 +22,13 @@
android:title="@string/enable_adb" android:title="@string/enable_adb"
android:summary="@string/enable_adb_summary"/> 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 <CheckBoxPreference
android:key="keep_screen_on" android:key="keep_screen_on"
android:title="@string/keep_screen_on" android:title="@string/keep_screen_on"

View File

@@ -24,6 +24,8 @@ import android.content.ContentResolver;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.VerifierDeviceIdentity;
import android.os.BatteryManager; import android.os.BatteryManager;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
@@ -51,6 +53,8 @@ public class DevelopmentSettings extends PreferenceFragment
OnPreferenceChangeListener { OnPreferenceChangeListener {
private static final String ENABLE_ADB = "enable_adb"; 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 KEEP_SCREEN_ON = "keep_screen_on";
private static final String ALLOW_MOCK_LOCATION = "allow_mock_location"; private static final String ALLOW_MOCK_LOCATION = "allow_mock_location";
private static final String HDCP_CHECKING_KEY = "hdcp_checking"; private static final String HDCP_CHECKING_KEY = "hdcp_checking";
@@ -130,6 +134,13 @@ public class DevelopmentSettings extends PreferenceFragment
mShowAllANRs = (CheckBoxPreference) findPreference( mShowAllANRs = (CheckBoxPreference) findPreference(
SHOW_ALL_ANRS_KEY); 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(); removeHdcpOptionsForProduction();
} }