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

Commit 29bf2c5a authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Make recents animation input consumer focusable"

parents 52ef2d15 b5736162
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -265,6 +265,7 @@ final class InputMonitor {
                consumer.mWindowHandle.layoutParamsFlags |= FLAG_NOT_TOUCH_MODAL;
                break;
            case INPUT_CONSUMER_RECENTS_ANIMATION:
                consumer.mWindowHandle.focusable = true;
                break;
            default:
                throw new IllegalArgumentException("Illegal input consumer : " + name
@@ -545,7 +546,7 @@ final class InputMonitor {

            if (mAddRecentsAnimationInputConsumerHandle && shouldApplyRecentsInputConsumer) {
                if (recentsAnimationController.updateInputConsumerForApp(
                        mRecentsAnimationInputConsumer.mWindowHandle, focusable)) {
                        mRecentsAnimationInputConsumer.mWindowHandle)) {
                    mRecentsAnimationInputConsumer.show(mInputTransaction, w);
                    mAddRecentsAnimationInputConsumerHandle = false;
                }
+1 −3
Original line number Diff line number Diff line
@@ -827,15 +827,13 @@ public class RecentsAnimationController implements DeathRecipient {
                && !isTargetApp(activity) && isAnimatingApp(activity);
    }

    boolean updateInputConsumerForApp(InputWindowHandle inputWindowHandle,
            boolean focusable) {
    boolean updateInputConsumerForApp(InputWindowHandle inputWindowHandle) {
        // Update the input consumer touchable region to match the target app main window
        final WindowState targetAppMainWindow = mTargetActivityRecord != null
                ? mTargetActivityRecord.findMainWindow()
                : null;
        if (targetAppMainWindow != null) {
            targetAppMainWindow.getBounds(mTmpRect);
            inputWindowHandle.focusable = focusable;
            inputWindowHandle.touchableRegion.set(mTmpRect);
            return true;
        }