Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9b6e2cd authored by Roman Birg's avatar Roman Birg Committed by Michael Bestas
Browse files

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: default avatarRoman Birg <roman@cyngn.com>
parent c7c9553d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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>
+3 −0
Original line number Diff line number Diff line
@@ -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>
+8 −2
Original line number Diff line number Diff line
@@ -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 -->
+4 −1
Original line number Diff line number Diff line
@@ -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);