mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-09 12:48:02 -05:00
Fix ClassCastException
This commit is contained in:
parent
cfaa36403c
commit
2e398c8f79
@ -4,6 +4,7 @@ import android.app.Dialog;
|
|||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
|
||||||
import com.actionbarsherlock.app.SherlockDialogFragment;
|
import com.actionbarsherlock.app.SherlockDialogFragment;
|
||||||
|
|
||||||
@ -40,8 +41,9 @@ public class ProgressDialogFragment extends SherlockDialogFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCancel(DialogInterface dialog) {
|
public void onCancel(DialogInterface dialog) {
|
||||||
CancelListener listener = (CancelListener) getActivity();
|
FragmentActivity activity = getActivity();
|
||||||
if (listener != null && listener instanceof CancelListener) {
|
if (activity != null && activity instanceof CancelListener) {
|
||||||
|
CancelListener listener = (CancelListener) activity;
|
||||||
listener.onCancel(this);
|
listener.onCancel(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user