Commit Graph

648740 Commits

Author SHA1 Message Date
Vishnu Nair
6ac8376cd7 Drop input for toast and child surfaces
Toasts that do not have the trustedOverlay flag should not receive input.
These windows should not have any children, so force this hierarchy of
windows to drop all input by setting a flag on the toast window state
which will apply the DROP_INPUT flag on all windows with an input
channel. This is to prevent malicious apps from parenting surfaces with
input channels to the toast window.

Test: show toast and check if input feature flag DROP_INPUT id set via dumpsys
Bug: b/197296414

Merged-In: I316b76b685ca5030fd8aa91283555efcce4d6994
Change-Id: I316b76b685ca5030fd8aa91283555efcce4d6994
2022-02-04 02:14:42 +00:00
Vishnu Nair
a84612483f SurfaceControl: Add setDropInputMode api
Introduces an API to drop input events on this SurfaceControl. This
policy will be inherited by its children. The caller must hold the
ACCESS_SURFACE_FLINGER permission.

Options include:
ALL: SurfaceControl and its children will not receive any
input regardless of whether it has a valid input channel.

These policies are used to enable features that allow for a less trusted
interaction model between apps. See the bug for more details.

Note: this backport doesn't include the oclude mode since its not
needed for the security fix.

Test: atest libgui_test InputDispatcherDropInputFeatureTest
Bug: 197296414


Merged-In: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
Change-Id: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
2022-02-02 16:50:46 +00:00
TreeHugger Robot
788d9efaca Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-12-23 18:26:16 +00:00
TreeHugger Robot
840efa7fde Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-12-23 18:25:59 +00:00
TreeHugger Robot
9d92c6b62d Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-12-23 18:25:52 +00:00
TreeHugger Robot
3c530488c1 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-12-23 18:25:49 +00:00
TreeHugger Robot
3e5b3c9c99 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-12-23 18:24:19 +00:00
TreeHugger Robot
cab1c01837 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-12-23 18:20:17 +00:00
TreeHugger Robot
d114d60575 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-12-23 18:19:47 +00:00
Lucas Lin
34137fbbff Merge "Prevent an app to check if the specified VPN app is set VPN always-on" into sc-dev 2021-12-23 12:14:44 +00:00
TreeHugger Robot
5179b1de82 Merge "Add ALLOW_SLIPPERY_TOUCHES permission" into sc-dev 2021-12-23 06:40:10 +00:00
Nate Myren
e904d48c7e Merge "Get fresh InProgress array in AttributedAppOp when adding/removing" into sc-dev 2021-12-22 20:04:29 +00:00
Bill Yi
3882ba3ec2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I5cf56af01587234162633a0e5137f37228fa3d2a
2021-12-22 16:44:29 +00:00
Bill Yi
04db84453d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I8d981af7df6557424bbcb041bc6b2d81b3c6d65f
2021-12-22 16:21:14 +00:00
TreeHugger Robot
291f266c99 Merge "Adding native flag namespace for lmkd." into sc-dev 2021-12-22 09:24:29 +00:00
lucaslin
46eb3bead1 Prevent an app to check if the specified VPN app is set VPN always-on
An app can check if the specified VPN app is set VPN always-on
or not by calling VpnManagerService#prepareVpn(). If it sets
oldPackage to null and newPackage to a specified VPN app which
is set always-on, then prepareVpn() will return true. So the app
could know the specified VPN app is installed and it's set
always-on.

Bug: 191276656
Test: atest FrameworksNetTests CtsNetTestCases \
      CtsHostsideNetworkTests:HostsideVpnTests
Change-Id: I0013039f58a6f7c5c73b9acc877d70a0126d0ca7
Merged-In: I0013039f58a6f7c5c73b9acc877d70a0126d0ca7
2021-12-22 07:03:51 +00:00
Bill Yi
11bff8cdae Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I47b0e0716e1d7c6670358e6f7ff8d987a9ceba8d
2021-12-22 03:48:39 +00:00
Bill Yi
a8a62a09ed Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I65fde50bcc3b87742da5e72fc06e822391b09be6
2021-12-22 03:10:36 +00:00
TreeHugger Robot
ba10bacbce Merge "Do not let QS handle touches where clipped." into sc-dev 2021-12-22 03:08:18 +00:00
Bill Yi
aa47ea2f4c Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ib14aa3bb813e93fc883230392b2e1b08b1026507
2021-12-22 02:59:43 +00:00
TreeHugger Robot
6251ebfb65 Merge "[DO NOT MERGE] Use orientation value from config change event" into sc-dev 2021-12-22 02:49:15 +00:00
TreeHugger Robot
d8610fbe51 Merge "Hide security footer container (QSBH) in portrait" into sc-dev 2021-12-22 02:48:20 +00:00
Bill Yi
5a357585ba Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I3d282e4403e503e4dc7d9cfffd43355ff4720fd5
2021-12-22 02:11:27 +00:00
TreeHugger Robot
cebca176d7 Merge "Cancel the existing recents animation before any initialization" into sc-dev 2021-12-22 01:50:59 +00:00
Bill Yi
3e73fdc352 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ia3eb210927b54d15ab564678aefee927e114eb09
2021-12-21 23:36:47 +00:00
TreeHugger Robot
d47e6d84d1 Merge "Don't allow background apps to change theme" into sc-dev 2021-12-21 23:23:06 +00:00
TreeHugger Robot
6c21f29b32 Merge "Fixed an issue where the statusbar was made opaque even though it wasnt" into sc-dev 2021-12-21 23:22:22 +00:00
TreeHugger Robot
3e46e3bd10 Merge "Revert "Increase debounce time for DISCONNECT processing"" into sc-dev 2021-12-21 18:39:47 +00:00
Nate Myren
f14e212d82 Get fresh InProgress array in AttributedAppOp when adding/removing
Otherwise, a call to finish() and then start() might reallocate the
array, and cause the reference to point to the old location of the
array.

Fixes: 208662370
Test: atest ForegroundModeAndActiveTest
Change-Id: I7e754c067520765c00cc67cc310926e63bd0462d
Merged-In: I7e754c067520765c00cc67cc310926e63bd0462d
2021-12-21 00:12:53 +00:00
Jeff DeCew
705574bfc4 Do not let QS handle touches where clipped.
Fixes: 196002042
Fixes: 199657455
Bug: 193350347
Bug: 188249360
Test: tap the status bar; unable to trigger any QS tile
Test: drag the QS open by a few mm; unable to trigger any QS tile
Test: open shade, scroll notifications to partially obscure a QS tile; tile is pressable down to the clip, but when clicking below the clip, the default "collapse shade" behavior kicks in.
Test: expand QS with 2 fingers; opens fully expanded QS
Test: fingerprint unlock; expand shade with 1 finger; occasionally opens fully expanded shade: b/193350347

Merged-In: Ie264ee69570f72f5653b423a8649663e3aab1df9
Change-Id: Ie264ee69570f72f5653b423a8649663e3aab1df9
(cherry picked from commit dab0ff498b)
2021-12-16 21:34:53 +00:00
Jeff DeCew
85978872b9 Merge "Fix shade flicker & touch absorption" into sc-dev 2021-12-16 21:30:25 +00:00
Siarhei Vishniakou
d732692ba7 Add ALLOW_SLIPPERY_TOUCHES permission
This permission allows the app to use FLAG_SLIPPERY. This means, windows
of the app that has this permission can let touches slip out when the
finger moves out of the window bounds.

Bug: 157929241
Bug: 206188649
Test: atest FlagSlipperyTest
Change-Id: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
Merged-In: I9ccdfd298f32c36b9c4da68c2e9c355c97dc7593
2021-12-15 21:51:22 +00:00
Bill Yi
5561314b22 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: If21eab798876aa48db269aa93e80f421e6ce0b3f
2021-12-15 20:31:27 +00:00
Winson Chung
7d6151c61e Cancel the existing recents animation before any initialization
- In the rare case that we are canceling the recents animation as a
  part of starting another recents animation, ensure that we do it
  before we move the target activity to be visible, otherwise the
  cancelation will undo the previous work.

Bug: 193851085
Test: atest RecentsAnimationControllerTest
Change-Id: I22589a034eab3b1fab10f4b677f777b282305bbd
Merged-In: I22589a034eab3b1fab10f4b677f777b282305bbd
(cherry picked from commit 4ebdbc9db1)
2021-12-15 05:45:33 +00:00
Tomasz Wasilczyk
2555c0e410 [automerger skipped] Don't crash if default supervision profile owner is not set am: b5fa0a6c5e am: d9537a765e -s ours
am skip reason: Merged-In If441946fa278c04ae88122f6243f5a7dedd96ebc with SHA-1 b5fa0a6c5e is already in history

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

Change-Id: Ib957cf4f2aded2bd2ea10ba2ca43b029c1f88308
2021-12-14 20:35:05 +00:00
Tomasz Wasilczyk
c9e264737b [automerger skipped] Don't crash if default supervision profile owner is not set am: b5fa0a6c5e am: cb447a87bc -s ours
am skip reason: Merged-In If441946fa278c04ae88122f6243f5a7dedd96ebc with SHA-1 bcb5ee6f43 is already in history

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

Change-Id: I58cc9d3a50a829e1eb9a9bc5625bc894fa099d97
2021-12-14 20:25:00 +00:00
Tomasz Wasilczyk
d9537a765e Don't crash if default supervision profile owner is not set am: b5fa0a6c5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16460072

Change-Id: I8a1c43b4f43cee5c88f05eafed4b71a5b1144445
2021-12-14 20:07:05 +00:00
Tomasz Wasilczyk
cb447a87bc Don't crash if default supervision profile owner is not set am: b5fa0a6c5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16460072

Change-Id: I553dd02243dbebc7267bff208a644ae41151dc92
2021-12-14 20:05:04 +00:00
Tomasz Wasilczyk
b5fa0a6c5e Don't crash if default supervision profile owner is not set
Bug: 175430552
Bug: 197399948
Test: build, flash, watch logcat

Change-Id: If441946fa278c04ae88122f6243f5a7dedd96ebc
Merged-In: If441946fa278c04ae88122f6243f5a7dedd96ebc
(cherry picked from commit bd27c36591)
(cherry picked from commit bcb5ee6f43)
2021-12-14 19:18:47 +00:00
James Wei
54f4c1843d Revert "Increase debounce time for DISCONNECT processing"
This reverts commit 5a14ba6861.
(from AOSP)

Bug: 207057578
Test: manual: switch to MTP mode then re-plug

Change-Id: I1e0b33395e164e566df6c8b5007e4cc1d5cd73b9
2021-12-13 02:54:01 +00:00
Remi NGUYEN VAN
7814c61670 [automerger skipped] Merge "Disable the test (1/n)" into rvc-dev am: d994d146c2 am: 33a0a408f4 -s ours
am skip reason: Merged-In Ibb921b8e718c5c9cd86c5580010cb163125d8fae with SHA-1 50aa93d6af is already in history

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

Change-Id: Ic69427a4aadcbead09d1efef2ad866a2db4f977f
2021-12-10 02:38:41 +00:00
Remi NGUYEN VAN
58a85e0738 [automerger skipped] Merge "Disable the test (1/n)" into rvc-dev am: d994d146c2 am: d793b3396e -s ours
am skip reason: Merged-In Ibb921b8e718c5c9cd86c5580010cb163125d8fae with SHA-1 50aa93d6af is already in history

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

Change-Id: I99cdc5614f62c59aefa5ed900d7346732803137f
2021-12-10 02:27:31 +00:00
Remi NGUYEN VAN
33a0a408f4 Merge "Disable the test (1/n)" into rvc-dev am: d994d146c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375870

Change-Id: I0608080ff7ed174d3456c2b2b2ab8783cf83bdcc
2021-12-10 02:05:12 +00:00
Remi NGUYEN VAN
d793b3396e Merge "Disable the test (1/n)" into rvc-dev am: d994d146c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375870

Change-Id: I7f65b792e08ac5d9d3ae95d7cbb829bd86c0932e
2021-12-10 02:05:08 +00:00
Remi NGUYEN VAN
d994d146c2 Merge "Disable the test (1/n)" into rvc-dev 2021-12-10 01:47:56 +00:00
Ganesh Olekar
336d802268 [automerger skipped] Merge "DO NOT MERGE Re-implement reading/writing Throwables from/to Parcel, without Parcel private APIs." into rvc-dev am: 5b0fc9279c am: 0ce5f01cbe -s ours
am skip reason: subject contains skip directive

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

Change-Id: I74da75e64940b81aef9dd92ba5cb914d5841d0a8
2021-12-09 17:49:56 +00:00
Hai Zhang
2cbcda5198 [automerger skipped] DO NOT MERGE Re-implement reading/writing Throwables from/to Parcel, without am: 562f1bd91f am: c761c3a511 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I2c7655e7f7ee109515b9e349c115453156547ecc
2021-12-09 17:49:30 +00:00
Ganesh Olekar
6590d4b563 [automerger skipped] Merge "DO NOT MERGE Re-implement reading/writing Throwables from/to Parcel, without Parcel private APIs." into rvc-dev am: 5b0fc9279c am: a7ec803849 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I7b70afc8f7e38d6039d14f2452aa471af72d6f17
2021-12-09 17:48:34 +00:00
Hai Zhang
2ecd6d628a [automerger skipped] DO NOT MERGE Re-implement reading/writing Throwables from/to Parcel, without am: 562f1bd91f am: b641a97b4d -s ours
am skip reason: subject contains skip directive

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

Change-Id: Id1e1926577304e8cd2485044305db696cc25126c
2021-12-09 17:48:14 +00:00
Ganesh Olekar
a7ec803849 Merge "DO NOT MERGE Re-implement reading/writing Throwables from/to Parcel, without Parcel private APIs." into rvc-dev am: 5b0fc9279c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16406531

Change-Id: I343a75e0c797203429cbf4b329dca66d72d65f77
2021-12-09 17:27:05 +00:00