Commit Graph

418736 Commits

Author SHA1 Message Date
Riddle Hsu
1ec2f403e9 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: atest ActivityStackTests#testNavigateUpTo
Test: atest CtsSecurityTestCases:ActivityManagerTest# \
      testActivityManager_attachNullApplication
Change-Id: I60732f430256d37cb926d08d093581f051c4afed
2020-03-04 12:54:55 +00:00
Chris Ye
02824fc2a9 Merge "Fix serialization issue of ExternalVibration" into qt-dev 2020-02-06 00:12:49 +00:00
Lucas Dupin
01f94b7cc0 Merge "Update redaction upon profile changes" into qt-dev 2020-02-03 23:37:07 +00:00
Oliver Nguyen
3f81e072da Change coverage dump to specify the output file instead of directory.
Bug: 137857876
Test: manual
Change-Id: I2d835856d7a1b6b1ded561eca923f455b39317e4
Merged-In: I2d835856d7a1b6b1ded561eca923f455b39317e4
(cherry picked from commit 05b1c06a91)
2020-02-03 19:08:13 +00:00
Oliver Nguyen
638e92410c Merge "Add JVMTI agent to dump/reset JaCoCo coverage information" into qt-dev 2020-02-03 19:08:06 +00:00
Kavi Gupta
43c9497719 Add JVMTI agent to dump/reset JaCoCo coverage information
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)
2020-02-03 19:07:56 +00:00
Lucas Dupin
44d1c652ce Update redaction upon profile changes
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
2020-02-03 16:25:36 +00:00
Automerger Merge Worker
c321f209c9 [automerger skipped] Merge "Revoke 'always' web handler status when not autoverifying" into oc-dev am: ab012da3a2 am: 0cf31cf467 -s ours am: 41c009d172 -s ours am: 835e3a52bb -s ours
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 a8fb6dc167 is in history

Change-Id: Ia0198d3592672180b0c2f13010d000c9e3c3e058
2020-02-01 01:52:51 +00:00
Automerger Merge Worker
835e3a52bb [automerger skipped] Merge "Revoke 'always' web handler status when not autoverifying" into oc-dev am: ab012da3a2 am: 0cf31cf467 -s ours am: 41c009d172 -s ours
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 ef5220e5b2 is in history

Change-Id: I1e39ae47fabb0eb668ac759f1e164771612c582a
2020-02-01 01:39:31 +00:00
Automerger Merge Worker
41c009d172 [automerger skipped] Merge "Revoke 'always' web handler status when not autoverifying" into oc-dev am: ab012da3a2 am: 0cf31cf467 -s ours
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 ef5220e5b2 is in history

Change-Id: I80e44d4cb30a8648df50be2f5fc1b0fd084b3815
2020-02-01 01:24:48 +00:00
Automerger Merge Worker
5410fb8eb8 [automerger skipped] Merge "Revoke 'always' web handler status when not autoverifying" into oc-mr1-dev am: f98fee618c -s ours am: 6b6f6a2b09 -s ours
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 a8fb6dc167 is in history

Change-Id: I07cddcbfad7f4841ef99796c8a7a64b9a5ac13c4
2020-02-01 01:12:50 +00:00
Automerger Merge Worker
0cf31cf467 Merge "Revoke 'always' web handler status when not autoverifying" into oc-dev am: ab012da3a2
Change-Id: I9515e311ff75532171bd893ddc6f3971a1fdea0c
2020-02-01 01:12:41 +00:00
Automerger Merge Worker
4427828992 [automerger skipped] Merge "Revoke 'always' web handler status when not autoverifying" into pi-dev am: 187f52a4d7 -s ours
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 a8fb6dc167 is in history

Change-Id: I1d9a4edd563df9c2a5b40c630517a34a241b3a55
2020-02-01 01:12:40 +00:00
Automerger Merge Worker
6b6f6a2b09 [automerger skipped] Merge "Revoke 'always' web handler status when not autoverifying" into oc-mr1-dev am: f98fee618c -s ours
am skip reason: Change-Id I58502d1b32d793aba9aa772fa2ad5ac38acca48a with SHA-1 ce22265eed is in history

Change-Id: I7cbffcbb84841e9faf9f55d8423bb91c6165a83c
2020-02-01 01:12:28 +00:00
Chris Tate
2a7eff2057 Merge "Revoke 'always' web handler status when not autoverifying" into qt-dev 2020-02-01 01:01:45 +00:00
Chris Tate
f98fee618c Merge "Revoke 'always' web handler status when not autoverifying" into oc-mr1-dev 2020-02-01 01:01:36 +00:00
Chris Tate
187f52a4d7 Merge "Revoke 'always' web handler status when not autoverifying" into pi-dev 2020-02-01 01:01:35 +00:00
Chris Tate
ab012da3a2 Merge "Revoke 'always' web handler status when not autoverifying" into oc-dev 2020-02-01 01:01:34 +00:00
Alexey Kuzmin
b1a33a8b4f Fix serialization issue of ExternalVibration
Remove excessive serialization of Audio Attributes
Bug: 140417434
Test: atest ExternalVibrationTest#testSerialization

Change-Id: Ib7ceaed875889126a53f874eec64fab4817e48d1
2020-01-30 11:30:04 -08:00
Automerger Merge Worker
b5357be3a9 [automerger skipped] Fix potential double destroy of AssetManager am: 93320661ca am: aefc05c016 am: 8e5d6a25b2 -s ours am: e38a710477 -s ours
am skip reason: Change-Id Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1 with SHA-1 0a8a1e9d40 is in history

Change-Id: I8fd65309a87e6f428dd9f7ae8112861b5cc856b6
2020-01-29 15:29:02 +00:00
Automerger Merge Worker
e38a710477 [automerger skipped] Fix potential double destroy of AssetManager am: 93320661ca am: aefc05c016 am: 8e5d6a25b2 -s ours
am skip reason: Change-Id Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1 with SHA-1 0a8a1e9d40 is in history

Change-Id: I2d759d07f9ba1e28ee9449161f823354b31f8a13
2020-01-29 00:33:48 +00:00
Automerger Merge Worker
8e5d6a25b2 Fix potential double destroy of AssetManager am: 93320661ca am: aefc05c016
Change-Id: I52d6c83fd2585d8fdc5917e72e37dd1c2d11f9e0
2020-01-29 00:20:28 +00:00
Automerger Merge Worker
303d3874f2 Fix potential double destroy of AssetManager am: 0a8a1e9d40
Change-Id: I10010fa2087e7978dc88b1d1e6f6e5d3a4661499
2020-01-29 00:12:51 +00:00
Automerger Merge Worker
aefc05c016 Fix potential double destroy of AssetManager am: 93320661ca
Change-Id: I929bc83477f4698d78cef92d78934f3dd0b3c140
2020-01-29 00:03:12 +00:00
TreeHugger Robot
99fd132c3a Merge "DO NOT MERGE: Adds artificial package handler latency" into qt-dev 2020-01-27 20:08:14 +00:00
Fabian Kozynski
c19818819e Merge "Prevent sending early termination of appop use" into qt-dev 2020-01-23 17:44:28 +00:00
Riddle Hsu
0a8a1e9d40 Fix potential double destroy of AssetManager
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
2020-01-17 18:56:15 +00:00
Ryan Mitchell
93320661ca Fix potential double destroy of AssetManager
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
2020-01-16 20:48:57 +00:00
Fabian Kozynski
1a45963839 Prevent sending early termination of appop use
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
2020-01-14 14:36:26 -05:00
Mohammad Samiul Islam
5d612f02b8 Merge "Fix ModuleInfoProviderTest by passing correct flag" into qt-dev 2020-01-14 16:02:43 +00:00
Mohammad Samiul Islam
3dd716a130 Fix ModuleInfoProviderTest by passing correct flag
Bug: 140941633
Bug: 147476459
Test: atest ModuleInfoProviderTest
Change-Id: Icf93ca7dcf4fc2d7625fe7f9175c59200ae600b6
Merged-In: Icf93ca7dcf4fc2d7625fe7f9175c59200ae600b6
2020-01-10 17:26:27 +00:00
Automerger Merge Worker
c64d1c4649 [automerger skipped] Merge "Fix security problem on PermissionMonitor#hasPermission" into oc-dev am: 5e0b069876 am: 81db8d8a83 am: 5b6d8d7724 -s ours am: d0715a9f07 -s ours
am skip reason: Change-Id Iae9c273af822b18c2e6fce04848a86f8dea6410a with SHA-1 d0205a3469 is in history

Change-Id: I9b95f9715b7d15e3f430e6c46a2fd975b6b51f23
2020-01-09 16:50:47 +00:00
Automerger Merge Worker
92b897e4a8 [automerger skipped] Merge "Fix security problem on PermissionMonitor#hasPermission" into pi-dev am: 361f1e97f6 -s ours
am skip reason: Change-Id I2da730feda4d7ebed1f158b073167bb3964b3e7d with SHA-1 9352cb24b1 is in history

Change-Id: Id83288231d705e604e5094d40d211c0c940c4dd4
2020-01-09 16:50:08 +00:00
Automerger Merge Worker
9ecc8ab3c8 [automerger skipped] Merge changes I8ae4e331,Id4e37c3e,If0fd4834 into oc-dev am: e422bc0c8f am: 43d5e3bb62 am: 929c2c5e1b am: 0cf089521a -s ours
am skip reason: Change-Id I8ae4e331d09b4734c54cdc6887b273705dce88b1 with SHA-1 bf04ea6d3b is in history

Change-Id: I8dd0a9c26382b390dd7417fe35820abce79fdb92
2020-01-09 16:49:00 +00:00
Automerger Merge Worker
e1ca007272 [automerger skipped] Use KNOWN_PACKAGES when shared lib consumers am: 08315953bc am: e580843476 am: d46ef183b1 am: d6f29b2711 -s ours
am skip reason: Change-Id Id4e37c3e4d3ea3ad5fddae5d2c7305e56f50eeea with SHA-1 428a272285 is in history

Change-Id: Ia06b75350be3d1a99972e9763653fb0b6422b131
2020-01-09 16:48:50 +00:00
Automerger Merge Worker
f8f4f28079 [automerger skipped] Handles null outInfo in deleteSystemPackageLI am: 6afabce549 am: ae901aceda am: 3e28284fb8 am: 9f31fb9eaf -s ours
am skip reason: skipped by user patb

Change-Id: I1be1d1947f31c4c9e89f6de3768a578f58511668
2020-01-09 16:48:29 +00:00
Automerger Merge Worker
d0715a9f07 [automerger skipped] Merge "Fix security problem on PermissionMonitor#hasPermission" into oc-dev am: 5e0b069876 am: 81db8d8a83 am: 5b6d8d7724 -s ours
am skip reason: Change-Id Iae9c273af822b18c2e6fce04848a86f8dea6410a with SHA-1 d0205a3469 is in history

Change-Id: Ifa87cac191ad07937dc70770ff74a9d025131a40
2020-01-09 14:06:22 +00:00
Automerger Merge Worker
5b6d8d7724 Merge "Fix security problem on PermissionMonitor#hasPermission" into oc-dev am: 5e0b069876 am: 81db8d8a83
Change-Id: I5660cafce05a0e3c6edff03bd645d8df329c5d50
2020-01-09 13:53:42 +00:00
Automerger Merge Worker
81db8d8a83 Merge "Fix security problem on PermissionMonitor#hasPermission" into oc-dev am: 5e0b069876
Change-Id: I4c255820617a86afdfa239febdd46fff7d082381
2020-01-09 13:40:20 +00:00
TreeHugger Robot
5e0b069876 Merge "Fix security problem on PermissionMonitor#hasPermission" into oc-dev 2020-01-09 13:25:46 +00:00
Paul Hu
361f1e97f6 Merge "Fix security problem on PermissionMonitor#hasPermission" into pi-dev 2020-01-09 08:53:08 +00:00
Paul Hu
97baed2635 Merge "Fix PermissionMonitor issues" into qt-dev 2020-01-09 05:41:52 +00:00
Christopher Tate
ef5220e5b2 Revoke 'always' web handler status when not autoverifying
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
2020-01-08 18:50:59 -08:00
Automerger Merge Worker
0cf089521a Merge changes I8ae4e331,Id4e37c3e,If0fd4834 into oc-dev am: e422bc0c8f am: 43d5e3bb62 am: 929c2c5e1b
Change-Id: I59ffea6df5c62eb899b3603c8767318e96af195a
2020-01-09 01:50:54 +00:00
Automerger Merge Worker
d6f29b2711 Use KNOWN_PACKAGES when shared lib consumers am: 08315953bc am: e580843476 am: d46ef183b1
Change-Id: I6a21d79dc45635a49540f5d821094925b2e71d01
2020-01-09 01:50:38 +00:00
Automerger Merge Worker
9f31fb9eaf Handles null outInfo in deleteSystemPackageLI am: 6afabce549 am: ae901aceda am: 3e28284fb8
Change-Id: Ib34f13ac3d1e34dbe639dc19c1c664aab9d7f17d
2020-01-09 01:50:24 +00:00
Automerger Merge Worker
929c2c5e1b Merge changes I8ae4e331,Id4e37c3e,If0fd4834 into oc-dev am: e422bc0c8f am: 43d5e3bb62
Change-Id: I5df542202c561a4ed931b918ccbaed317a8ba942
2020-01-09 01:04:14 +00:00
Automerger Merge Worker
d46ef183b1 Use KNOWN_PACKAGES when shared lib consumers am: 08315953bc am: e580843476
Change-Id: I64af9ee49999f2de11f1a6779e116357649f63b2
2020-01-09 01:03:58 +00:00
Automerger Merge Worker
3e28284fb8 Handles null outInfo in deleteSystemPackageLI am: 6afabce549 am: ae901aceda
Change-Id: I2741bc7999cd2b1c1e16b982791f72e3023361c7
2020-01-09 01:03:45 +00:00
Automerger Merge Worker
43d5e3bb62 Merge changes I8ae4e331,Id4e37c3e,If0fd4834 into oc-dev am: e422bc0c8f
Change-Id: I7efbfda4517e46abf406fd53487836704a941a2e
2020-01-09 00:08:31 +00:00