• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

修订版5eb8e5a503781c4c5b21851d5aac0c072af09ad2 (tree)
时间2015-09-29 08:32:03
作者Zach Jang <zachjang@goog...>
CommiterThe Android Automerger

Log Message

DO NOT MERGE - Backport of ag/748147 - Security Patch Level in Settings
CL#3/3

b/23946860

Change-Id: I2cfcfcbc28d6a1391cae55f505a2b981df9ade2c

更改概述

差异

--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2146,6 +2146,8 @@
21462146
21472147 <!-- About phone screen, status item label [CHAR LIMIT=40] -->
21482148 <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>
21492151 <!-- About phone screen, status item label [CHAR LIMIT=40] -->
21502152 <string name="model_number">Model number</string>
21512153 <!-- About phone screen, fcc equipment id label [CHAR LIMIT=40] -->
--- a/res/xml/device_info_settings.xml
+++ b/res/xml/device_info_settings.xml
@@ -110,6 +110,12 @@
110110 android:title="@string/firmware_version"
111111 android:summary="@string/device_info_default"/>
112112
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+
113119 <!-- Device FCC equipment id -->
114120 <Preference android:key="fcc_equipment_id"
115121 style="?android:preferenceInformationStyle"
--- 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
7474 private static final String KEY_SELINUX_STATUS = "selinux_status";
7575 private static final String KEY_BASEBAND_VERSION = "baseband_version";
7676 private static final String KEY_FIRMWARE_VERSION = "firmware_version";
77+ private static final String KEY_SECURITY_PATCH = "security_patch";
7778 private static final String KEY_UPDATE_SETTING = "additional_system_update_settings";
7879 private static final String KEY_EQUIPMENT_ID = "fcc_equipment_id";
7980 private static final String PROPERTY_EQUIPMENT_ID = "ro.ril.fccid";
@@ -94,6 +95,13 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
9495
9596 setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE);
9697 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+ }
97105 setValueSummary(KEY_BASEBAND_VERSION, "gsm.version.baseband");
98106 setStringSummary(KEY_DEVICE_MODEL, Build.MODEL + getMsvSuffix());
99107 setValueSummary(KEY_EQUIPMENT_ID, PROPERTY_EQUIPMENT_ID);