summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2011-09-25 09:23:27 -0700
committerKenny Root <kroot@google.com>2011-09-26 09:55:03 -0700
commit498fbe470e8201ed6d4a1677025b274d9ca65e0b (patch)
treeb62716980373ea69e2aa8ebb2cfe37697421abdc
parentbde64e3d93b0144cd8b7c0ff65103ffb63fddba7 (diff)
downloadpackages_apps_settings-498fbe470e8201ed6d4a1677025b274d9ca65e0b.zip
packages_apps_settings-498fbe470e8201ed6d4a1677025b274d9ca65e0b.tar.gz
packages_apps_settings-498fbe470e8201ed6d4a1677025b274d9ca65e0b.tar.bz2
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
-rw-r--r--res/values/strings.xml6
-rw-r--r--res/xml/development_prefs.xml7
-rw-r--r--src/com/android/settings/DevelopmentSettings.java11
3 files changed, 24 insertions, 0 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c868470..6fb9069 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2674,6 +2674,12 @@ found in the list of installed applications.</string>
<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 -->
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index b65c2e5..76e50aa 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -22,6 +22,13 @@
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"
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index bdbec97..c3725e4 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -24,6 +24,8 @@ import android.content.ContentResolver;
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;
@@ -51,6 +53,8 @@ public class DevelopmentSettings extends PreferenceFragment
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";
@@ -130,6 +134,13 @@ public class DevelopmentSettings extends PreferenceFragment
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();
}