OSDN Git Service

[RESTRICT AUTOMERGE] Pass correct realCallingUid to startActivity() if provided by...
authorBryan Ferris <bferris@google.com>
Wed, 5 Jun 2019 01:02:55 +0000 (18:02 -0700)
committerBryan Ferris <bferris@google.com>
Thu, 6 Jun 2019 21:28:39 +0000 (21:28 +0000)
commitb255e64a5d282f860bd58ae8f85158b5badce7ba
treed366be9ecfdd87fcb02cdd3253cd91a6140f93ba
parentfbc22c2b6d54a8a9b589746be67d3992f01212cc
[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: If0c0b67880c2e7a8774f31fbb1ba5f50544d2972
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStartController.java
services/core/java/com/android/server/am/ActivityStarter.java
services/core/java/com/android/server/am/PendingIntentRecord.java