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

Commit 02efc92c authored by Ching-Sung Li's avatar Ching-Sung Li Committed by Automerger Merge Worker
Browse files

Load defeault wallpaper based on device's CMF color am: 758c663e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13628026

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52654a22aa5f9562ba8ab060369494f7d6018dd6
parents e0ee514e 758c663e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -117,6 +117,9 @@ public class WallpaperManager {
    private static final String PROP_LOCK_WALLPAPER = "ro.config.lock_wallpaper";
    /** {@hide} */
    private static final String PROP_WALLPAPER_COMPONENT = "ro.config.wallpaper_component";
    /** {@hide} */
    private static final String VALUE_CMF_COLOR =
            android.os.SystemProperties.get("ro.boot.hardware.color");

    /**
     * Activity Action: Show settings for choosing wallpaper. Do not use directly to construct
@@ -2064,7 +2067,11 @@ public class WallpaperManager {
            return null;
        } else {
            whichProp = PROP_WALLPAPER;
            defaultResId = com.android.internal.R.drawable.default_wallpaper;
            final int defaultColorResId = context.getResources().getIdentifier(
                    "default_wallpaper_" + VALUE_CMF_COLOR, "drawable", "android");
            defaultResId =
                    defaultColorResId == 0 ? com.android.internal.R.drawable.default_wallpaper
                            : defaultColorResId;
        }
        final String path = SystemProperties.get(whichProp);
        if (!TextUtils.isEmpty(path)) {