Don't animate the power button dialog when swiping up dismiss shade
This CL prevents the power button dialog to not animate back into the power button when the dialog is dismissed because the user swiped up to dismiss the shade. This behavior is already on by default for all SystemUIDialogs [1], but this shared behavior was disabled for the power button dialog in particular [2] because the dismiss/broadcast logic is slightly different for that dialog. See http://b/268510470#comment7 for before/after videos. [1] http://shortn/_K9azAzlqiZ [2] http://shortn/_EOds67Obsp Bug: 268510470 Test: Swipe up from the bottom of phone when the power button dialog is shown from the power button. Change-Id: Ic3ec4e91fba21e8f0c31bbc7c33f04dee7ef821b
This commit is contained in:
@@ -2054,6 +2054,10 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
|
||||
|| Intent.ACTION_SCREEN_OFF.equals(action)) {
|
||||
String reason = intent.getStringExtra(SYSTEM_DIALOG_REASON_KEY);
|
||||
if (!SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS.equals(reason)) {
|
||||
// These broadcasts are usually received when locking the device, swiping up to
|
||||
// home (which collapses the shade), etc. In those cases, we usually don't want
|
||||
// to animate this dialog back into the view, so we disable the exit animations.
|
||||
mDialogLaunchAnimator.disableAllCurrentDialogsExitAnimations();
|
||||
mHandler.sendMessage(mHandler.obtainMessage(MESSAGE_DISMISS, reason));
|
||||
}
|
||||
} else if (TelephonyManager.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED.equals(action)) {
|
||||
|
||||
Reference in New Issue
Block a user