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

Commit 3feacdf3 authored by Meng Hu's avatar Meng Hu Committed by Robert Greenwalt
Browse files

Add Sprint update menu

Adds the conditionally used xml ui definition and removes it at runtime when it's not
wanted.  Ported from GB.

bug:5237167
Change-Id: I89a67e1033ddc7099563732e839c08fbadb4fd75
parent d59d7cb0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -24,6 +24,14 @@
            <intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />
        </PreferenceScreen>


        <PreferenceScreen android:key="additional_system_update_settings"
                          android:title="@string/additional_system_update_settings_list_item_title">
            <intent android:action="android.intent.action.MAIN"
                    android:targetPackage="@string/additional_system_update"
                    android:targetClass="@string/additional_system_update_menu" />
        </PreferenceScreen>

        <!-- Device status - launches activity -->
        <PreferenceScreen android:key="status_info"
                android:title="@string/device_status" 
+8 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
    private static final String KEY_DEVICE_MODEL = "device_model";
    private static final String KEY_BASEBAND_VERSION = "baseband_version";
    private static final String KEY_FIRMWARE_VERSION = "firmware_version";
    private static final String KEY_UPDATE_SETTING = "additional_system_update_settings";

    long[] mHits = new long[3];

@@ -106,6 +107,13 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
                Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
        Utils.updatePreferenceToSpecificActivityOrRemove(act, parentPreference, KEY_CONTRIBUTORS,
                Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);

        // Read platform settings for additional system update setting
        boolean isUpdateSettingAvailable =
                getResources().getBoolean(R.bool.config_additional_system_update_setting_enable);
        if (isUpdateSettingAvailable == false) {
            getPreferenceScreen().removePreference(findPreference(KEY_UPDATE_SETTING));
        }
    }

    @Override