Merge "Make SysUI dialogs more consistent" into sc-v2-dev

This commit is contained in:
TreeHugger Robot
2021-12-09 13:40:46 +00:00
committed by Android (Google) Code Review
15 changed files with 102 additions and 147 deletions

View File

@@ -85,6 +85,7 @@ public class EnableZenModeDialog {
@VisibleForTesting @VisibleForTesting
protected Context mContext; protected Context mContext;
private final int mThemeResId; private final int mThemeResId;
private final boolean mCancelIsNeutral;
@VisibleForTesting @VisibleForTesting
protected TextView mZenAlarmWarning; protected TextView mZenAlarmWarning;
@VisibleForTesting @VisibleForTesting
@@ -101,8 +102,13 @@ public class EnableZenModeDialog {
} }
public EnableZenModeDialog(Context context, int themeResId) { public EnableZenModeDialog(Context context, int themeResId) {
this(context, themeResId, false /* cancelIsNeutral */);
}
public EnableZenModeDialog(Context context, int themeResId, boolean cancelIsNeutral) {
mContext = context; mContext = context;
mThemeResId = themeResId; mThemeResId = themeResId;
mCancelIsNeutral = cancelIsNeutral;
} }
public AlertDialog createDialog() { public AlertDialog createDialog() {
@@ -115,7 +121,6 @@ public class EnableZenModeDialog {
final AlertDialog.Builder builder = new AlertDialog.Builder(mContext, mThemeResId) final AlertDialog.Builder builder = new AlertDialog.Builder(mContext, mThemeResId)
.setTitle(R.string.zen_mode_settings_turn_on_dialog_title) .setTitle(R.string.zen_mode_settings_turn_on_dialog_title)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.zen_mode_enable_dialog_turn_on, .setPositiveButton(R.string.zen_mode_enable_dialog_turn_on,
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
@Override @Override
@@ -145,6 +150,12 @@ public class EnableZenModeDialog {
} }
}); });
if (mCancelIsNeutral) {
builder.setNeutralButton(R.string.cancel, null);
} else {
builder.setNegativeButton(R.string.cancel, null);
}
View contentView = getContentView(); View contentView = getContentView();
bindConditions(forever()); bindConditions(forever());
builder.setView(contentView); builder.setView(contentView);

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="rectangle">
<stroke
android:color="?androidprv:attr/colorAccentPrimaryVariant"
android:width="1dp"/>
<corners android:radius="20dp"/>
<padding
android:left="8dp"
android:right="8dp"
android:top="4dp"
android:bottom="4dp" />
<solid android:color="@android:color/transparent" />
</shape>

View File

@@ -29,7 +29,7 @@
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<corners android:radius="?android:attr/buttonCornerRadius"/> <corners android:radius="?android:attr/buttonCornerRadius"/>
<solid android:color="@android:color/transparent"/> <solid android:color="@android:color/transparent"/>
<stroke android:color="?androidprv:attr/colorAccentPrimary" <stroke android:color="?androidprv:attr/colorAccentPrimaryVariant"
android:width="1dp" android:width="1dp"
/> />
<padding android:left="@dimen/dialog_button_horizontal_padding" <padding android:left="@dimen/dialog_button_horizontal_padding"

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="rectangle">
<stroke
android:color="?androidprv:attr/colorAccentPrimary"
android:width="1dp"/>
<corners android:radius="24dp"/>
<padding
android:left="16dp"
android:right="16dp"
android:top="8dp"
android:bottom="8dp" />
<solid android:color="@android:color/transparent" />
</shape>

View File

@@ -380,54 +380,44 @@
android:id="@+id/button_layout" android:id="@+id/button_layout"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="34dp" android:layout_marginStart="@dimen/dialog_side_padding"
android:layout_marginEnd="@dimen/dialog_side_padding"
android:layout_marginBottom="@dimen/dialog_bottom_padding"
android:clickable="false" android:clickable="false"
android:focusable="false"> android:focusable="false">
<FrameLayout <FrameLayout
android:id="@+id/apm_layout" android:id="@+id/apm_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="48dp" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
android:orientation="vertical"> android:orientation="vertical">
<Button <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/turn_off_airplane_mode" android:text="@string/turn_off_airplane_mode"
android:ellipsize="end" android:ellipsize="end"
style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored" style="@style/Widget.Dialog.Button.BorderButton"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_gravity="start|center_vertical"
android:textAppearance="@style/TextAppearance.InternetDialog"
android:textSize="14sp"
android:background="@drawable/internet_dialog_footer_background"
android:clickable="false"/> android:clickable="false"/>
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/done_layout" android:id="@+id/done_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="48dp" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:clickable="true"
android:focusable="true"
android:layout_gravity="end|center_vertical" android:layout_gravity="end|center_vertical"
android:orientation="vertical"> android:clickable="true"
android:focusable="true">
<Button <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/inline_done_button" android:text="@string/inline_done_button"
android:ellipsize="end" style="@style/Widget.Dialog.Button"
style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
android:layout_width="67dp"
android:layout_height="36dp"
android:layout_gravity="end|center_vertical"
android:textAppearance="@style/TextAppearance.InternetDialog"
android:textSize="14sp"
android:background="@drawable/internet_dialog_footer_background"
android:clickable="false"/> android:clickable="false"/>
</FrameLayout> </FrameLayout>
</FrameLayout> </FrameLayout>

View File

@@ -89,17 +89,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginStart="24dp" android:layout_marginStart="@dimen/dialog_side_padding"
android:layout_marginBottom="24dp" android:layout_marginEnd="@dimen/dialog_side_padding"
android:layout_marginEnd="24dp" android:layout_marginBottom="@dimen/dialog_bottom_padding"
android:orientation="horizontal"> android:orientation="horizontal">
<Button <Button
android:id="@+id/stop" android:id="@+id/stop"
style="@style/MediaOutputRoundedOutlinedButton" style="@style/Widget.Dialog.Button.BorderButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/keyboard_key_media_stop" android:text="@string/keyboard_key_media_stop"
android:visibility="gone"/> android:visibility="gone"/>
@@ -110,10 +109,9 @@
<Button <Button
android:id="@+id/done" android:id="@+id/done"
style="@style/MediaOutputRoundedOutlinedButton" style="@style/Widget.Dialog.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/inline_done_button"/> android:text="@string/inline_done_button"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -27,10 +27,10 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="24dp" android:paddingStart="@dimen/dialog_side_padding"
android:paddingEnd="24dp" android:paddingEnd="@dimen/dialog_side_padding"
android:paddingTop="26dp" android:paddingTop="@dimen/dialog_top_padding"
android:paddingBottom="30dp" android:paddingBottom="@dimen/dialog_bottom_padding"
android:orientation="vertical"> android:orientation="vertical">
<!-- Header --> <!-- Header -->
@@ -108,10 +108,7 @@
android:layout_weight="0" android:layout_weight="0"
android:layout_gravity="start" android:layout_gravity="start"
android:text="@string/cancel" android:text="@string/cancel"
android:textColor="?android:textColorPrimary" style="@style/Widget.Dialog.Button.BorderButton" />
android:background="@drawable/screenrecord_button_background_outline"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="14sp"/>
<Space <Space
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -123,10 +120,7 @@
android:layout_weight="0" android:layout_weight="0"
android:layout_gravity="end" android:layout_gravity="end"
android:text="@string/screenrecord_start" android:text="@string/screenrecord_start"
android:textColor="@android:color/system_neutral1_900" style="@style/Widget.Dialog.Button" />
android:background="@drawable/screenrecord_button_background_solid"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="14sp"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View File

@@ -450,10 +450,6 @@
<item name="android:background">@drawable/btn_borderless_rect</item> <item name="android:background">@drawable/btn_borderless_rect</item>
</style> </style>
<style name="MediaOutputRoundedOutlinedButton" parent="@android:style/Widget.Material.Button">
<item name="android:background">@drawable/media_output_dialog_button_background</item>
</style>
<style name="TunerSettings" parent="@android:style/Theme.DeviceDefault.Settings"> <style name="TunerSettings" parent="@android:style/Theme.DeviceDefault.Settings">
<item name="android:windowActionBar">false</item> <item name="android:windowActionBar">false</item>
<item name="preferenceTheme">@style/TunerPreferenceTheme</item> <item name="preferenceTheme">@style/TunerPreferenceTheme</item>
@@ -881,13 +877,18 @@
<item name="android:textAlignment">center</item> <item name="android:textAlignment">center</item>
</style> </style>
<style name="Widget.Dialog.Button" parent = "Theme.SystemUI.Dialog">
<style name="Widget" />
<style name="Widget.Dialog" />
<style name="Widget.Dialog.Button">
<item name="android:buttonCornerRadius">28dp</item>
<item name="android:background">@drawable/qs_dialog_btn_filled</item> <item name="android:background">@drawable/qs_dialog_btn_filled</item>
<item name="android:textColor">?androidprv:attr/textColorOnAccent</item> <item name="android:textColor">?androidprv:attr/textColorOnAccent</item>
<item name="android:textSize">14sp</item> <item name="android:textSize">14sp</item>
<item name="android:lineHeight">20sp</item> <item name="android:lineHeight">20sp</item>
<item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item> <item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item>
<item name="android:stateListAnimator">@null</item> <item name="android:stateListAnimator">@null</item>
<item name="android:minWidth">0dp</item>
</style> </style>
<style name="Widget.Dialog.Button.BorderButton"> <style name="Widget.Dialog.Button.BorderButton">

View File

@@ -84,7 +84,9 @@ public abstract class MediaOutputBaseDialog extends SystemUIDialog implements
public MediaOutputBaseDialog(Context context, MediaOutputController mediaOutputController) { public MediaOutputBaseDialog(Context context, MediaOutputController mediaOutputController) {
super(context); super(context);
mContext = context;
// Save the context that is wrapped with our theme.
mContext = getContext();
mMediaOutputController = mediaOutputController; mMediaOutputController = mediaOutputController;
mLayoutManager = new LinearLayoutManager(mContext); mLayoutManager = new LinearLayoutManager(mContext);
mListMaxHeight = context.getResources().getDimensionPixelSize( mListMaxHeight = context.getResources().getDimensionPixelSize(

View File

@@ -98,7 +98,7 @@ public class DataSaverTile extends QSTileImpl<BooleanState> implements
toggleDataSaver(); toggleDataSaver();
Prefs.putBoolean(mContext, Prefs.Key.QS_DATA_SAVER_DIALOG_SHOWN, true); Prefs.putBoolean(mContext, Prefs.Key.QS_DATA_SAVER_DIALOG_SHOWN, true);
}); });
dialog.setNegativeButton(com.android.internal.R.string.cancel, null); dialog.setNeutralButton(com.android.internal.R.string.cancel, null);
dialog.setShowForAllUsers(true); dialog.setShowForAllUsers(true);
if (view != null) { if (view != null) {

View File

@@ -190,7 +190,6 @@ public class DndTile extends QSTileImpl<BooleanState> {
case Settings.Secure.ZEN_DURATION_PROMPT: case Settings.Secure.ZEN_DURATION_PROMPT:
mUiHandler.post(() -> { mUiHandler.post(() -> {
Dialog dialog = makeZenModeDialog(); Dialog dialog = makeZenModeDialog();
SystemUIDialog.registerDismissListener(dialog);
if (view != null) { if (view != null) {
mDialogLaunchAnimator.showFromView(dialog, view, false); mDialogLaunchAnimator.showFromView(dialog, view, false);
} else { } else {
@@ -211,10 +210,12 @@ public class DndTile extends QSTileImpl<BooleanState> {
} }
private Dialog makeZenModeDialog() { private Dialog makeZenModeDialog() {
AlertDialog dialog = new EnableZenModeDialog(mContext, R.style.Theme_SystemUI_Dialog) AlertDialog dialog = new EnableZenModeDialog(mContext, R.style.Theme_SystemUI_Dialog,
.createDialog(); true /* cancelIsNeutral */).createDialog();
SystemUIDialog.applyFlags(dialog); SystemUIDialog.applyFlags(dialog);
SystemUIDialog.setShowForAllUsers(dialog, true); SystemUIDialog.setShowForAllUsers(dialog, true);
SystemUIDialog.registerDismissListener(dialog);
SystemUIDialog.setDialogSize(dialog);
return dialog; return dialog;
} }

View File

@@ -159,7 +159,9 @@ public class InternetDialog extends SystemUIDialog implements
if (DEBUG) { if (DEBUG) {
Log.d(TAG, "Init InternetDialog"); Log.d(TAG, "Init InternetDialog");
} }
mContext = context;
// Save the context that is wrapped with our theme.
mContext = getContext();
mHandler = handler; mHandler = handler;
mBackgroundExecutor = executor; mBackgroundExecutor = executor;
mInternetDialogFactory = internetDialogFactory; mInternetDialogFactory = internetDialogFactory;

View File

@@ -40,7 +40,7 @@ public class UserUtil {
super(context); super(context);
setTitle(R.string.user_remove_user_title); setTitle(R.string.user_remove_user_title);
setMessage(context.getString(R.string.user_remove_user_message)); setMessage(context.getString(R.string.user_remove_user_message));
setButton(DialogInterface.BUTTON_NEGATIVE, setButton(DialogInterface.BUTTON_NEUTRAL,
context.getString(android.R.string.cancel), this); context.getString(android.R.string.cancel), this);
setButton(DialogInterface.BUTTON_POSITIVE, setButton(DialogInterface.BUTTON_POSITIVE,
context.getString(R.string.user_remove_user_remove), this); context.getString(R.string.user_remove_user_remove), this);
@@ -51,7 +51,7 @@ public class UserUtil {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
if (which == BUTTON_NEGATIVE) { if (which == BUTTON_NEUTRAL) {
cancel(); cancel();
} else { } else {
dismiss(); dismiss();

View File

@@ -126,30 +126,7 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
* the device configuration changes, and the result will be used to resize this dialog window. * the device configuration changes, and the result will be used to resize this dialog window.
*/ */
protected int getWidth() { protected int getWidth() {
boolean isOnTablet = return getDefaultDialogWidth(mContext);
mContext.getResources().getConfiguration().smallestScreenWidthDp >= 600;
if (!isOnTablet) {
return ViewGroup.LayoutParams.MATCH_PARENT;
}
int flagValue = SystemProperties.getInt(FLAG_TABLET_DIALOG_WIDTH, 0);
if (flagValue == -1) {
// The width of bottom sheets (624dp).
return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 624,
mContext.getResources().getDisplayMetrics()));
} else if (flagValue == -2) {
// The suggested small width for all dialogs (348dp)
return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 348,
mContext.getResources().getDisplayMetrics()));
} else if (flagValue > 0) {
// Any given width.
return Math.round(
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, flagValue,
mContext.getResources().getDisplayMetrics()));
} else {
// By default we use the same width as the notification shade in portrait mode (504dp).
return mContext.getResources().getDimensionPixelSize(R.dimen.large_dialog_width);
}
} }
/** /**
@@ -157,7 +134,7 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
* the device configuration changes, and the result will be used to resize this dialog window. * the device configuration changes, and the result will be used to resize this dialog window.
*/ */
protected int getHeight() { protected int getHeight() {
return ViewGroup.LayoutParams.WRAP_CONTENT; return getDefaultDialogHeight();
} }
@Override @Override
@@ -267,6 +244,45 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
dismissReceiver.register(); dismissReceiver.register();
} }
/** Set an appropriate size to {@code dialog} depending on the current configuration. */
public static void setDialogSize(Dialog dialog) {
// We need to create the dialog first, otherwise the size will be overridden when it is
// created.
dialog.create();
dialog.getWindow().setLayout(getDefaultDialogWidth(dialog.getContext()),
getDefaultDialogHeight());
}
private static int getDefaultDialogWidth(Context context) {
boolean isOnTablet = context.getResources().getConfiguration().smallestScreenWidthDp >= 600;
if (!isOnTablet) {
return ViewGroup.LayoutParams.MATCH_PARENT;
}
int flagValue = SystemProperties.getInt(FLAG_TABLET_DIALOG_WIDTH, 0);
if (flagValue == -1) {
// The width of bottom sheets (624dp).
return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 624,
context.getResources().getDisplayMetrics()));
} else if (flagValue == -2) {
// The suggested small width for all dialogs (348dp)
return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 348,
context.getResources().getDisplayMetrics()));
} else if (flagValue > 0) {
// Any given width.
return Math.round(
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, flagValue,
context.getResources().getDisplayMetrics()));
} else {
// By default we use the same width as the notification shade in portrait mode (504dp).
return context.getResources().getDimensionPixelSize(R.dimen.large_dialog_width);
}
}
private static int getDefaultDialogHeight() {
return ViewGroup.LayoutParams.WRAP_CONTENT;
}
private static class DismissReceiver extends BroadcastReceiver { private static class DismissReceiver extends BroadcastReceiver {
private static final IntentFilter INTENT_FILTER = new IntentFilter(); private static final IntentFilter INTENT_FILTER = new IntentFilter();
static { static {

View File

@@ -1161,7 +1161,7 @@ public class UserSwitcherController implements Dumpable {
? com.android.settingslib.R.string.guest_reset_guest_dialog_title ? com.android.settingslib.R.string.guest_reset_guest_dialog_title
: R.string.guest_exit_guest_dialog_title); : R.string.guest_exit_guest_dialog_title);
setMessage(context.getString(R.string.guest_exit_guest_dialog_message)); setMessage(context.getString(R.string.guest_exit_guest_dialog_message));
setButton(DialogInterface.BUTTON_NEGATIVE, setButton(DialogInterface.BUTTON_NEUTRAL,
context.getString(android.R.string.cancel), this); context.getString(android.R.string.cancel), this);
setButton(DialogInterface.BUTTON_POSITIVE, setButton(DialogInterface.BUTTON_POSITIVE,
context.getString(mGuestUserAutoCreated context.getString(mGuestUserAutoCreated
@@ -1180,7 +1180,7 @@ public class UserSwitcherController implements Dumpable {
if (mFalsingManager.isFalseTap(penalty)) { if (mFalsingManager.isFalseTap(penalty)) {
return; return;
} }
if (which == BUTTON_NEGATIVE) { if (which == BUTTON_NEUTRAL) {
cancel(); cancel();
} else { } else {
mUiEventLogger.log(QSUserSwitcherEvent.QS_USER_GUEST_REMOVE); mUiEventLogger.log(QSUserSwitcherEvent.QS_USER_GUEST_REMOVE);
@@ -1198,7 +1198,7 @@ public class UserSwitcherController implements Dumpable {
super(context); super(context);
setTitle(R.string.user_add_user_title); setTitle(R.string.user_add_user_title);
setMessage(context.getString(R.string.user_add_user_message_short)); setMessage(context.getString(R.string.user_add_user_message_short));
setButton(DialogInterface.BUTTON_NEGATIVE, setButton(DialogInterface.BUTTON_NEUTRAL,
context.getString(android.R.string.cancel), this); context.getString(android.R.string.cancel), this);
setButton(DialogInterface.BUTTON_POSITIVE, setButton(DialogInterface.BUTTON_POSITIVE,
context.getString(android.R.string.ok), this); context.getString(android.R.string.ok), this);
@@ -1212,7 +1212,7 @@ public class UserSwitcherController implements Dumpable {
if (mFalsingManager.isFalseTap(penalty)) { if (mFalsingManager.isFalseTap(penalty)) {
return; return;
} }
if (which == BUTTON_NEGATIVE) { if (which == BUTTON_NEUTRAL) {
cancel(); cancel();
} else { } else {
mDialogLaunchAnimator.dismissStack(this); mDialogLaunchAnimator.dismissStack(this);