packages/apps/Settings
修订版 | 5eb8e5a503781c4c5b21851d5aac0c072af09ad2 (tree) |
---|---|
时间 | 2015-09-29 08:32:03 |
作者 | Zach Jang <zachjang@goog...> |
Commiter | The Android Automerger |
DO NOT MERGE - Backport of ag/748147 - Security Patch Level in Settings
CL#3/3
b/23946860
Change-Id: I2cfcfcbc28d6a1391cae55f505a2b981df9ade2c
@@ -2146,6 +2146,8 @@ | ||
2146 | 2146 | |
2147 | 2147 | <!-- About phone screen, status item label [CHAR LIMIT=40] --> |
2148 | 2148 | <string name="firmware_version">Android version</string> |
2149 | + <!-- About phone screen, status item label [CHAR LIMIT=60] --> | |
2150 | + <string name="security_patch">Android security patch level</string> | |
2149 | 2151 | <!-- About phone screen, status item label [CHAR LIMIT=40] --> |
2150 | 2152 | <string name="model_number">Model number</string> |
2151 | 2153 | <!-- About phone screen, fcc equipment id label [CHAR LIMIT=40] --> |
@@ -110,6 +110,12 @@ | ||
110 | 110 | android:title="@string/firmware_version" |
111 | 111 | android:summary="@string/device_info_default"/> |
112 | 112 | |
113 | + <!-- Security patch level --> | |
114 | + <Preference android:key="security_patch" | |
115 | + style="?android:preferenceInformationStyle" | |
116 | + android:title="@string/security_patch" | |
117 | + android:summary="@string/device_info_default"/> | |
118 | + | |
113 | 119 | <!-- Device FCC equipment id --> |
114 | 120 | <Preference android:key="fcc_equipment_id" |
115 | 121 | style="?android:preferenceInformationStyle" |
@@ -74,6 +74,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In | ||
74 | 74 | private static final String KEY_SELINUX_STATUS = "selinux_status"; |
75 | 75 | private static final String KEY_BASEBAND_VERSION = "baseband_version"; |
76 | 76 | private static final String KEY_FIRMWARE_VERSION = "firmware_version"; |
77 | + private static final String KEY_SECURITY_PATCH = "security_patch"; | |
77 | 78 | private static final String KEY_UPDATE_SETTING = "additional_system_update_settings"; |
78 | 79 | private static final String KEY_EQUIPMENT_ID = "fcc_equipment_id"; |
79 | 80 | private static final String PROPERTY_EQUIPMENT_ID = "ro.ril.fccid"; |
@@ -94,6 +95,13 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In | ||
94 | 95 | |
95 | 96 | setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE); |
96 | 97 | findPreference(KEY_FIRMWARE_VERSION).setEnabled(true); |
98 | + String patch = Build.VERSION.SECURITY_PATCH; | |
99 | + if (!"".equals(patch)) { | |
100 | + setStringSummary(KEY_SECURITY_PATCH, patch); | |
101 | + } else { | |
102 | + getPreferenceScreen().removePreference(findPreference(KEY_SECURITY_PATCH)); | |
103 | + | |
104 | + } | |
97 | 105 | setValueSummary(KEY_BASEBAND_VERSION, "gsm.version.baseband"); |
98 | 106 | setStringSummary(KEY_DEVICE_MODEL, Build.MODEL + getMsvSuffix()); |
99 | 107 | setValueSummary(KEY_EQUIPMENT_ID, PROPERTY_EQUIPMENT_ID); |