Load defeault wallpaper based on device's CMF color am: 758c663e8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13628026 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I52654a22aa5f9562ba8ab060369494f7d6018dd6
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user