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

Commit 13cf250b authored by Fan Zhang's avatar Fan Zhang
Browse files

Remove "platform_slice" attribute from Settings.

Bug: 126222433
Test: robo
Change-Id: I05beec7d3e3ec713c40740a1adbcacaee88237b5
parent aa08a2cc
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -70,8 +70,6 @@
        <attr name="searchable" format="boolean" />
        <!-- Classname of a PreferenceController corresponding to the preference -->
        <attr name="controller" format="string" />
        <!-- {@code true} when the controller declared represents a slice from {@link android.app.SettingsSliceContract} -->
        <attr name="platform_slice" format="boolean" />
        <!-- customized subtitle if it's an unavailable slice -->
        <attr name="unavailableSliceSubtitle" format="string" />
    </declare-styleable>
+0 −1
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@
        android:summary="@string/battery_saver_turn_on_summary"
        settings:textOn="@string/battery_saver_button_turn_on"
        settings:textOff="@string/battery_saver_button_turn_off"
        settings:platform_slice="true"
        settings:controller="com.android.settings.fuelgauge.batterysaver.BatterySaverButtonPreferenceController" />

    <PreferenceCategory
+0 −1
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@
        android:disableDependentsState="true"
        android:order="5"
        settings:controller="com.android.settings.network.AirplaneModePreferenceController"
        settings:platform_slice="true"
        settings:userRestriction="no_airplane_mode"/>

    <Preference
+0 −1
Original line number Diff line number Diff line
@@ -59,7 +59,6 @@
        android:disableDependentsState="true"
        android:order="-5"
        settings:controller="com.android.settings.network.AirplaneModePreferenceController"
        settings:platform_slice="true"
        settings:userRestriction="no_airplane_mode"/>

    <com.android.settingslib.RestrictedPreference
+0 −10
Original line number Diff line number Diff line
@@ -83,7 +83,6 @@ public class PreferenceXmlParserUtils {
        int FLAG_NEED_PREF_TITLE = 1 << 4;
        int FLAG_NEED_PREF_SUMMARY = 1 << 5;
        int FLAG_NEED_PREF_ICON = 1 << 6;
        int FLAG_NEED_PLATFORM_SLICE_FLAG = 1 << 7;
        int FLAG_NEED_KEYWORDS = 1 << 8;
        int FLAG_NEED_SEARCHABLE = 1 << 9;
        int FLAG_NEED_PREF_APPEND = 1 << 10;
@@ -96,7 +95,6 @@ public class PreferenceXmlParserUtils {
    public static final String METADATA_TITLE = "title";
    public static final String METADATA_SUMMARY = "summary";
    public static final String METADATA_ICON = "icon";
    public static final String METADATA_PLATFORM_SLICE_FLAG = "platform_slice";
    public static final String METADATA_KEYWORDS = "keywords";
    public static final String METADATA_SEARCHABLE = "searchable";
    public static final String METADATA_APPEND = "staticPreferenceLocation";
@@ -231,10 +229,6 @@ public class PreferenceXmlParserUtils {
            if (hasFlag(flags, MetadataFlag.FLAG_NEED_PREF_ICON)) {
                preferenceMetadata.putInt(METADATA_ICON, getIcon(preferenceAttributes));
            }
            if (hasFlag(flags, MetadataFlag.FLAG_NEED_PLATFORM_SLICE_FLAG)) {
                preferenceMetadata.putBoolean(METADATA_PLATFORM_SLICE_FLAG,
                        getPlatformSlice(preferenceAttributes));
            }
            if (hasFlag(flags, MetadataFlag.FLAG_NEED_KEYWORDS)) {
                preferenceMetadata.putString(METADATA_KEYWORDS, getKeywords(preferenceAttributes));
            }
@@ -318,10 +312,6 @@ public class PreferenceXmlParserUtils {
        return styledAttributes.getResourceId(com.android.internal.R.styleable.Icon_icon, 0);
    }

    private static boolean getPlatformSlice(TypedArray styledAttributes) {
        return styledAttributes.getBoolean(R.styleable.Preference_platform_slice, false /* def */);
    }

    private static boolean isSearchable(TypedArray styledAttributes) {
        return styledAttributes.getBoolean(R.styleable.Preference_searchable, true /* default */);
    }
Loading