Skip to content

Commit

Permalink
Settings: add in AOSP-CAF version
Browse files Browse the repository at this point in the history
* Show the CAF tag base in About Phone
* Will be shown through a prop "ro.caf.version"

Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>
  • Loading branch information
akhilnarang committed Mar 28, 2017
1 parent fea930c commit f4691f8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions res/values/custom_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@
<string name="hardware_keys_action_launch_camera">Open camera</string>
<string name="hardware_keys_action_last_app">Launch last app</string>

<!-- AOSP-CAF Version -->
<string name="version_title">CAF Version</string>
<string name="version_default">Unknown</string>
</resources>
7 changes: 7 additions & 0 deletions res/xml/device_info_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@
android:title="@string/firmware_version"
android:summary="@string/device_info_default"/>

<!-- AOSP-CAF Version -->
<Preference android:key="caf_version"
android:enabled="false"
android:shouldDisableView="false"
android:title="@string/version_title"
android:summary="@string/version_default"/>

<!-- Security patch level -->
<PreferenceScreen android:key="security_patch"
android:title="@string/security_patch"
Expand Down
3 changes: 3 additions & 0 deletions src/com/android/settings/DeviceInfoSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,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_CAF_VERSION = "caf_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";
Expand Down Expand Up @@ -114,6 +115,8 @@ public void onCreate(Bundle icicle) {
setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE);
findPreference(KEY_FIRMWARE_VERSION).setEnabled(true);

setValueSummary(KEY_CAF_VERSION, "ro.caf.version");

final String patch = DeviceInfoUtils.getSecurityPatch();
if (!TextUtils.isEmpty(patch)) {
setStringSummary(KEY_SECURITY_PATCH, patch);
Expand Down

0 comments on commit f4691f8

Please sign in to comment.