what-the-bank/sources/com/google/android/gms/common/SupportErrorDialogFragment....

60 lines
2.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.common;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import androidx.fragment.app.DialogFragment;
import com.google.android.gms.common.internal.Preconditions;
import o.yRS;
/* loaded from: classes.dex */
public class SupportErrorDialogFragment extends DialogFragment {
private Dialog zaa;
private DialogInterface.OnCancelListener zab;
private Dialog zac;
public static SupportErrorDialogFragment newInstance(Dialog dialog) {
return newInstance(dialog, null);
}
@Override // androidx.fragment.app.DialogFragment, android.content.DialogInterface.OnCancelListener
public void onCancel(DialogInterface dialogInterface) {
DialogInterface.OnCancelListener onCancelListener = this.zab;
if (onCancelListener != null) {
onCancelListener.onCancel(dialogInterface);
}
}
@Override // androidx.fragment.app.DialogFragment
public Dialog onCreateDialog(Bundle bundle) {
Dialog dialog = this.zaa;
if (dialog != null) {
return dialog;
}
setShowsDialog(false);
if (this.zac == null) {
this.zac = new AlertDialog.Builder((Context) Preconditions.checkNotNull(getContext())).create();
}
return this.zac;
}
@Override // androidx.fragment.app.DialogFragment
public void show(yRS yrs, String str) {
super.show(yrs, str);
}
public static SupportErrorDialogFragment newInstance(Dialog dialog, DialogInterface.OnCancelListener onCancelListener) {
SupportErrorDialogFragment supportErrorDialogFragment = new SupportErrorDialogFragment();
Dialog dialog2 = (Dialog) Preconditions.checkNotNull(dialog, "Cannot display null dialog");
dialog2.setOnCancelListener(null);
dialog2.setOnDismissListener(null);
supportErrorDialogFragment.zaa = dialog2;
if (onCancelListener != null) {
supportErrorDialogFragment.zab = onCancelListener;
}
return supportErrorDialogFragment;
}
}