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)
committerAnis Assi <anisassi@google.com>
Thu, 12 Mar 2020 20:34:26 +0000 (13:34 -0700)
commitd37eb96212c6fe4819c66bd0a1e0a2f9f7501602
treeb91aeeede318d557b8e0de8ee6dce09ec6172e00
parentc6fd63a7a80f06a89b34aa1894694922c3af9f20
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:com.android.server.am.ActivityStackTests
Change-Id: I60732f430256d37cb926d08d093581f051c4afed
(cherry picked from commit 0d7e27af30e39fbb6dcafedc854daa639074e5cc)
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