Loading core/res/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -2009,6 +2009,10 @@ <!-- Component name of the built in wallpaper used to display bitmap wallpapers. This must not be null. --> <string name="image_wallpaper_component" translatable="false">com.android.systemui/com.android.systemui.wallpapers.ImageWallpaper</string> <!-- Component name of the built in wallpaper that is used when the user-selected wallpaper is incompatible with the display's resolution or aspect ratio. --> <string name="fallback_wallpaper_component" translatable="false">com.android.systemui/com.android.systemui.wallpapers.GradientColorWallpaper</string> <!-- True if WallpaperService is enabled --> <bool name="config_enableWallpaperService">true</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2270,6 +2270,7 @@ <java-symbol type="string" name="heavy_weight_notification" /> <java-symbol type="string" name="heavy_weight_notification_detail" /> <java-symbol type="string" name="image_wallpaper_component" /> <java-symbol type="string" name="fallback_wallpaper_component" /> <java-symbol type="string" name="input_method_binding_label" /> <java-symbol type="string" name="input_method_ime_switch_long_click_action_desc" /> <java-symbol type="string" name="launch_warning_original" /> Loading packages/SystemUI/AndroidManifest.xml +5 −1 Original line number Diff line number Diff line Loading @@ -553,7 +553,11 @@ <service android:name=".wallpapers.GradientColorWallpaper" android:singleUser="true" android:permission="android.permission.BIND_WALLPAPER" android:exported="true" /> android:exported="true"> <meta-data android:name="android.service.wallpaper" android:resource="@xml/gradient_color_wallpaper"> </meta-data> </service> <activity android:name=".tuner.TunerActivity" android:enabled="false" Loading packages/SystemUI/res/xml/gradient_color_wallpaper.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright (C) 2025 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License --> <wallpaper xmlns:android="http://schemas.android.com/apk/res/android" android:showMetadataInPreview="false" android:supportsMultipleDisplays="true" /> No newline at end of file services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +27 −2 Original line number Diff line number Diff line Loading @@ -771,6 +771,12 @@ public class WallpaperManagerService extends IWallpaperManager.Stub */ private final ComponentName mImageWallpaper; /** * Name of the component that is used when the user-selected wallpaper is incompatible with the * display's resolution or aspect ratio. */ @Nullable private final ComponentName mFallbackWallpaperComponent; /** * Default image wallpaper shall never changed after system service started, caching it when we * first read the image file. Loading Loading @@ -1601,6 +1607,12 @@ public class WallpaperManagerService extends IWallpaperManager.Stub mShuttingDown = false; mImageWallpaper = ComponentName.unflattenFromString( context.getResources().getString(R.string.image_wallpaper_component)); if (enableConnectedDisplaysWallpaper()) { mFallbackWallpaperComponent = ComponentName.unflattenFromString( context.getResources().getString(R.string.fallback_wallpaper_component)); } else { mFallbackWallpaperComponent = null; } ComponentName defaultComponent = WallpaperManager.getCmfDefaultWallpaperComponent(context); mDefaultWallpaperComponent = defaultComponent == null ? mImageWallpaper : defaultComponent; mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); Loading Loading @@ -3613,6 +3625,13 @@ public class WallpaperManagerService extends IWallpaperManager.Stub if (componentName != null && !componentName.equals(mImageWallpaper)) { // The requested component is not the static wallpaper service, so make sure it's // actually a wallpaper service. if (mFallbackWallpaperComponent != null && componentName.equals(mFallbackWallpaperComponent)) { // The fallback wallpaper does not declare WallpaperService.SERVICE_INTERFACE // action in its intent filter to prevent it from being listed in the wallpaper // picker. And thus, use explicit intent to query the metadata. intent = new Intent().setComponent(mFallbackWallpaperComponent); } List<ResolveInfo> ris = mIPackageManager.queryIntentServices(intent, intent.resolveTypeIfNeeded(mContext.getContentResolver()), Loading Loading @@ -4100,8 +4119,14 @@ public class WallpaperManagerService extends IWallpaperManager.Stub mFallbackWallpaper.allowBackup = false; mFallbackWallpaper.wallpaperId = makeWallpaperIdLocked(); mFallbackWallpaper.mBindSource = BindSource.INITIALIZE_FALLBACK; if (mFallbackWallpaperComponent == null) { bindWallpaperComponentLocked(mDefaultWallpaperComponent, true, false, mFallbackWallpaper, null); } else { mFallbackWallpaper.mWhich = FLAG_SYSTEM | FLAG_LOCK; bindWallpaperComponentLocked(mFallbackWallpaperComponent, true, false, mFallbackWallpaper, null); } } } Loading Loading
core/res/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -2009,6 +2009,10 @@ <!-- Component name of the built in wallpaper used to display bitmap wallpapers. This must not be null. --> <string name="image_wallpaper_component" translatable="false">com.android.systemui/com.android.systemui.wallpapers.ImageWallpaper</string> <!-- Component name of the built in wallpaper that is used when the user-selected wallpaper is incompatible with the display's resolution or aspect ratio. --> <string name="fallback_wallpaper_component" translatable="false">com.android.systemui/com.android.systemui.wallpapers.GradientColorWallpaper</string> <!-- True if WallpaperService is enabled --> <bool name="config_enableWallpaperService">true</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2270,6 +2270,7 @@ <java-symbol type="string" name="heavy_weight_notification" /> <java-symbol type="string" name="heavy_weight_notification_detail" /> <java-symbol type="string" name="image_wallpaper_component" /> <java-symbol type="string" name="fallback_wallpaper_component" /> <java-symbol type="string" name="input_method_binding_label" /> <java-symbol type="string" name="input_method_ime_switch_long_click_action_desc" /> <java-symbol type="string" name="launch_warning_original" /> Loading
packages/SystemUI/AndroidManifest.xml +5 −1 Original line number Diff line number Diff line Loading @@ -553,7 +553,11 @@ <service android:name=".wallpapers.GradientColorWallpaper" android:singleUser="true" android:permission="android.permission.BIND_WALLPAPER" android:exported="true" /> android:exported="true"> <meta-data android:name="android.service.wallpaper" android:resource="@xml/gradient_color_wallpaper"> </meta-data> </service> <activity android:name=".tuner.TunerActivity" android:enabled="false" Loading
packages/SystemUI/res/xml/gradient_color_wallpaper.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright (C) 2025 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License --> <wallpaper xmlns:android="http://schemas.android.com/apk/res/android" android:showMetadataInPreview="false" android:supportsMultipleDisplays="true" /> No newline at end of file
services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +27 −2 Original line number Diff line number Diff line Loading @@ -771,6 +771,12 @@ public class WallpaperManagerService extends IWallpaperManager.Stub */ private final ComponentName mImageWallpaper; /** * Name of the component that is used when the user-selected wallpaper is incompatible with the * display's resolution or aspect ratio. */ @Nullable private final ComponentName mFallbackWallpaperComponent; /** * Default image wallpaper shall never changed after system service started, caching it when we * first read the image file. Loading Loading @@ -1601,6 +1607,12 @@ public class WallpaperManagerService extends IWallpaperManager.Stub mShuttingDown = false; mImageWallpaper = ComponentName.unflattenFromString( context.getResources().getString(R.string.image_wallpaper_component)); if (enableConnectedDisplaysWallpaper()) { mFallbackWallpaperComponent = ComponentName.unflattenFromString( context.getResources().getString(R.string.fallback_wallpaper_component)); } else { mFallbackWallpaperComponent = null; } ComponentName defaultComponent = WallpaperManager.getCmfDefaultWallpaperComponent(context); mDefaultWallpaperComponent = defaultComponent == null ? mImageWallpaper : defaultComponent; mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); Loading Loading @@ -3613,6 +3625,13 @@ public class WallpaperManagerService extends IWallpaperManager.Stub if (componentName != null && !componentName.equals(mImageWallpaper)) { // The requested component is not the static wallpaper service, so make sure it's // actually a wallpaper service. if (mFallbackWallpaperComponent != null && componentName.equals(mFallbackWallpaperComponent)) { // The fallback wallpaper does not declare WallpaperService.SERVICE_INTERFACE // action in its intent filter to prevent it from being listed in the wallpaper // picker. And thus, use explicit intent to query the metadata. intent = new Intent().setComponent(mFallbackWallpaperComponent); } List<ResolveInfo> ris = mIPackageManager.queryIntentServices(intent, intent.resolveTypeIfNeeded(mContext.getContentResolver()), Loading Loading @@ -4100,8 +4119,14 @@ public class WallpaperManagerService extends IWallpaperManager.Stub mFallbackWallpaper.allowBackup = false; mFallbackWallpaper.wallpaperId = makeWallpaperIdLocked(); mFallbackWallpaper.mBindSource = BindSource.INITIALIZE_FALLBACK; if (mFallbackWallpaperComponent == null) { bindWallpaperComponentLocked(mDefaultWallpaperComponent, true, false, mFallbackWallpaper, null); } else { mFallbackWallpaper.mWhich = FLAG_SYSTEM | FLAG_LOCK; bindWallpaperComponentLocked(mFallbackWallpaperComponent, true, false, mFallbackWallpaper, null); } } } Loading