OSDN Git Service

[RESTRICT AUTOMERGE] Pass correct realCallingUid to startActivity() if provided by...
authorBryan Ferris <bferris@google.com>
Tue, 21 May 2019 19:38:19 +0000 (12:38 -0700)
committerJP Sugarbroad <jpsugar@google.com>
Wed, 7 Aug 2019 21:12:56 +0000 (14:12 -0700)
commitdcd427cceec17ace13a1808a94bbe1961272277a
treedcae6babb396c6ad0e861cd0d4d525fbadf11811
parent36168195b48231f044bd4af23ea667fa1b514c6d
[RESTRICT AUTOMERGE] Pass correct realCallingUid to startActivity() if provided by PendingIntentRecord#sendInner()

Previously we'd ignore realCallingPid and realCallingUid that
PendingIntentRecord#sendInner() provided to startActivityInPackage().
Now we correctly pass it on, preserving past behaviour if none
provided.

Test: manual; we added logging statements to check the value of realCallingUid
in startActivitiesMayWait when launching the calendar app from the calendar widget
and verified that it was the calendar uid rather than the system uid.

Bug: 123013720
Change-Id: I0ef42c2f89b537a720f1ad5aefac756b0ccac52e
Merged-In: I0ef42c2f89b537a720f1ad5aefac756b0ccac52e
(cherry picked from commit f5e5af7f3d01e35d43faef897f625b954cfbcc3c)
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStarter.java
services/core/java/com/android/server/am/PendingIntentRecord.java