Make splash screen trusted
Similarly to ag/12986397, touches were being blocked by
go/untrusted-touches when the user started interacting with the app
early on while the splash screen was showing.
Original intent of the window is to let touches pass through
(FLAG_NOT_TOUCHABLE) and it's controlled by the system, so we make it
trusted to allow touches to pass through.
Bug: 171772640
Bug: 158002302
Test: Launch app after clearing it from recents (to make sure there is
no snapshot) and interact with it, verify no toast/logcat message
about untrusted touches.
Change-Id: Ib20d8ce0975e547ec61bec1e3331e5d6aa6127bd
This commit is contained in:
@@ -2418,6 +2418,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
params.privateFlags |=
|
||||
WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
|
||||
params.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
|
||||
// Setting as trusted overlay to let touches pass through. This is safe because this
|
||||
// window is controlled by the system.
|
||||
params.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
|
||||
|
||||
if (!compatInfo.supportsScreen()) {
|
||||
params.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW;
|
||||
|
||||
Reference in New Issue
Block a user