diff options
| author | 2020-05-13 16:09:35 +0800 | |
|---|---|---|
| committer | 2020-05-13 16:09:35 +0800 | |
| commit | d4bd69cef05d379555418a8fe748ec94ff6bd6d0 (patch) | |
| tree | cbd8b233222a7a3613e49c6db7ef64a1f655133f | |
| parent | a24033d8aacc8e96b1fadace0ea1e7e0073335a7 (diff) | |
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
| -rw-r--r-- | services/core/java/com/android/server/wallpaper/WallpaperManagerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java index 63952b086c1c..31fbaff17e78 100644 --- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java @@ -2743,7 +2743,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub mContext, 0, Intent.createChooser(new Intent(Intent.ACTION_SET_WALLPAPER), mContext.getText(com.android.internal.R.string.chooser_wallpaper)), - 0, null, new UserHandle(serviceUserId))); + PendingIntent.FLAG_IMMUTABLE, null, new UserHandle(serviceUserId))); if (!mContext.bindServiceAsUser(intent, newConn, Context.BIND_AUTO_CREATE | Context.BIND_SHOWING_UI | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE |