diff options
author | Roman Birg <roman@cyngn.com> | 2015-04-21 12:43:14 -0700 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-12-19 06:37:51 +0200 |
commit | a9b6e2cdb7f805b76b9d5f2a8ef93988ac3bcaeb (patch) | |
tree | 52e112580f85ff498e2b0c9e93a7bf678bfd6d56 | |
parent | c7c9553dc9f535bf947ac676b618dd5ec81cd8a2 (diff) | |
download | packages_apps_Settings-a9b6e2cdb7f805b76b9d5f2a8ef93988ac3bcaeb.zip packages_apps_Settings-a9b6e2cdb7f805b76b9d5f2a8ef93988ac3bcaeb.tar.gz packages_apps_Settings-a9b6e2cdb7f805b76b9d5f2a8ef93988ac3bcaeb.tar.bz2 |
Settings: update About screen device model fields
- Changed "Model name" to "Device model", this queries ro.product.model
- Added an optional "Device name" field which queries ro.product.name
- The new "Device name" field is disabled by default
Change-Id: If837674091b4612124e1eff00e884823be767f47
Signed-off-by: Roman Birg <roman@cyngn.com>
-rw-r--r-- | res/values/cm_strings.xml | 6 | ||||
-rwxr-xr-x | res/values/config.xml | 3 | ||||
-rw-r--r-- | res/xml/device_info_settings.xml | 10 | ||||
-rw-r--r-- | src/com/android/settings/DeviceInfoSettings.java | 5 |
4 files changed, 20 insertions, 4 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index e38cf9c..b77ea8c 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -47,7 +47,11 @@ <!-- About phone screen, CyanogenMod version --> <string name="mod_version">CyanogenMod version</string> <string name="mod_version_default">Unknown</string> - <string name="model_name">Model name</string> + + <!-- About phone screen, Device model --> + <string name="device_model">Device model</string> + <!-- About phone screen, Device name --> + <string name="device_name">Device name</string> <!-- About phone screen, CyanogenMod Api Level --> <string name="mod_api_level">CyanogenMod API level</string> diff --git a/res/values/config.xml b/res/values/config.xml index 439bd41..b483b2c 100755 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -85,4 +85,7 @@ <string name="stats_cyanogen_url">https://shopvac.cyngn.com/community/heartbeat</string> <string name="stats_cyanogen_token_url">https://account.cyngn.com/api/v1/community/heartbeat_token</string> + <!-- Display ro.product.name above Device model --> + <bool name="config_displayDeviceName">false</bool> + </resources> diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml index 6cda1ed..08637b6 100644 --- a/res/xml/device_info_settings.xml +++ b/res/xml/device_info_settings.xml @@ -89,10 +89,16 @@ android:fragment="com.android.settings.contributors.ContributorsCloudFragment" > </PreferenceScreen> + <!-- Device name --> + <Preference android:key="device_name" + style="?android:preferenceInformationStyle" + android:title="@string/device_name" + android:summary="@string/device_info_default"/> + <!-- Device hardware model --> <Preference android:key="device_model" style="?android:preferenceInformationStyle" - android:title="@string/model_name" + android:title="@string/device_model" android:summary="@string/device_info_default"/> <!-- Device firmware version --> @@ -155,4 +161,4 @@ android:title="@string/selinux_status" android:summary="@string/selinux_status_enforcing"/> -</PreferenceScreen>
\ No newline at end of file +</PreferenceScreen> diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java index dfa084f..211c417 100644 --- a/src/com/android/settings/DeviceInfoSettings.java +++ b/src/com/android/settings/DeviceInfoSettings.java @@ -75,6 +75,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In private static final String KEY_KERNEL_VERSION = "kernel_version"; private static final String KEY_BUILD_NUMBER = "build_number"; private static final String KEY_DEVICE_MODEL = "device_model"; + private static final String KEY_DEVICE_NAME = "device_name"; 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"; @@ -129,7 +130,6 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In } setValueSummary(KEY_BASEBAND_VERSION, "gsm.version.baseband"); - setStringSummary(KEY_DEVICE_MODEL, Build.MODEL + getMsvSuffix()); setValueSummary(KEY_EQUIPMENT_ID, PROPERTY_EQUIPMENT_ID); setStringSummary(KEY_DEVICE_MODEL, Build.MODEL); setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY); @@ -150,6 +150,9 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In setStringSummary(KEY_SELINUX_STATUS, status); } + setStringSummary(KEY_DEVICE_NAME, Build.PRODUCT); + removePreferenceIfBoolFalse(KEY_DEVICE_NAME, R.bool.config_displayDeviceName); + // Remove selinux information if property is not present removePreferenceIfPropertyMissing(getPreferenceScreen(), KEY_SELINUX_STATUS, PROPERTY_SELINUX_STATUS); |