fixing Lint error because of new API in API 23 (Marshmallow)

This commit is contained in:
Peter Siegmund committed 2015-09-10 12:14:41 +02:00
1 parent b1fa4c26cc
commit 8693de6be1
4 files changed
+8 -8

No files matched your search

@@ -21,7 +21,7 @@ public abstract class ActivityAttachedDialogFragment extends AttachedDialogFragm
}
@Override
protected DialogListenerHost getHost() {
protected DialogListenerHost getListenerHost() {
return this.hostActivity;
}
@@ -18,7 +18,7 @@ public abstract class AttachedDialogFragment extends LoggableDialogFragment {
protected abstract AlertDialog.Builder createDialog(AlertDialog.Builder builder);
protected abstract DialogListenerHost getHost();
protected abstract DialogListenerHost getListenerHost();
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
@@ -39,16 +39,16 @@ public abstract class AttachedDialogFragment extends LoggableDialogFragment {
}
protected void onNegativeButton() {
if (getHost() != null) {
getHost().getListener().onDialogNegativeButton(this);
if (getListenerHost() != null) {
getListenerHost().getListener().onDialogNegativeButton(this);
} else {
ExLog.w(getActivity(), TAG, "Dialog host was null.");
}
}
protected void onPositiveButton() {
if (getHost() != null && getHost().getListener() != null) {
getHost().getListener().onDialogPositiveButton(this);
if (getListenerHost() != null && getListenerHost().getListener() != null) {
getListenerHost().getListener().onDialogPositiveButton(this);
} else {
ExLog.w(getActivity(), TAG, "Dialog host was null.");
}
@@ -5,7 +5,7 @@ import android.app.Fragment;
public abstract class FragmentAttachedDialogFragment extends AttachedDialogFragment {
@Override
protected DialogListenerHost getHost() {
protected DialogListenerHost getListenerHost() {
Fragment targetFragment = getTargetFragment();
if (targetFragment instanceof DialogListenerHost) {
return (DialogListenerHost) targetFragment;
@@ -79,7 +79,7 @@ public class ProtestTimeDialogFragment extends AttachedDialogFragment {
}
@Override
protected DialogListenerHost getHost() {
protected DialogListenerHost getListenerHost() {
return new DialogListenerHost() {
@Override
public DialogResultListener getListener() {