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

Commit a66feaa0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Request focus on recents animation input consumers" into sc-dev am: c4684fc7

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia745fed6d5cacd017d45be743017022a7c521577
parents 2e7290bd c4684fc7
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -811,6 +811,12 @@
      "group": "WM_DEBUG_STATES",
      "at": "com\/android\/server\/wm\/Task.java"
    },
    "-1159577965": {
      "message": "Focus requested for input consumer=%s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_FOCUS_LIGHT",
      "at": "com\/android\/server\/wm\/InputMonitor.java"
    },
    "-1156118957": {
      "message": "Updated config=%s",
      "level": "DEBUG",
@@ -823,12 +829,6 @@
      "group": "WM_DEBUG_REMOTE_ANIMATIONS",
      "at": "com\/android\/server\/wm\/NonAppWindowAnimationAdapter.java"
    },
    "-1144293044": {
      "message": "SURFACE SET FREEZE LAYER: %s",
      "level": "INFO",
      "group": "WM_SHOW_TRANSACTIONS",
      "at": "com\/android\/server\/wm\/WindowStateAnimator.java"
    },
    "-1142279614": {
      "message": "Looking for focus: %s, flags=%d, canReceive=%b, reason=%s",
      "level": "VERBOSE",
+18 −5
Original line number Diff line number Diff line
@@ -410,15 +410,19 @@ final class InputMonitor {
            return;
        }

        requestFocus(focusToken, focus.getName());
    }

    private void requestFocus(IBinder focusToken, String windowName) {
        if (focusToken == mInputFocus) {
            return;
        }

        mInputFocus = focusToken;
        mInputTransaction.setFocusedWindow(mInputFocus, focus.getName(), mDisplayId);
        EventLog.writeEvent(LOGTAG_INPUT_FOCUS, "Focus request " + focus,
        mInputTransaction.setFocusedWindow(mInputFocus, windowName, mDisplayId);
        EventLog.writeEvent(LOGTAG_INPUT_FOCUS, "Focus request " + windowName,
                "reason=UpdateInputWindows");
        ProtoLog.v(WM_DEBUG_FOCUS_LIGHT, "Focus requested for window=%s", focus);
        ProtoLog.v(WM_DEBUG_FOCUS_LIGHT, "Focus requested for window=%s", windowName);
    }

    void setFocusedAppLw(ActivityRecord newApp) {
@@ -470,6 +474,8 @@ final class InputMonitor {

        boolean mInDrag;

        private boolean mRecentsAnimationFocusOverride;

        private void updateInputWindows(boolean inDrag) {
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "updateInputWindows");

@@ -485,10 +491,16 @@ final class InputMonitor {
            mInDrag = inDrag;

            resetInputConsumers(mInputTransaction);

            mRecentsAnimationFocusOverride = false;
            mDisplayContent.forAllWindows(this, true /* traverseTopToBottom */);

            if (mRecentsAnimationFocusOverride) {
                requestFocus(mRecentsAnimationInputConsumer.mWindowHandle.token,
                        mRecentsAnimationInputConsumer.mName);
            } else {
                updateInputFocusRequest();
            }


            if (!mUpdateInputWindowsImmediately) {
                mDisplayContent.getPendingTransaction().merge(mInputTransaction);
@@ -526,6 +538,7 @@ final class InputMonitor {
                        mRecentsAnimationInputConsumer.mWindowHandle)) {
                    mRecentsAnimationInputConsumer.show(mInputTransaction, w.mActivityRecord);
                    mAddRecentsAnimationInputConsumerHandle = false;
                    mRecentsAnimationFocusOverride = true;
                }
            }