Initial commit
This commit is contained in:
10
sources/org/greenrobot/eventbus/util/ErrorDialogConfig.java
Normal file
10
sources/org/greenrobot/eventbus/util/ErrorDialogConfig.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package org.greenrobot.eventbus.util;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class ErrorDialogConfig {
|
||||
EventBus a() {
|
||||
throw null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
package org.greenrobot.eventbus.util;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public abstract class ErrorDialogFragmentFactory<T> {
|
||||
protected final ErrorDialogConfig a;
|
||||
}
|
@@ -0,0 +1,60 @@
|
||||
package org.greenrobot.eventbus.util;
|
||||
|
||||
import android.R;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class ErrorDialogFragments {
|
||||
public static int a;
|
||||
public static Class<?> b;
|
||||
|
||||
@TargetApi(11)
|
||||
public static class Honeycomb extends DialogFragment implements DialogInterface.OnClickListener {
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
ErrorDialogFragments.a(dialogInterface, i, getActivity(), getArguments());
|
||||
}
|
||||
|
||||
@Override // android.app.DialogFragment
|
||||
public Dialog onCreateDialog(Bundle bundle) {
|
||||
return ErrorDialogFragments.a(getActivity(), getArguments(), this);
|
||||
}
|
||||
}
|
||||
|
||||
public static Dialog a(Context context, Bundle bundle, DialogInterface.OnClickListener onClickListener) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setTitle(bundle.getString("de.greenrobot.eventbus.errordialog.title"));
|
||||
builder.setMessage(bundle.getString("de.greenrobot.eventbus.errordialog.message"));
|
||||
int i = a;
|
||||
if (i != 0) {
|
||||
builder.setIcon(i);
|
||||
}
|
||||
builder.setPositiveButton(R.string.ok, onClickListener);
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
public static void a(DialogInterface dialogInterface, int i, Activity activity, Bundle bundle) {
|
||||
Class<?> cls = b;
|
||||
if (cls == null) {
|
||||
if (!bundle.getBoolean("de.greenrobot.eventbus.errordialog.finish_after_dialog", false) || activity == null) {
|
||||
return;
|
||||
}
|
||||
activity.finish();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
cls.newInstance();
|
||||
ErrorDialogManager.a.a.a();
|
||||
throw null;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Event cannot be constructed", e);
|
||||
}
|
||||
}
|
||||
}
|
28
sources/org/greenrobot/eventbus/util/ErrorDialogManager.java
Normal file
28
sources/org/greenrobot/eventbus/util/ErrorDialogManager.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package org.greenrobot.eventbus.util;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Fragment;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class ErrorDialogManager {
|
||||
public static ErrorDialogFragmentFactory<?> a;
|
||||
|
||||
@TargetApi(11)
|
||||
public static class HoneycombManagerFragment extends Fragment {
|
||||
private EventBus a;
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public void onPause() {
|
||||
this.a.d(this);
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
ErrorDialogManager.a.a.a();
|
||||
throw null;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user