Loading core/java/android/view/InsetsSourceControl.java +1 −2 Original line number Diff line number Diff line Loading @@ -212,8 +212,7 @@ public class InsetsSourceControl implements Parcelable { && mInitiallyVisible == that.mInitiallyVisible && mSurfacePosition.equals(that.mSurfacePosition) && mInsetsHint.equals(that.mInsetsHint) && mSkipAnimationOnce == that.mSkipAnimationOnce && Objects.equals(mImeStatsToken, that.mImeStatsToken); && mSkipAnimationOnce == that.mSkipAnimationOnce; } @Override Loading services/core/java/com/android/server/wm/DisplayPolicy.java +3 −3 Original line number Diff line number Diff line Loading @@ -1735,9 +1735,9 @@ public class DisplayPolicy { } // Show IME over the keyguard if the target allows it. final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisible() && win.mIsImWindow && (imeTarget.canShowWhenLocked() || !imeTarget.canBeHiddenByKeyguard()); final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isOnScreen() && win.mIsImWindow && ( imeTarget.canShowWhenLocked() || !imeTarget.canBeHiddenByKeyguard()); if (showImeOverKeyguard) { return false; } Loading services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java +8 −4 Original line number Diff line number Diff line Loading @@ -100,13 +100,13 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { // isLeashReadyForDispatching (used to dispatch the leash of the control) is // depending on mGivenInsetsReady. Therefore, triggering notifyControlChanged here // again, so that the control with leash can be eventually dispatched if (!mGivenInsetsReady && mServerVisible && !givenInsetsPending) { if (!mGivenInsetsReady && isServerVisible() && !givenInsetsPending) { mGivenInsetsReady = true; ImeTracker.forLogging().onProgress(mStatsToken, ImeTracker.PHASE_WM_POST_LAYOUT_NOTIFY_CONTROLS_CHANGED); mStateController.notifyControlChanged(mControlTarget, this); setImeShowing(true); } else if (wasServerVisible && mServerVisible && mGivenInsetsReady } else if (wasServerVisible && isServerVisible() && mGivenInsetsReady && givenInsetsPending) { // If the server visibility didn't change (still visible), and mGivenInsetsReady // is set, we won't call into notifyControlChanged. Therefore, we can reset the Loading @@ -114,7 +114,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { ImeTracker.forLogging().onCancelled(mStatsToken, ImeTracker.PHASE_WM_POST_LAYOUT_NOTIFY_CONTROLS_CHANGED); mStatsToken = null; } else if (wasServerVisible && !mServerVisible) { } else if (wasServerVisible && !isServerVisible()) { setImeShowing(false); } } Loading @@ -134,11 +134,15 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { @Override protected boolean isLeashReadyForDispatching() { if (android.view.inputmethod.Flags.refactorInsetsController()) { // We should only dispatch the leash, if the following conditions are fulfilled: // 1. parent isLeashReadyForDispatching, 2. mGivenInsetsReady (means there are no // givenInsetsPending), 3. the IME surface is drawn, 4. either the IME is // serverVisible (the unfrozen state) final WindowState ws = mWindowContainer != null ? mWindowContainer.asWindowState() : null; final boolean isDrawn = ws != null && ws.isDrawn(); return super.isLeashReadyForDispatching() && mServerVisible && isDrawn && mGivenInsetsReady; && isServerVisible() && isDrawn && mGivenInsetsReady; } else { return super.isLeashReadyForDispatching(); } Loading services/core/java/com/android/server/wm/InsetsSourceProvider.java +4 −0 Original line number Diff line number Diff line Loading @@ -730,6 +730,10 @@ class InsetsSourceProvider { return mFakeControlTarget; } boolean isServerVisible() { return mServerVisible; } boolean isClientVisible() { return mClientVisible; } Loading Loading
core/java/android/view/InsetsSourceControl.java +1 −2 Original line number Diff line number Diff line Loading @@ -212,8 +212,7 @@ public class InsetsSourceControl implements Parcelable { && mInitiallyVisible == that.mInitiallyVisible && mSurfacePosition.equals(that.mSurfacePosition) && mInsetsHint.equals(that.mInsetsHint) && mSkipAnimationOnce == that.mSkipAnimationOnce && Objects.equals(mImeStatsToken, that.mImeStatsToken); && mSkipAnimationOnce == that.mSkipAnimationOnce; } @Override Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +3 −3 Original line number Diff line number Diff line Loading @@ -1735,9 +1735,9 @@ public class DisplayPolicy { } // Show IME over the keyguard if the target allows it. final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisible() && win.mIsImWindow && (imeTarget.canShowWhenLocked() || !imeTarget.canBeHiddenByKeyguard()); final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isOnScreen() && win.mIsImWindow && ( imeTarget.canShowWhenLocked() || !imeTarget.canBeHiddenByKeyguard()); if (showImeOverKeyguard) { return false; } Loading
services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java +8 −4 Original line number Diff line number Diff line Loading @@ -100,13 +100,13 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { // isLeashReadyForDispatching (used to dispatch the leash of the control) is // depending on mGivenInsetsReady. Therefore, triggering notifyControlChanged here // again, so that the control with leash can be eventually dispatched if (!mGivenInsetsReady && mServerVisible && !givenInsetsPending) { if (!mGivenInsetsReady && isServerVisible() && !givenInsetsPending) { mGivenInsetsReady = true; ImeTracker.forLogging().onProgress(mStatsToken, ImeTracker.PHASE_WM_POST_LAYOUT_NOTIFY_CONTROLS_CHANGED); mStateController.notifyControlChanged(mControlTarget, this); setImeShowing(true); } else if (wasServerVisible && mServerVisible && mGivenInsetsReady } else if (wasServerVisible && isServerVisible() && mGivenInsetsReady && givenInsetsPending) { // If the server visibility didn't change (still visible), and mGivenInsetsReady // is set, we won't call into notifyControlChanged. Therefore, we can reset the Loading @@ -114,7 +114,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { ImeTracker.forLogging().onCancelled(mStatsToken, ImeTracker.PHASE_WM_POST_LAYOUT_NOTIFY_CONTROLS_CHANGED); mStatsToken = null; } else if (wasServerVisible && !mServerVisible) { } else if (wasServerVisible && !isServerVisible()) { setImeShowing(false); } } Loading @@ -134,11 +134,15 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider { @Override protected boolean isLeashReadyForDispatching() { if (android.view.inputmethod.Flags.refactorInsetsController()) { // We should only dispatch the leash, if the following conditions are fulfilled: // 1. parent isLeashReadyForDispatching, 2. mGivenInsetsReady (means there are no // givenInsetsPending), 3. the IME surface is drawn, 4. either the IME is // serverVisible (the unfrozen state) final WindowState ws = mWindowContainer != null ? mWindowContainer.asWindowState() : null; final boolean isDrawn = ws != null && ws.isDrawn(); return super.isLeashReadyForDispatching() && mServerVisible && isDrawn && mGivenInsetsReady; && isServerVisible() && isDrawn && mGivenInsetsReady; } else { return super.isLeashReadyForDispatching(); } Loading
services/core/java/com/android/server/wm/InsetsSourceProvider.java +4 −0 Original line number Diff line number Diff line Loading @@ -730,6 +730,10 @@ class InsetsSourceProvider { return mFakeControlTarget; } boolean isServerVisible() { return mServerVisible; } boolean isClientVisible() { return mClientVisible; } Loading