Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c523dd9a authored by Bernardo Rufino's avatar Bernardo Rufino
Browse files

Make ScreenshotAnimation window trusted

In order to let touches pass through due to go/untrusted-touches. This
is safe, UI is wholly controlled by sysUI.

Test: 1. adb shell input keyevent KEYCODE_SYSRQ
      2. Touch outside UI, verify no toast or logcat message
Bug: 158002302
Bug: 172717570
Change-Id: Ie322c60876de32926fb4c795459bf8b3f4b0bb11
parent a0e5a733
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -221,6 +221,8 @@ public class ScreenshotController {
                WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
        mWindowLayoutParams.setFitInsetsTypes(0 /* types */);
        mWindowLayoutParams.token = mWindowToken;
        // This is needed to let touches pass through outside the touchable areas
        mWindowLayoutParams.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;

        mDisplayMetrics = new DisplayMetrics();
        mDisplay.getRealMetrics(mDisplayMetrics);