Fix issue with permission check for shortcuts and pendingIntent
When launching a PendingIntent, we have two sets of activity options: One supplied from the caller that obtained the pending intent, and those supplied from the caller that is sending it. We need to perform the permission check depending on which caller the options are coming from. For that, we introduce SafeActivityOptions that records the callingPid/callingUid when obtaining it and checks for the permissions with the correct callingPid/callingUid, and also supports merging both activity options. In addition to that, fix shortcuts by not clearing caller identity in LauncherAppsService. Test: go/wm-smoke Test: Install custom launcher APK with animation for shortcuts enabled, make sure launch works properly. Bug: 64674361 Change-Id: I9a854d43c65c8fa69bf16ccfbed86e8e681a095b
Loading
Please register or sign in to comment