Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment