OSDN Git Service

RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo
authorRiddle Hsu <riddlehsu@google.com>
Tue, 3 Mar 2020 06:36:21 +0000 (14:36 +0800)
committerRiddle Hsu <riddlehsu@google.com>
Wed, 11 Mar 2020 06:28:55 +0000 (06:28 +0000)
commit1c9bf5cc54d0b32d8f3046c452e710b017c477c0
treee95fbaed50aacd363ca964a304d0fe235ceea98e
parentab012da3a2ee2f85dd940a662859915bbd93a7d7
RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo

Originally, if the caller of navigateUpTo is alive, even the calling
uid is set to the caller who launched the existing destination activity,
the uid from caller process has higher priority to replace the given
calling uid. So this change doesn't modify the existing behavior if
the caller process is valid. Besides, the case of delivering new intent
uses the source record as calling identity too, so the case of starting
new activity should be consistent.

Also forbid attaching null application thread to avoid unexpected state
in process record.

Bug: 144285917
Test: bit FrameworksServicesTests:ActivityStackTests
Test: bit CtsSecurityTestCases:ActivityManagerTest# \
      testActivityManager_attachNullApplication
Merged-In: I60732f430256d37cb926d08d093581f051c4afed
Change-Id: I60732f430256d37cb926d08d093581f051c4afed
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStack.java
services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java