| | |
| | | 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; |
| | | |
| | |
| | | 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); |
| | |
| | | private static boolean isInExecutionScope(Object executionScope, ThrowableFailureEvent event) { |
| | | if (event != null) { |
| | | Object eventExecutionScope = event.getExecutionScope(); |
| | | if (eventExecutionScope != null && !eventExecutionScope.equals(executionScope)) { |
| | | // Event not in our scope, do nothing |
| | | return false; |
| | | } |
| | | // Event not in our scope, do nothing |
| | | return eventExecutionScope == null || eventExecutionScope.equals(executionScope); |
| | | } |
| | | return true; |
| | | } |