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
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
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
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
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)
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
- 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)