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

Commit 9b6152b3 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: b5a67d39

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



Change-Id: I959053674d19e36419969634b4d40989e0cd955e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b5ee2c85 b5a67d39
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;
                }