Skip to content

Commit b392903

Browse files
wilsonshihChris Tate
authored andcommitted
Make WallpaperMS bind wallpaper component PendingIntent immutable.
Require that the PendingIntent be immutable so that a malicious app is not able to hijack and mutate any of the details. Fixes: 154915372 Test: build & flash, change wallpaper manually. Change-Id: I59b48811b26736bf0575769107dd940ca33ccf8d (cherry picked from commit d4bd69c)
1 parent 00ec776 commit b392903

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/core/java/com/android/server/wallpaper/WallpaperManagerService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ boolean bindWallpaperComponentLocked(ComponentName componentName, boolean force,
17961796
mContext, 0,
17971797
Intent.createChooser(new Intent(Intent.ACTION_SET_WALLPAPER),
17981798
mContext.getText(com.android.internal.R.string.chooser_wallpaper)),
1799-
0, null, new UserHandle(serviceUserId)));
1799+
PendingIntent.FLAG_IMMUTABLE, null, new UserHandle(serviceUserId)));
18001800
if (!mContext.bindServiceAsUser(intent, newConn,
18011801
Context.BIND_AUTO_CREATE | Context.BIND_SHOWING_UI
18021802
| Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE,

0 commit comments

Comments
 (0)