Commit Graph

370813 Commits

Author SHA1 Message Date
Eugene Susla
80d043197c [automerger skipped] RESTRICT AUTOMERGE am: 6a5777dd50 -s ours
am skip reason: subject contains skip directive

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia736a9acfe1f91e2a8d86cb8b7221a1472e5195f
2021-02-03 01:33:43 +00:00
TreeHugger Robot
99e5a28c5b Merge changes from topic "cdm_overlay-pi-dev" into pi-dev
* changes:
  RESTRICT AUTOMERGE Allow CDM to hide overlays
  RESTRICT AUTOMERGE Prevent non-system overlays from showing over CDM UI
2021-02-02 23:03:57 +00:00
TreeHugger Robot
47fb5ee20c Merge "Only allow BROWSABLE && DEFAULT Intents to be always opened" into pi-dev 2021-01-29 01:42:55 +00:00
TreeHugger Robot
df0b2e9939 [automerger skipped] Merge "Only allow BROWSABLE && DEFAULT Intents to be always opened" into oc-mr1-dev am: f4a729180c -s ours
am skip reason: skipped by user chiuwinson

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I679f76f348dfc1d72eb42e3704faa8208409ef0c
2021-01-28 22:53:40 +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
aa682dec92 [automerger skipped] Merge "DO NOT MERGE: WM: Only allow system to use NO_INPUT_CHANNEL." into oc-mr1-dev am: e3f7644490 -s ours
am skip reason: subject contains skip directive

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I505e9e636e908e23e3b229262e522dd628d2faff
2021-01-26 19:53:27 +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
Rob Carr
4f162df18e Merge "DO NOT MERGE: WM: Only allow system to use NO_INPUT_CHANNEL." into pi-dev 2021-01-26 19:27:19 +00:00
Yu-Han Yang
579b74d5cb DO NOT MERGE: Do not inject mock location to chipset
Bug: 177561690
Test: on device
Change-Id: Icafbdf54fe807f8779377b13cb4e4eb265db692e
2021-01-21 16:40:13 -08:00
Winson
a154d7a648 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:44 +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
Dmitry Dementyev
e1d00ab8b8 Protect account chooser activities against overlay. am: fedbadf57e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13194523

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iec137ae2642e0a5ac5247e9939c68d65179f02fd
2021-01-06 22:51:41 +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
Robert Carr
0fed2d8e7e 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:39 +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
b8cf8bdb03 [automerger skipped] Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-dev am: e9954e149f am: b070447e39 -s ours am: 2d22fe6eec -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: I64a068ccd312d66a480752097e4f05e1d3903bb7
2020-12-08 02:07:47 +00: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
b2dd5af43b [automerger skipped] Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-mr1-dev am: 9109ce178e -s ours
am skip reason: Change-Id Iff7f788a83af68c7fbb1c6b9a8be7b47136be2b6 with SHA-1 2b1ed5b779 is in history

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icf84df185d39255c4f279831e5d34536edf5cfb6
2020-12-08 00:46:05 +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
Winson Chiu
4837c8a971 Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into pi-dev 2020-12-08 00:26:26 +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
Eugene Susla
486773ff45 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:22:25 -08:00
Eugene Susla
068221bbba 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:07:55 -08:00
TreeHugger Robot
368565aca5 [automerger skipped] Merge "Revoke the uri permission when the file is deleted" into oc-mr1-dev am: 9064940495 -s ours
am skip reason: Change-Id I4ffb183630aadb2d87b0965e8cecf88af15f4534 with SHA-1 c5c373c258 is in history

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

Change-Id: Idbff151067fe8498ebf3c5ee77c49a731537d141
2020-12-03 08:31:25 +00: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
TreeHugger Robot
2b52397d56 Merge "Revoke the uri permission when the file is deleted" into pi-dev 2020-12-03 04:55:15 +00:00
Varun Shah
6f14b9586d [automerger skipped] RESTRICT AUTOMERGE am: 79062d7903 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ic6430aa8cec7406ed69b34e64137b97a83a3a94c
2020-12-02 23:05:39 +00:00
Varun Shah
c99b04ebad RESTRICT AUTOMERGE
Ensure caller identity is restored in CP quick-path.

Bug: 172935267
Test: PoC in bug
Change-Id: I469bde7d0a0f89c94f1234cf40983395048962e2
2020-11-23 14:32:59 -08: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
fe16873a33 Merge "Ignore GrantCredentials call with unexpected calling uid." into pi-dev 2020-11-11 21:11:06 +00:00
Dmitry Dementyev
6717abba6e Protect GrantCredentialsPermissionActivity against overlay. am: deddb784d0 am: 21e36702cd am: f312c9e864
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13021294

Change-Id: Ie0a25150cbbd4aeda11f41df9fecebcac4ba7089
2020-11-11 14:55:07 +00: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
ece586e321 Ignore GrantCredentials call with unexpected calling uid.
Activity can be used only in two cases.
1) Calling uid matches uid grantee.
2) Calling uid is is system. This flow is used by getToken methods with
notifyAuthFailure=true.

Test: Existing CTS tests
Bug: 158480899
Merged-In: I1421c333b6cebb4f7cddcdd8766298f6872e933b
Change-Id: I18af48cf3cb4ad23a3e5b02a8ea1416aa5570dba
2020-11-10 16:08:43 -08:00
Dmitry Dementyev
888ba5ee1a Merge "Revert "Ignore GrantCredentials call with unexpected calling uid."" into pi-dev 2020-11-10 21:44:51 +00:00
Dmitry Dementyev
c1097a8488 Revert "Ignore GrantCredentials call with unexpected calling uid."
This reverts commit 4f0084580d.

Reason for revert: Build breakage - b/172932743

Bug: 172932743
Change-Id: Iee0a5e2b84e5d89a206b099f75a15e714a332ff4
2020-11-10 21:44:34 +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
b2f3dc0083 Merge "Check that Account Parcel has name and type." into oc-dev am: 3349eaa9e8 am: 01f2d401c9 am: e0efbc5fbb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12999920

Change-Id: I72a0a54f22b8ebd457db1c7fa8b3757bc1f0f327
2020-11-10 20:25:01 +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
62a47dcb08 [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: e422433ae5 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ic59ec71635037e566ff2b5f72a24792078e5d559
2020-11-09 23:59:11 +00:00
Curtis Belmonte
6e185d5cad [automerger skipped] DO NOT MERGE Check fingerprint client against top activity in auth callback am: bb5706541d am: bfd504c81a -s ours am: efa94e557f -s ours
am skip reason: subject contains skip directive

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

Change-Id: I812845aaaa0f1556cdd095939e58dbb1620abdea
2020-11-09 23:59:09 +00:00
Miranda Kephart
b1b2354740 [automerger skipped] Merge "[DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable" into oc-dev am: d15b2f5bce am: 0d82d9ffc9 am: a4fbde5687 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Id0fb465308b80daad70c5f896dbc0d77bed796de
2020-11-09 23:59:00 +00:00
Miranda Kephart
b20d5c3add [automerger skipped] [DO NOT MERGE] Make GlobalScreenshot PendingIntents immutable am: 441247985a am: 40297a24eb am: 368eecbec0 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I120c8223081a0eedeb522372032ab524ca4e15c9
2020-11-09 23:58:54 +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