Merge "Do not cancel car volume dialog dismiss anim" into qt-qpr1-dev
am: 7006565a52
Change-Id: I00c49bcd2bbd99893f88340f8ab5ed1d2c76e2da
This commit is contained in:
@@ -143,6 +143,7 @@ public class CarVolumeDialogImpl implements VolumeDialog {
|
|||||||
private boolean mHovering;
|
private boolean mHovering;
|
||||||
private int mCurrentlyDisplayingGroupId;
|
private int mCurrentlyDisplayingGroupId;
|
||||||
private boolean mShowing;
|
private boolean mShowing;
|
||||||
|
private boolean mDismissing;
|
||||||
private boolean mExpanded;
|
private boolean mExpanded;
|
||||||
private View mExpandIcon;
|
private View mExpandIcon;
|
||||||
private final ServiceConnection mServiceConnection = new ServiceConnection() {
|
private final ServiceConnection mServiceConnection = new ServiceConnection() {
|
||||||
@@ -244,6 +245,7 @@ public class CarVolumeDialogImpl implements VolumeDialog {
|
|||||||
|
|
||||||
mHovering = false;
|
mHovering = false;
|
||||||
mShowing = false;
|
mShowing = false;
|
||||||
|
mDismissing = false;
|
||||||
mExpanded = false;
|
mExpanded = false;
|
||||||
mWindow = mDialog.getWindow();
|
mWindow = mDialog.getWindow();
|
||||||
mWindow.requestFeature(Window.FEATURE_NO_TITLE);
|
mWindow.requestFeature(Window.FEATURE_NO_TITLE);
|
||||||
@@ -335,14 +337,11 @@ public class CarVolumeDialogImpl implements VolumeDialog {
|
|||||||
|
|
||||||
mHandler.removeMessages(H.DISMISS);
|
mHandler.removeMessages(H.DISMISS);
|
||||||
mHandler.removeMessages(H.SHOW);
|
mHandler.removeMessages(H.SHOW);
|
||||||
if (!mShowing) {
|
if (!mShowing || mDismissing) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mListView.animate().cancel();
|
mDismissing = true;
|
||||||
|
|
||||||
mListView.setTranslationY(0);
|
|
||||||
mListView.setAlpha(1);
|
|
||||||
mListView.animate()
|
mListView.animate()
|
||||||
.alpha(0)
|
.alpha(0)
|
||||||
.translationY(-mListView.getHeight())
|
.translationY(-mListView.getHeight())
|
||||||
@@ -354,7 +353,7 @@ public class CarVolumeDialogImpl implements VolumeDialog {
|
|||||||
}
|
}
|
||||||
mDialog.dismiss();
|
mDialog.dismiss();
|
||||||
mShowing = false;
|
mShowing = false;
|
||||||
mShowing = false;
|
mDismissing = false;
|
||||||
// if mExpandIcon is null that means user never clicked on the expanded arrow
|
// if mExpandIcon is null that means user never clicked on the expanded arrow
|
||||||
// which implies that the dialog is still not expanded. In that case we do
|
// which implies that the dialog is still not expanded. In that case we do
|
||||||
// not want to reset the state
|
// not want to reset the state
|
||||||
|
|||||||
Reference in New Issue
Block a user