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

Commit 21ef89fd authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Add an option allowing to skip wallpaper apps selection.

This commit adds an option to the Settings application, making it
possible to launch a different activity for wallpaper selection

Also removing te intent constant android.settings.WALLPAPER_SETTINGS
The target for this action can't be easily overriden when the
wallpaper target is overriden, which would provide an inconsistant
experience.

Bug: 28554244
Bug: 26688904
Change-Id: I25367fbb4505615351fbad9e1aa1ca88df0cd034
parent 3652f20e
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -848,10 +848,6 @@
                  android:label="@string/wallpaper_settings_fragment_title"
                  android:icon="@drawable/ic_wallpaper"
                  android:taskAffinity="">
            <intent-filter android:priority="1">
                <action android:name="android.settings.WALLPAPER_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                       android:value="com.android.settings.WallpaperTypeSettings" />
        </activity>
+4 −0
Original line number Diff line number Diff line
@@ -40,4 +40,8 @@

    <!-- Fully-qualified class name for the implementation of the FeatureFactory to be instantiated. -->
    <string name="config_featureFactory" translatable="false">com.android.settings.overlay.FeatureFactoryImpl</string>

    <!-- Package name and fully-qualified class name for the wallpaper picker activity. -->
    <string name="config_wallpaper_picker_package" translatable="false">com.android.settings</string>
    <string name="config_wallpaper_picker_class" translatable="false">com.android.settings.Settings$WallpaperSettingsActivity</string>
</resources>
+5 −2
Original line number Diff line number Diff line
@@ -45,8 +45,11 @@
                android:key="wallpaper"
                android:title="@string/wallpaper_settings_title"
                settings:keywords="@string/keywords_display_wallpaper"
                android:fragment="com.android.settings.WallpaperTypeSettings"
                settings:useAdminDisabledSummary="true" />
                settings:useAdminDisabledSummary="true" >
                <intent
                        android:targetPackage="@string/config_wallpaper_picker_package"
                        android:targetClass="@string/config_wallpaper_picker_class" />
        </com.android.settingslib.RestrictedPreference>

        <com.android.settings.TimeoutListPreference
                android:key="screen_timeout"
+1 −6
Original line number Diff line number Diff line
@@ -410,12 +410,7 @@ public class SettingsActivity extends SettingsDrawerActivity

    @Override
    public boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) {
        // Override the fragment title for Wallpaper settings
        CharSequence title = pref.getTitle();
        if (pref.getFragment().equals(WallpaperTypeSettings.class.getName())) {
            title = getString(R.string.wallpaper_settings_fragment_title);
        }
        startPreferencePanel(pref.getFragment(), pref.getExtras(), -1, title,
        startPreferencePanel(pref.getFragment(), pref.getExtras(), -1, pref.getTitle(),
                null, 0);
        return true;
    }