summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Jang2015-09-14 14:03:12 -0700
committerRockchip2015-10-08 15:19:33 +0800
commit2cbeb76140ce7780992eb7ddff638212f0b31220 (patch)
tree68c66ca865daab9ce49d0ead0838b7115d15f13a
parent2b9af39aad388081a7071dff977f081a1bbfcfdf (diff)
DO NOT MERGE - Backport of ag/748147 - Security Patch Level in Settings CL#3/3
b/23946860 Change-Id: I2cfcfcbc28d6a1391cae55f505a2b981df9ade2c (cherry picked from commit 6ceb2ba9b8928b33c30e0c639539c3fe2f27971e)
-rw-r--r--res/values/strings.xml2
-rw-r--r--res/xml/device_info_settings.xml6
-rw-r--r--src/com/android/settings/DeviceInfoSettings.java8
3 files changed, 16 insertions, 0 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 882d268..240e0ff 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2151,6 +2151,8 @@
<!-- About phone screen, status item label [CHAR LIMIT=40] -->
<string name="firmware_version">Android version</string>
+ <!-- About phone screen, status item label [CHAR LIMIT=60] -->
+ <string name="security_patch">Android security patch level</string>
<!-- About phone screen, status item label [CHAR LIMIT=40] -->
<string name="model_number">Model number</string>
<!-- About phone screen, fcc equipment id label [CHAR LIMIT=40] -->
diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml
index 46992a4..6785a50 100644
--- a/res/xml/device_info_settings.xml
+++ b/res/xml/device_info_settings.xml
@@ -110,6 +110,12 @@
android:title="@string/firmware_version"
android:summary="@string/device_info_default"/>
+ <!-- Security patch level -->
+ <Preference android:key="security_patch"
+ style="?android:preferenceInformationStyle"
+ android:title="@string/security_patch"
+ android:summary="@string/device_info_default"/>
+
<!-- Device FCC equipment id -->
<Preference android:key="fcc_equipment_id"
style="?android:preferenceInformationStyle"
diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java
index f79707a..88c77ab 100644
--- a/src/com/android/settings/DeviceInfoSettings.java
+++ b/src/com/android/settings/DeviceInfoSettings.java
@@ -74,6 +74,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
private static final String KEY_SELINUX_STATUS = "selinux_status";
private static final String KEY_BASEBAND_VERSION = "baseband_version";
private static final String KEY_FIRMWARE_VERSION = "firmware_version";
+ private static final String KEY_SECURITY_PATCH = "security_patch";
private static final String KEY_UPDATE_SETTING = "additional_system_update_settings";
private static final String KEY_EQUIPMENT_ID = "fcc_equipment_id";
private static final String PROPERTY_EQUIPMENT_ID = "ro.ril.fccid";
@@ -94,6 +95,13 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE);
findPreference(KEY_FIRMWARE_VERSION).setEnabled(true);
+ String patch = Build.VERSION.SECURITY_PATCH;
+ if (!"".equals(patch)) {
+ setStringSummary(KEY_SECURITY_PATCH, patch);
+ } else {
+ getPreferenceScreen().removePreference(findPreference(KEY_SECURITY_PATCH));
+
+ }
setValueSummary(KEY_BASEBAND_VERSION, "gsm.version.baseband");
setStringSummary(KEY_DEVICE_MODEL, Build.MODEL + getMsvSuffix());
setValueSummary(KEY_EQUIPMENT_ID, PROPERTY_EQUIPMENT_ID);