| | |
| | | import android.app.Application; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | import android.support.v4.app.DialogFragment; |
| | | import android.support.v4.app.Fragment; |
| | | import android.support.v4.app.FragmentActivity; |
| | | import android.support.v4.app.FragmentManager; |
| | | import androidx.fragment.app.DialogFragment; |
| | | import androidx.fragment.app.Fragment; |
| | | import androidx.fragment.app.FragmentActivity; |
| | | import androidx.fragment.app.FragmentManager; |
| | | import android.util.Log; |
| | | import de.greenrobot.event.EventBus; |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | | /** |
| | | * Central class for app that want to use event based error dialogs.<br/> |
| | |
| | | super.onPause(); |
| | | } |
| | | |
| | | @Subscribe |
| | | public void onEventMainThread(ThrowableFailureEvent event) { |
| | | if (!isInExecutionScope(executionScope, event)) { |
| | | return; |
| | |
| | | existingFragment.dismiss(); |
| | | } |
| | | |
| | | android.support.v4.app.DialogFragment errorFragment = (android.support.v4.app.DialogFragment) factory |
| | | DialogFragment errorFragment = (DialogFragment) factory |
| | | .prepareErrorFragment(event, finishAfterDialog, argumentsForErrorDialog); |
| | | if (errorFragment != null) { |
| | | errorFragment.show(fm, TAG_ERROR_DIALOG); |
| | |
| | | super.onPause(); |
| | | } |
| | | |
| | | @Subscribe |
| | | public void onEventMainThread(ThrowableFailureEvent event) { |
| | | if (!isInExecutionScope(executionScope, event)) { |
| | | return; |