diff options
author | Danesh M <danesh@cyngn.com> | 2016-04-15 16:29:40 -0700 |
---|---|---|
committer | Danesh M <danesh@cyngn.com> | 2016-04-18 14:07:04 -0700 |
commit | cc008494b68fe01fe7b1d78aea1d9e9f93172d06 (patch) | |
tree | 0bf4bb57eda3f2394107542e96765953a10d5b2c | |
parent | 6b5b45bf8f26a47e6d4c80e120d8297bb55f44b8 (diff) | |
download | frameworks_base-cc008494b68fe01fe7b1d78aea1d9e9f93172d06.zip frameworks_base-cc008494b68fe01fe7b1d78aea1d9e9f93172d06.tar.gz frameworks_base-cc008494b68fe01fe7b1d78aea1d9e9f93172d06.tar.bz2 |
Lockscreen : Ensure window bounds change after view animations
Changing window bounds when a view inside the window is performing
animations, causes flickers. Ensure we change window bounds
only after all the animations have completed.
Change-Id: I2143d3d15cdfe660d864e1af902267b0903b2afa
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java | 16 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 12 |
2 files changed, 25 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index 581b50b..2b6a7b9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -465,6 +465,10 @@ public class NotificationPanelView extends PanelView implements } else { intercept = NotificationPanelView.this.onTouchEvent(e); } + } else { + // Ensure we expand as early as possible + // to avoid any simultaneous animations on the views + mKeyguardBottomArea.expand(true); } return intercept; } @@ -2317,13 +2321,21 @@ public class NotificationPanelView extends PanelView implements requestDisallowInterceptTouchEvent(true); mOnlyAffordanceInThisMotion = true; mQsTracking = false; - mKeyguardBottomArea.expand(true); } @Override public void onSwipingAborted() { mKeyguardBottomArea.unbindCameraPrewarmService(false /* launched */); - mKeyguardBottomArea.expand(false); + mKeyguardBottomArea.animate().setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + mKeyguardBottomArea.expand(false); + } + @Override + public void onAnimationCancel(Animator animation) { + mKeyguardBottomArea.expand(false); + } + }); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 99ae851..ad5791f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -4761,7 +4761,17 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public void onHintFinished() { // Delay the reset a bit so the user can read the text. mKeyguardIndicationController.hideTransientIndicationDelayed(HINT_RESET_DELAY_MS); - mKeyguardBottomArea.expand(false); + mKeyguardBottomArea.animate().setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + mKeyguardBottomArea.expand(false); + } + + @Override + public void onAnimationCancel(Animator animation) { + mKeyguardBottomArea.expand(false); + } + }); } public void onCameraHintStarted(String hint) { |