Reset Divider IME state when leaving split-screen
This is basically a broad-stroke reset after leaving split-screen to clean-up ime state inconsistencies. Generally this won't really do anything, but it should hopefully prevent bad state from persisting when it does happen. Bug: 161155771 Test: Use split-screen stuff. It should continue working. Change-Id: If225dee39b8eca160a32a0953d23ebe86cceff9e
This commit is contained in:
@@ -529,6 +529,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
||||
updateVisibility(false /* visible */);
|
||||
mMinimized = false;
|
||||
removeDivider();
|
||||
mImePositionProcessor.reset();
|
||||
}
|
||||
|
||||
void ensureMinimizedSplit() {
|
||||
|
||||
@@ -117,6 +117,18 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
|
||||
&& (imeSplit.asBinder() == mSplits.mSecondary.token.asBinder());
|
||||
}
|
||||
|
||||
void reset() {
|
||||
mPaused = true;
|
||||
mPausedTargetAdjusted = false;
|
||||
mAdjustedWhileHidden = false;
|
||||
mAnimation = null;
|
||||
mAdjusted = mTargetAdjusted = false;
|
||||
mImeWasShown = mTargetShown = false;
|
||||
mTargetPrimaryDim = mTargetSecondaryDim = mLastPrimaryDim = mLastSecondaryDim = 0.f;
|
||||
mSecondaryHasFocus = false;
|
||||
mLastAdjustTop = -1;
|
||||
}
|
||||
|
||||
private void updateDimTargets() {
|
||||
final boolean splitIsVisible = !getView().isHidden();
|
||||
mTargetPrimaryDim = (mSecondaryHasFocus && mTargetShown && splitIsVisible)
|
||||
|
||||
Reference in New Issue
Block a user