SystemUI needs the SET_WALLPAPER permission
If changing wallpaper when low on memory, retrieving the default
wallpaper may return null, which triggers error handling in
ImageWallpaper. This error handling tries to perform
WallpaperManager.clear(), but for that it needs SET_WALLPAPER
permission, which it does not have.
For users with apps that auto change wallpaper, this issue can
be frequent in low-memory conditions.
The solution is to add the permisson.
Change-Id: I81503c1667e3952c2dd15599969f7dcc51623e5b
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index b606a6f..226a8ca 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -104,6 +104,9 @@
<uses-permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" />
<uses-permission android:name="android.permission.TRUST_LISTENER" />
+ <!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked -->
+ <uses-permission android:name="android.permission.SET_WALLPAPER"/>
+
<!-- Recents -->
<uses-permission android:name="android.permission.BIND_APPWIDGET" />