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: atest ActivityStackTests#testNavigateUpTo
Test: atest CtsSecurityTestCases:ActivityManagerTest# \
testActivityManager_attachNullApplication
Change-Id: I60732f430256d37cb926d08d093581f051c4afed
This agent can be attached to an arbitrary Android process with
arguments that cause it to either reset or dump the JaCoCo information
to a provided directory.
Bug: 148178774
Test: manual, used examples in README to test whether it works on a
userdebug_coverage build on cuttlefish
Change-Id: If6cee20046f790676b8085e1ca84652c063295fa
Merged-In: If6cee20046f790676b8085e1ca84652c063295fa
(cherry picked from commit 2d84ae7640)
We can't rely on status bar state changes to update the notification
list. The current user might not be set yet, causing wrong notifications
to become visible.
Fixes: 145135488
Test: manual
Test: atest NotificationStackScrollLayoutTest
Change-Id: I34d1d5f9a751c1d7680a5a5941c39b9fe33a473b
Merged-In: I34d1d5f9a751c1d7680a5a5941c39b9fe33a473b
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 a8fb6dc167 is in history
Change-Id: Ia0198d3592672180b0c2f13010d000c9e3c3e058
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 ef5220e5b2 is in history
Change-Id: I1e39ae47fabb0eb668ac759f1e164771612c582a
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 ef5220e5b2 is in history
Change-Id: I80e44d4cb30a8648df50be2f5fc1b0fd084b3815
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 a8fb6dc167 is in history
Change-Id: I07cddcbfad7f4841ef99796c8a7a64b9a5ac13c4
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 a8fb6dc167 is in history
Change-Id: I1d9a4edd563df9c2a5b40c630517a34a241b3a55
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 ce22265eed is in history
Change-Id: I7cbffcbb84841e9faf9f55d8423bb91c6165a83c
am skip reason: Change-Id Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1 with SHA-1 0a8a1e9d40 is in history
Change-Id: I8fd65309a87e6f428dd9f7ae8112861b5cc856b6
am skip reason: Change-Id Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1 with SHA-1 0a8a1e9d40 is in history
Change-Id: I2d759d07f9ba1e28ee9449161f823354b31f8a13
Assume there is a XmlBlock [X] created by a AssetManager [A]
([A] will have mNumRefs = 2). After [A].close is called
(mNumRefs = 1) and then both [X] and [A] are going to be GCed,
if [A].finalize is called first (nativeDestroy), the later
[X].finalize will invoke [A].xmlBlockGone that triggers the
second nativeDestroy of [A] and leads to crash.
By clearing the mObject in AssetManager.finalize, the
decRefsLocked from other paths won't call nativeDestroy again.
Bug: 136721562
Bug: 144028297
Test: atest AssetManagerTest
Test: Build and install CorePerfTests
adb shell am instrument -w -r --no-hidden-api-checks -e class \
android.app.ResourcesPerfTest#getLayoutAndTravese,android.graphics.perftests.RenderNodePerfTest \
com.android.perftests.core/androidx.test.runner.AndroidJUnitRunner
Change-Id: Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1
Merged-In: Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1
Assume there is a XmlBlock [X] created by a AssetManager [A]
([A] will have mNumRefs = 2). After [A].close is called
(mNumRefs = 1) and then both [X] and [A] are going to be GCed,
if [A].finalize is called first (nativeDestroy), the later
[X].finalize will invoke [A].xmlBlockGone that triggers the
second nativeDestroy of [A] and leads to crash.
By clearing the mObject in AssetManager.finalize, the
decRefsLocked from other paths won't call nativeDestroy again.
Bug: 144028297
Test: atest android.security.cts.AssetManagerTest
Change-Id: Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1
Merged-In: Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1
If a package starts a particular appop both as active and noted, once
one of them is finished (usually noted after 5s), a message will be sent
to callbacks indicating the end of the use. However, the app op may
still be active. This could result in the removal of indicators
prematurely from notifications.
This change prevents that from happening by checking if the app op is
still in use by that combination uid/package (either active or noted)
and not notifying listeners if that's the case.
Test: atest AppOpsControllerTest
Test: use app from bug report. Observe that notification does not lose
the microphone indicator
Bug: 144092031
Merged-In: I180e7c257e6171e7686ba7eda9bf02249358ed0
Change-Id: I94473c3ccf1318dac29f067dade91e540e20285e
am skip reason: Change-Id Iae9c273af822b18c2e6fce04848a86f8dea6410a with SHA-1 d0205a3469 is in history
Change-Id: I9b95f9715b7d15e3f430e6c46a2fd975b6b51f23
am skip reason: Change-Id I2da730feda4d7ebed1f158b073167bb3964b3e7d with SHA-1 9352cb24b1 is in history
Change-Id: Id83288231d705e604e5094d40d211c0c940c4dd4
am skip reason: Change-Id I8ae4e331d09b4734c54cdc6887b273705dce88b1 with SHA-1 bf04ea6d3b is in history
Change-Id: I8dd0a9c26382b390dd7417fe35820abce79fdb92
am skip reason: Change-Id Id4e37c3e4d3ea3ad5fddae5d2c7305e56f50eeea with SHA-1 428a272285 is in history
Change-Id: Ia06b75350be3d1a99972e9763653fb0b6422b131
am skip reason: Change-Id Iae9c273af822b18c2e6fce04848a86f8dea6410a with SHA-1 d0205a3469 is in history
Change-Id: Ifa87cac191ad07937dc70770ff74a9d025131a40
If an app has previously used autoVerify to make claims about its status
re handling web navigation intents, but is updated such that it no
longer makes those claims, step down its "official handler" status as
though it had never invoked autoVerify in the first place.
Bug: 146204120
Test: manual: as described in bug; observe policy before/after via
'adb shell dumpsys package d'
Test: atest CtsOsHostTestCases
Change-Id: I58502d1b32d793aba9aa772fa2ad5ac38acca48a
Merged-In: I58502d1b32d793aba9aa772fa2ad5ac38acca48a