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

Commit cd5631f2 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Fix regression in recents animation consumer touchable region" into...

Merge "Fix regression in recents animation consumer touchable region" into udc-dev am: 064a7032 am: 2e79765d

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



Change-Id: Id862b32dd8ceffbace9d7708914678a059b2ec9f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5db7cf15 2e79765d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import static com.android.server.wm.WindowManagerService.LOGTAG_INPUT_FOCUS;
import static java.lang.Integer.MAX_VALUE;

import android.annotation.Nullable;
import android.graphics.Rect;
import android.graphics.Region;
import android.os.Handler;
import android.os.IBinder;
@@ -558,7 +559,8 @@ final class InputMonitor {
        private boolean mAddWallpaperInputConsumerHandle;
        private boolean mAddRecentsAnimationInputConsumerHandle;

        boolean mInDrag;
        private boolean mInDrag;
        private final Rect mTmpRect = new Rect();

        private void updateInputWindows(boolean inDrag) {
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "updateInputWindows");
@@ -582,8 +584,11 @@ final class InputMonitor {
                layer = layer != null ? layer : activeRecents;
                // Handle edge-case for SUW where windows don't exist yet
                if (layer.getSurfaceControl() != null) {
                    mRecentsAnimationInputConsumer.mWindowHandle
                            .replaceTouchableRegionWithCrop(layer.getSurfaceControl());
                    final WindowState targetAppMainWindow = activeRecents.findMainWindow();
                    if (targetAppMainWindow != null) {
                        targetAppMainWindow.getBounds(mTmpRect);
                        mRecentsAnimationInputConsumer.mWindowHandle.touchableRegion.set(mTmpRect);
                    }
                    mRecentsAnimationInputConsumer.show(mInputTransaction, layer);
                    mAddRecentsAnimationInputConsumerHandle = false;
                }