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

Commit 455f51f3 authored by Marvin Ramin's avatar Marvin Ramin
Browse files

Update trusted input overlay

When the SYSTEM_APPLICATION_OVERLAY appops change, also trigger an
update to the input flags.

This helps prevent the overlay consuming all touch events.

Bug: 429985912
Test: manual
Flag: com.android.media.projection.flags.recording_overlay
Change-Id: Ia8e66fa607bb5bcec669acb36b2f78e83b143ca9
parent f5b74ac9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -205,6 +205,10 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
                    Manifest.permission.SYSTEM_APPLICATION_OVERLAY,
                    new AttributionSource(mUid, mPackageName, null))
                    == PermissionManager.PERMISSION_GRANTED;

            for (int i = 0; i < mAddedWindows.size(); i++) {
                mAddedWindows.get(i).updateTrustedOverlay();
            }
        } else {
            mCanCreateSystemApplicationOverlay = mService.mContext.checkCallingOrSelfPermission(
                    SYSTEM_APPLICATION_OVERLAY)