Commit Graph

340100 Commits

Author SHA1 Message Date
John Reck
32207ceb2f Fix a potential thread safety issue in VectorDrawable
Bug: 158839504
Bug: 185178568
Test: speculative
Change-Id: Id9f229f08fe5897dda25441fbaa15c98f8130de9
2021-06-11 17:20:21 +00:00
lucaslin
0684e7a64a Fix the security issue that preloaded apps can get SSID & BSSID
NetworkMonitor sends "android.net.conn.NETWORK_CONDITIONS_MEASURED"
broadcast with Wifi SSID & BSSID. The receiver of this broadcast
is only required to have "android.permission.ACCESS_NETWORK_CONDITIONS"
permission but not the "android.permission.ACCESS_FINE_LOCATION".
It's incorrect because if the apps want to know the Wifi SSID and
BSSID, they should get the run-time permission with user consent.
Since this broadcast is not used anymore, delete it and the related
code.

Bug: 175213041
Test: atest NetworkStackNextTests NetworkStackTests
Change-Id: I12050737291c7fa0ebff4e7411b91f4c6f57a413
Merged-In: I12050737291c7fa0ebff4e7411b91f4c6f57a413
Merged-In: I7b43940dc32826c70fa82f471b35bc5cb8394aad
2021-05-12 09:15:37 +00:00
Julia Reynolds
3b0fc6bd38 Merge "Restrict alarm broadcast" into oc-mr1-dev 2021-04-27 16:57:51 +00:00
Louis Chang
6820d70823 Detects all activities for whether showing work challenge
Work challenge did not show when a work activity is not on top, but
still visible after screen turns on.

Also show work challenge even if the work activity is behind a top
fullscreen activity of another profile because the user can still
navigate back to the work activity when top activity finishes.

Bug: 177457096
Test: ActivityStackSupervisorTests

Change-Id: I5e09b09be547d04fdfd709cb9cd4bcd4a94bbf21
Merged-In: I5e09b09be547d04fdfd709cb9cd4bcd4a94bbf21
2021-04-19 09:17:19 +00:00
Julia Reynolds
7dfcfe85ae Restrict alarm broadcast
To android only

Test: NotificationManagerTest, NotificationManagerServiceTest
Bug: 175614289
Change-Id: I4f8e56729d90f8f5288d08881129b1c45d5790e7
Merged-In: I4f8e56729d90f8f5288d08881129b1c45d5790e7
(cherry picked from commit abf15b731a)
2021-04-07 20:10:35 +00:00
Chris Tate
6cc887c00d Merge "DO NOT MERGE - Disallow deletion of channels with FGS notifications" into oc-mr1-dev 2021-04-06 16:24:22 +00:00
Beth Thibodeau
8875da5207 Increase maximum allowed size for status bar icons
The previous size was causing some apps to crash which otherwise worked
fine. This more closely matches the hard limit in RecordingCanvas
(which we need to stay below to prevent SystemUI from crashing).

Fixes: 182891864
Fixes: 182232777
Bug: 169255797
Test: atest StatusBarIconViewTest
Test: manual - posting notifications with different drawable sizes
Change-Id: I8deacc651e05a202ec980eeb8bcdf4f92daea8eb
(cherry picked from commit 5cd7976f7d)
2021-04-01 18:16:31 +00:00
Christopher Tate
b320763eb8 DO NOT MERGE - Disallow deletion of channels with FGS notifications
Bug: 156090809
Test: atest CtsAppTestCases:NotificationManagerTest
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Change-Id: I1c2bb78d86f194585d273661cecf3419f51965df
Merged-In: Ie917a4d1b4595a576c4ea5ea079ecc773000abdc
2021-03-19 04:24:37 +00:00
TreeHugger Robot
7e6da1776d Merge "Limit maximum allowed size for a status bar icon" into oc-mr1-dev 2021-03-03 21:05:19 +00:00
TreeHugger Robot
835ab4eb82 Merge "Adds caller check to getAllPackages()" into oc-mr1-dev 2021-03-03 18:05:52 +00:00
yawanng
cca5bf9282 Adds caller check to getAllPackages()
This change enforces that only system, root or shell may call
getAllPackages(), a hidden API that shares all package names regardless
of user, instant app or package visibility rules.

Bug: 174661955
Change-Id: I77460ae19a4d41151577646441f11e2eddbb741a
Merged-In: I77460ae19a4d41151577646441f11e2eddbb741a
(cherry picked from commit 8124efd57b)
2021-03-03 16:04:13 +00:00
TreeHugger Robot
119ebe193f Merge "Add pkg target to snoozing alarm" into oc-mr1-dev 2021-03-03 02:59:18 +00:00
Winson Chiu
ffe45e4497 Revert "Only allow BROWSABLE && DEFAULT Intents to be always opened"
Reason for revert: Punted to future release due to invalid fix

Bug: 175319005

Merged-In: I00b78d596ee05c5a4a228771bbf8082af2b0ab8a
Change-Id: I78284e0a0dd5c41345753cdd2ed9a518db1df930
2021-03-01 20:50:35 +00:00
Julia Reynolds
1433925beb Add pkg target to snoozing alarm
Test: SnoozeHelperTest
Bug: 174493336
Change-Id: I6aaf80a11dcae2eca41d4647411126ed41587027
(cherry picked from commit 6b5813b1f1)
Merged-In: I6aaf80a11dcae2eca41d4647411126ed41587027
2021-02-23 17:47:58 +00:00
Miranda Kephart
84fcb616be Merge "[DO NOT MERGE] Close screenshot process on user switched" into oc-mr1-dev 2021-02-03 14:23:55 +00:00
TreeHugger Robot
5382574928 Merge changes from topic "cdm_overlay-oc-mr1-dev" into oc-mr1-dev
* changes:
  RESTRICT AUTOMERGE Allow CDM to hide overlays
  RESTRICT AUTOMERGE Prevent non-system overlays from showing over CDM UI
2021-02-03 01:07:11 +00:00
Miranda Kephart
8a2656d4b6 [DO NOT MERGE] Close screenshot process on user switched
Currently, we keep the process up even if the user switches,
meaning that in some cases (if the user is switched while the
screenshot UI is up) we will save images to the wrong profile.
This change makes ScreenshotHelper listen for user switches and
close the screenshot service, so that a new screenshot is
guaranteed to be constructed with the correct user's context.

Bug: 170474245
Fix: 170474245
Test: manual -- verified bad state occurs if user switches within
the timeout period, ensured that screenshots work immediately
after switching with this change.

Change-Id: I9d32d0928e6c2bda161d04555438d0dd7afef0ba
(cherry picked from commit 7ef1a5dd15)
2021-01-29 15:03:08 +00:00
Beth Thibodeau
5791303c20 Limit maximum allowed size for a status bar icon
Bug: 169255797
Test: atest StatusBarIconViewTest
Test: verified that app crashes instead of SysUI following repro steps
Change-Id: I66e3bb873841b5babfd522c82cea7bed361fc14c
(cherry picked from commit 4394595deb)
2021-01-28 22:00:23 +00:00
TreeHugger Robot
f4a729180c Merge "Only allow BROWSABLE && DEFAULT Intents to be always opened" into oc-mr1-dev 2021-01-28 21:33:04 +00:00
Rob Carr
e3f7644490 Merge "DO NOT MERGE: WM: Only allow system to use NO_INPUT_CHANNEL." into oc-mr1-dev 2021-01-26 19:27:37 +00:00
Winson
2565d0b3a1 Only allow BROWSABLE && DEFAULT Intents to be always opened
Auto verification of app links requires that an intent filter declare
action=VIEW, scheme=HTTP(S), category=BROWSABLE. However,
PackageManagerService was not taking that into account, missing the
category requirement.

But the app info Settings UI did take category into account, so it was
possible for a user to set an application to automatically open web URIs
without understanding that this also granted domains that were not
visible in the app info UI.

To resolve both this, this change makes it so that both auto
verification and the Settings state can only consider the app as
"always" open only if the Intent contains both BROWSABLE and DEFAULT.

Bug: 175139501
Bug: 175319005

Test: manual, see bug for reproduction steps

Merged-In: Ib957258735893bf2779bed19bd400c6726ee6478
Change-Id: Ib957258735893bf2779bed19bd400c6726ee6478
(cherry picked from commit 4266f938c6)
2021-01-12 16:48:38 +00:00
Robert Carr
9661bf7a40 DO NOT MERGE: WM: Only allow system to use NO_INPUT_CHANNEL.
NO_INPUT_CHANNEL is a hidden WM flag that allows creation of a window
without an input channel. Unfortunately in releases prior to Android R
this would allow creation of a Window which will not be known to the
InputDispatcher at all. This means that the logic generating
FLAG_OBSCURED will work and a window will be able to overlay another
window without the overlayed window being notified. In Android R and
later this isn't a problem as the InputDispatcher is informed of all
windows, input channel or not. For past Android releases, this patch
disables NO_INPUT_CHANNEL for use outside of the WM.

Bug: 152064592
Test: Existing tests pass
Change-Id: I7e1f45cba139eab92e7df88d1e052baba0ae2cc6
2020-12-14 18:32:56 +00:00
Dmitry Dementyev
fedbadf57e Protect account chooser activities against overlay.
Bug: 172841550
Test: manual
Merged-In: I1a16808426934f4a8d12410576d769443e4c2a04
Merged-In: I3cd5a94386f15cf60a7fe3095b00815e4a6485ae
Change-Id: I35dc86b5721a4531447a6d99d6c30f23543130cb
2020-12-14 09:09:18 -08:00
Winson Chiu
2d22fe6eec [automerger skipped] Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-dev am: e9954e149f am: b070447e39 -s ours
am skip reason: Change-Id Iff7f788a83af68c7fbb1c6b9a8be7b47136be2b6 with SHA-1 4e71b31e0c is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12940358

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I346236b82b70e9f4c72648b71b33e22fc1956bf0
2020-12-08 01:03:38 +00:00
Winson Chiu
b070447e39 Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-dev am: e9954e149f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12940358

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1e138583f75173a4d785707fa5fa4320c986a1d2
2020-12-08 00:46:04 +00:00
Winson Chiu
9109ce178e Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-mr1-dev 2020-12-08 00:26:44 +00:00
Winson Chiu
e9954e149f Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-dev 2020-12-08 00:26:38 +00:00
Eugene Susla
6a5777dd50 RESTRICT AUTOMERGE
Allow CDM to hide overlays

Since CDM has sensitive user consent UIs, it should be able to hide
non-system overlays

Test: use a 3p overlay app with a visible overlay to ensure overlay disappears when CDM is shown
Bug: 171221090
Change-Id: I3274cb7f03f63e1fa99a9ca06759972ce2a51309
2020-12-07 15:38:56 -08:00
Eugene Susla
9cbc2c3d36 RESTRICT AUTOMERGE
Prevent non-system overlays from showing over CDM UI

Since CDM grants privileges, it should have the same overlay
policy as permission UI

Test: use an app wit ha visible overlay to ensure
the overlay disappears when CDM is shown
Fixes: 171221090

Change-Id: I4daaee7d8b710a72f6166cbb2252ef8af84c2c60
2020-12-07 15:23:34 -08:00
TreeHugger Robot
9064940495 Merge "Revoke the uri permission when the file is deleted" into oc-mr1-dev 2020-12-03 08:05:44 +00:00
Varun Shah
79062d7903 RESTRICT AUTOMERGE
Ensure caller identity is restored in CP quick-path.

Bug: 172935267
Test: PoC in bug
Change-Id: I469bde7d0a0f89c94f1234cf40983395048962e2
2020-11-23 14:24:23 -08:00
Dmitry Dementyev
f312c9e864 Protect GrantCredentialsPermissionActivity against overlay. am: deddb784d0 am: 21e36702cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13021294

Change-Id: I3fe44a233948b572499797f954c304ab40d02f35
2020-11-11 14:23:35 +00:00
Dmitry Dementyev
21e36702cd Protect GrantCredentialsPermissionActivity against overlay. am: deddb784d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13021294

Change-Id: I37e60418b8f67f3223692d370ced45aae46a706f
2020-11-11 14:02:42 +00:00
Dmitry Dementyev
deddb784d0 Protect GrantCredentialsPermissionActivity against overlay.
Bug: 169763814
Test: manual
Merged-In: I15dd22791fcc61ef02b06ad51d9e4409d11c0181
Change-Id: I0d8f901d100a5e2a022c96fa6c2be75a11c58059
2020-11-10 20:48:09 +00:00
TreeHugger Robot
e0efbc5fbb Merge "Check that Account Parcel has name and type." into oc-dev am: 3349eaa9e8 am: 01f2d401c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12999920

Change-Id: I0e4803e7aafd730b9e21e49dc350ee51eedf42d8
2020-11-10 19:56:49 +00:00
TreeHugger Robot
01f2d401c9 Merge "Check that Account Parcel has name and type." into oc-dev am: 3349eaa9e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12999920

Change-Id: Id4c8eb30ffbe0886360dcd3bde1ada4f08ffdefa
2020-11-10 19:40:01 +00:00
TreeHugger Robot
3349eaa9e8 Merge "Check that Account Parcel has name and type." into oc-dev 2020-11-10 19:22:49 +00:00
Curtis Belmonte
e422433ae5 [automerger skipped] Merge "DO NOT MERGE Check fingerprint client against top activity in auth callback" into oc-dev am: 4cf0088dee am: a10d4f4317 -s ours
am skip reason: Change-Id I0707c3f55eaf2a69c6625a3ceb3b5626b3676b26 with SHA-1 7786f4908f is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12769285

Change-Id: I43d39fd10853543d296e024b3464fca66f6b34eb
2020-11-09 23:39:07 +00:00
Curtis Belmonte
efa94e557f [automerger skipped] DO NOT MERGE Check fingerprint client against top activity in auth callback am: bb5706541d am: bfd504c81a -s ours
am skip reason: Change-Id I0707c3f55eaf2a69c6625a3ceb3b5626b3676b26 with SHA-1 7786f4908f is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12769285

Change-Id: I3997d0b923b8e52b1bc0c0cc474b35f5b65525be
2020-11-09 23:39:04 +00:00
Miranda Kephart
a4fbde5687 Merge "[DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable" into oc-dev am: d15b2f5bce am: 0d82d9ffc9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12773217

Change-Id: Ie068c0cc838f65a20ab224a3c218ee8221e9f700
2020-11-09 23:38:54 +00:00
Miranda Kephart
368eecbec0 [DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable am: 441247985a am: 40297a24eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12773217

Change-Id: I6627407f13c27260f35c3b732390a9d5e2baaed1
2020-11-09 23:38:46 +00:00
Curtis Belmonte
a10d4f4317 Merge "DO NOT MERGE Check fingerprint client against top activity in auth callback" into oc-dev am: 4cf0088dee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12769285

Change-Id: I5f5fb3974e2912c7b9e7834f98cb7c20daac9fa3
2020-11-09 23:29:37 +00:00
Curtis Belmonte
bfd504c81a DO NOT MERGE Check fingerprint client against top activity in auth callback am: bb5706541d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12769285

Change-Id: I732e5a1c826f728b683078884e02b0756ae59ae2
2020-11-09 23:29:34 +00:00
Miranda Kephart
0d82d9ffc9 Merge "[DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable" into oc-dev am: d15b2f5bce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12773217

Change-Id: I56aea4db33904c98006278873273f98963e9e7ce
2020-11-09 23:27:13 +00:00
Miranda Kephart
40297a24eb [DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable am: 441247985a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12773217

Change-Id: I070580ecb1be0ff94e4940487f3d68e04149b862
2020-11-09 23:27:10 +00:00
Curtis Belmonte
4cf0088dee Merge "DO NOT MERGE Check fingerprint client against top activity in auth callback" into oc-dev 2020-11-09 21:36:29 +00:00
Curtis Belmonte
1a673296ae Merge "DO NOT MERGE Check fingerprint client against top activity in auth callback" into oc-mr1-dev 2020-11-09 21:36:29 +00:00
Miranda Kephart
d15b2f5bce Merge "[DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable" into oc-dev 2020-11-09 21:01:50 +00:00
Miranda Kephart
09b6ab6bdf Merge "[DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable" into oc-mr1-dev 2020-11-09 18:28:56 +00:00
Philip P. Moltmann
37beb3172b Merge changes from topic "12940341" into oc-dev am: a9a03ae669 am: b172aaf747
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12987876

Change-Id: I90e00bb137edc75878d99f849631db40cd7ffa17
2020-11-09 18:04:05 +00:00