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

Commit 3ff587dd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Do not overwrite user set or live wallpapers" into main

parents 650ef384 5d602200
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.os.ParcelFileDescriptor;
import android.util.Slog;
@@ -59,10 +58,10 @@ public class WallpaperUpdateReceiver extends BroadcastReceiver {
                return;
            }
            if (DEBUG) Slog.d(TAG, "Set customized default_wallpaper.");
            Bitmap blank = Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8);
            // set a blank wallpaper to force a redraw of default_wallpaper
            wallpaperManager.setBitmap(blank);
            wallpaperManager.setResource(com.android.internal.R.drawable.default_wallpaper);
            // Check if it is not a live wallpaper set
            if (wallpaperManager.getWallpaperInfo() == null) {
                wallpaperManager.clearWallpaper();
            }
        } catch (Exception e) {
            Slog.w(TAG, "Failed to customize system wallpaper." + e);
        }