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

Commit 260634bb authored by Taran Singh's avatar Taran Singh Committed by Automerger Merge Worker
Browse files

Merge "PIP window cant be ime target." into rvc-dev am: 466a3e5b

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

Change-Id: Ifb7bbb4b42c3c38f1910ea5225a7188405c03ec3
parents 5e0aee7b 466a3e5b
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -2198,10 +2198,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

    @Override
    boolean isFocusable() {
        return super.isFocusable() && (canReceiveKeys() || isAlwaysFocusable());
    }

    boolean canReceiveKeys() {
        // TODO(156521483): Propagate the state down the hierarchy instead of checking the parent
        boolean canReceiveKeys = getWindowConfiguration().canReceiveKeys()
                && getTask().getWindowConfiguration().canReceiveKeys();
        return super.isFocusable() && (canReceiveKeys || isAlwaysFocusable());
        return getWindowConfiguration().canReceiveKeys()
                && (task == null || task.getWindowConfiguration().canReceiveKeys());
    }

    boolean isResizeable() {
@@ -2370,10 +2373,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                // For the apps below Q, there can be only one app which has the focused window per
                // process, because legacy apps may not be ready for a multi-focus system.
                return false;

            }
        }
        return (getWindowConfiguration().canReceiveKeys() || isAlwaysFocusable())
                && getDisplay() != null;
        return (canReceiveKeys() || isAlwaysFocusable()) && getDisplay() != null;
    }

    /**