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

Commit a17893b0 authored by Chris Tate's avatar Chris Tate Committed by Android (Google) Code Review
Browse files

Merge "Assign a new wallpaper ID when a live wallpaper is set" into nyc-dev

parents 3c8a10fb d57d17ca
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1262,6 +1262,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
        return null;
    }

    @Override
    public void setWallpaperComponentChecked(ComponentName name, String callingPackage) {
        if (isWallpaperSupported(callingPackage) && isWallpaperSettingAllowed(callingPackage)) {
            setWallpaperComponent(name);
@@ -1269,6 +1270,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
    }

    // ToDo: Remove this version of the function
    @Override
    public void setWallpaperComponent(ComponentName name) {
        checkPermission(android.Manifest.permission.SET_WALLPAPER_COMPONENT);
        synchronized (mLock) {
@@ -1281,7 +1283,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
            final long ident = Binder.clearCallingIdentity();
            try {
                wallpaper.imageWallpaperPending = false;
                bindWallpaperComponentLocked(name, false, true, wallpaper, null);
                if (bindWallpaperComponentLocked(name, false, true, wallpaper, null)) {
                    wallpaper.wallpaperId = makeWallpaperIdLocked();
                }
            } finally {
                Binder.restoreCallingIdentity(ident);
            }