Make SysUI dialogs more consistent

This CL makes SysUI dialogs more consistent by ensuring they are using
the same button styles and paddings. I decided to be strongly
opinionated: the primary buttons are all filled and on the right, the
secondary button are hairline and on the left.

See b/203666386#comment13 for a video.

Bug: 203666386
Test: Manual
Change-Id: I587d9537309357555229db411edfb154151a92e7
This commit is contained in:
Jordan Demeulenaere
2021-12-01 16:30:28 +01:00
parent f934a4a248
commit 95e3bd1d1e
20 changed files with 102 additions and 232 deletions

View File

@@ -85,6 +85,7 @@ public class EnableZenModeDialog {
@VisibleForTesting
protected Context mContext;
private final int mThemeResId;
private final boolean mCancelIsNeutral;
@VisibleForTesting
protected TextView mZenAlarmWarning;
@VisibleForTesting
@@ -101,8 +102,13 @@ public class EnableZenModeDialog {
}
public EnableZenModeDialog(Context context, int themeResId) {
this(context, themeResId, false /* cancelIsNeutral */);
}
public EnableZenModeDialog(Context context, int themeResId, boolean cancelIsNeutral) {
mContext = context;
mThemeResId = themeResId;
mCancelIsNeutral = cancelIsNeutral;
}
public AlertDialog createDialog() {
@@ -115,7 +121,6 @@ public class EnableZenModeDialog {
final AlertDialog.Builder builder = new AlertDialog.Builder(mContext, mThemeResId)
.setTitle(R.string.zen_mode_settings_turn_on_dialog_title)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.zen_mode_enable_dialog_turn_on,
new DialogInterface.OnClickListener() {
@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();
bindConditions(forever());
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

@@ -1,31 +0,0 @@
<!--
~ 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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetBottom="6dp"
android:insetTop="6dp">
<shape android:shape="rectangle">
<stroke
android:color="@color/media_dialog_outlined_button"
android:width="1dp"/>
<corners android:radius="20dp"/>
<padding
android:left="16dp"
android:right="16dp"
android:top="8dp"
android:bottom="8dp"/>
<solid android:color="@android:color/transparent"/>
</shape>
</inset>

View File

@@ -1,31 +0,0 @@
<!--
~ 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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetBottom="6dp"
android:insetTop="6dp">
<shape android:shape="rectangle">
<stroke
android:color="@android:color/transparent"
android:width="1dp"/>
<corners android:radius="20dp"/>
<padding
android:left="@dimen/media_output_dialog_button_padding_horizontal"
android:right="@dimen/media_output_dialog_button_padding_horizontal"
android:top="@dimen/media_output_dialog_button_padding_vertical"
android:bottom="@dimen/media_output_dialog_button_padding_vertical"/>
<solid android:color="@color/media_dialog_solid_button_background"/>
</shape>
</inset>

View File

@@ -29,7 +29,7 @@
<shape android:shape="rectangle">
<corners android:radius="?android:attr/buttonCornerRadius"/>
<solid android:color="@android:color/transparent"/>
<stroke android:color="?androidprv:attr/colorAccentPrimary"
<stroke android:color="?androidprv:attr/colorAccentPrimaryVariant"
android:width="1dp"
/>
<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

@@ -381,54 +381,44 @@
android:id="@+id/button_layout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:layout_height="wrap_content"
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:focusable="false">
<FrameLayout
android:id="@+id/apm_layout"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:layout_gravity="start|center_vertical"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/turn_off_airplane_mode"
android:ellipsize="end"
style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
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"
style="@style/Widget.Dialog.Button.BorderButton"
android:clickable="false"/>
</FrameLayout>
<FrameLayout
android:id="@+id/done_layout"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:clickable="true"
android:focusable="true"
android:layout_gravity="end|center_vertical"
android:orientation="vertical">
android:clickable="true"
android:focusable="true">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/inline_done_button"
android:ellipsize="end"
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"
style="@style/Widget.Dialog.Button"
android:clickable="false"/>
</FrameLayout>
</FrameLayout>

View File

@@ -41,7 +41,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="12dp"
android:background="@color/media_dialog_background"
android:orientation="vertical">
<ImageView
android:id="@+id/app_source_icon"
@@ -76,7 +75,6 @@
android:id="@+id/device_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/media_dialog_background"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
@@ -91,18 +89,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="16dp"
android:layout_marginBottom="24dp"
android:layout_marginEnd="16dp"
android:background="@color/media_dialog_background"
android:layout_marginStart="@dimen/dialog_side_padding"
android:layout_marginEnd="@dimen/dialog_side_padding"
android:layout_marginBottom="@dimen/dialog_bottom_padding"
android:orientation="horizontal">
<Button
android:id="@+id/stop"
style="@style/MediaOutputRoundedOutlinedButton"
style="@style/Widget.Dialog.Button.BorderButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/keyboard_key_media_stop"
android:visibility="gone"/>
@@ -113,10 +109,9 @@
<Button
android:id="@+id/done"
style="@style/MediaOutputRoundedButton"
style="@style/Widget.Dialog.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/inline_done_button"/>
</LinearLayout>
</LinearLayout>

View File

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

View File

@@ -67,10 +67,6 @@
<!-- media output dialog-->
<color name="media_dialog_background">@android:color/system_neutral1_900</color>
<color name="media_dialog_solid_button_background">@android:color/system_accent1_100</color>
<color name="media_dialog_solid_button_text">@android:color/system_accent2_800</color>
<color name="media_dialog_outlined_button">@android:color/system_accent1_100</color>
<color name="media_dialog_outlined_button_text">@android:color/system_neutral1_50</color>
<color name="media_dialog_active_item_main_content">@android:color/system_accent2_800</color>
<color name="media_dialog_inactive_item_main_content">@android:color/system_accent1_100</color>
<color name="media_dialog_item_status">@android:color/system_accent1_100</color>

View File

@@ -174,10 +174,6 @@
<!-- media output dialog-->
<color name="media_dialog_background" android:lstar="98">@android:color/system_neutral1_100</color>
<color name="media_dialog_solid_button_background">@android:color/system_accent1_600</color>
<color name="media_dialog_solid_button_text">@android:color/system_neutral1_50</color>
<color name="media_dialog_outlined_button">@android:color/system_accent1_600</color>
<color name="media_dialog_outlined_button_text">@android:color/system_neutral1_900</color>
<color name="media_dialog_active_item_main_content">@android:color/system_accent1_900</color>
<color name="media_dialog_inactive_item_main_content">@android:color/system_accent1_600</color>
<color name="media_dialog_item_status">@android:color/system_accent1_900</color>

View File

@@ -1098,8 +1098,6 @@
<dimen name="media_output_dialog_header_icon_padding">16dp</dimen>
<dimen name="media_output_dialog_icon_corner_radius">16dp</dimen>
<dimen name="media_output_dialog_title_anim_y_delta">12.5dp</dimen>
<dimen name="media_output_dialog_button_padding_horizontal">16dp</dimen>
<dimen name="media_output_dialog_button_padding_vertical">8dp</dimen>
<!-- Distance that the full shade transition takes in order for qs to fully transition to the
shade -->

View File

@@ -454,20 +454,6 @@
<item name="android:colorBackground">@color/media_dialog_background</item>
</style>
<style name="MediaOutputRoundedOutlinedButton" parent="@android:style/Widget.Material.Button">
<item name="android:background">@drawable/media_output_dialog_button_background</item>
<item name="android:textColor">@color/media_dialog_outlined_button_text</item>
<item name="android:textSize">14sp</item>
<item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
</style>
<style name="MediaOutputRoundedButton" parent="@android:style/Widget.Material.Button">
<item name="android:background">@drawable/media_output_dialog_solid_button_background</item>
<item name="android:textColor">@color/media_dialog_solid_button_text</item>
<item name="android:textSize">14sp</item>
<item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
</style>
<style name="MediaOutputItemInactiveTitle">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/media_dialog_inactive_item_main_content</item>
@@ -900,13 +886,18 @@
<item name="android:textAlignment">center</item>
</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:textColor">?androidprv:attr/textColorOnAccent</item>
<item name="android:textSize">14sp</item>
<item name="android:lineHeight">20sp</item>
<item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item>
<item name="android:stateListAnimator">@null</item>
<item name="android:minWidth">0dp</item>
</style>
<style name="Widget.Dialog.Button.BorderButton">

View File

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

View File

@@ -98,7 +98,7 @@ public class DataSaverTile extends QSTileImpl<BooleanState> implements
toggleDataSaver();
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);
if (view != null) {

View File

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

View File

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

View File

@@ -40,7 +40,7 @@ public class UserUtil {
super(context);
setTitle(R.string.user_remove_user_title);
setMessage(context.getString(R.string.user_remove_user_message));
setButton(DialogInterface.BUTTON_NEGATIVE,
setButton(DialogInterface.BUTTON_NEUTRAL,
context.getString(android.R.string.cancel), this);
setButton(DialogInterface.BUTTON_POSITIVE,
context.getString(R.string.user_remove_user_remove), this);
@@ -51,7 +51,7 @@ public class UserUtil {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == BUTTON_NEGATIVE) {
if (which == BUTTON_NEUTRAL) {
cancel();
} else {
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.
*/
protected int getWidth() {
boolean isOnTablet =
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);
}
return getDefaultDialogWidth(mContext);
}
/**
@@ -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.
*/
protected int getHeight() {
return ViewGroup.LayoutParams.WRAP_CONTENT;
return getDefaultDialogHeight();
}
@Override
@@ -267,6 +244,45 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
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 final IntentFilter INTENT_FILTER = new IntentFilter();
static {

View File

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