Merge "Fix a few issues with ime adjust/minimized dock stack" into nyc-dev

am: 96b2fe6a4e

* commit '96b2fe6a4eec82635f39c025ee9c57e99207a3df':
  Fix a few issues with ime adjust/minimized dock stack

Change-Id: I9f3f19c09a9f83b0a72bff4a26489b240af630a8
This commit is contained in:
Jorim Jaggi
2016-05-18 19:34:23 +00:00
committed by android-build-merger
2 changed files with 9 additions and 7 deletions

View File

@@ -169,10 +169,12 @@ public class Divider extends SystemUI {
if (mAdjustedForIme != adjustedForIme) {
mAdjustedForIme = adjustedForIme;
updateTouchable();
if (animDuration > 0) {
mView.setAdjustedForIme(adjustedForIme, animDuration);
} else {
mView.setAdjustedForIme(adjustedForIme);
if (!mMinimized) {
if (animDuration > 0) {
mView.setAdjustedForIme(adjustedForIme, animDuration);
} else {
mView.setAdjustedForIme(adjustedForIme);
}
}
}
});

View File

@@ -300,7 +300,7 @@ public class DockedStackDividerController implements DimLayerUser {
boolean animate, WindowState imeWin, int imeHeight) {
if (mAdjustedForIme != adjustedForIme || (adjustedForIme && mImeHeight != imeHeight)
|| mAdjustedForDivider != adjustedForDivider) {
if (animate) {
if (animate && !mAnimatingForMinimizedDockedStack) {
startImeAdjustAnimation(adjustedForIme, adjustedForDivider, imeWin);
} else {
// Animation might be delayed, so only notify if we don't run an animation.
@@ -547,8 +547,6 @@ public class DockedStackDividerController implements DimLayerUser {
private void startImeAdjustAnimation(
boolean adjustedForIme, boolean adjustedForDivider, WindowState imeWin) {
mAnimatingForIme = true;
mAnimationStarted = false;
// If we're not in an animation, the starting point depends on whether we're adjusted
// or not. If we're already in an animation, we start from where the current animation
@@ -562,6 +560,8 @@ public class DockedStackDividerController implements DimLayerUser {
mAnimationStart = mLastAnimationProgress;
mDividerAnimationStart = mLastDividerProgress;
}
mAnimatingForIme = true;
mAnimationStarted = false;
mAnimationTarget = adjustedForIme ? 1 : 0;
mDividerAnimationTarget = adjustedForDivider ? 1 : 0;