Merge "Make the force stop dialog work properly in split screen" into tm-dev

This commit is contained in:
Yi-Ling Chuang
2022-05-12 03:23:11 +00:00
committed by Android (Google) Code Review
2 changed files with 23 additions and 0 deletions

View File

@@ -90,6 +90,12 @@ public class ButtonActionDialogFragment extends InstrumentedDialogFragment imple
@Override
public void onClick(DialogInterface dialog, int which) {
// When it's in a multi-window mode, force stopping an app will lead to an activity
// recreate, and the dialog fragment will also be recreated. So dismiss the dialog before
// stopping the app.
if (mId == ButtonActionDialogFragment.DialogType.FORCE_STOP) {
dialog.dismiss();
}
final AppButtonsDialogListener lsn =
(AppButtonsDialogListener) getTargetFragment();
lsn.handleDialogClick(mId);