mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 22:37:15 +00:00
fixing Lint error because of new API in API 23 (Marshmallow)
This commit is contained in:
1 parent
b1fa4c26cc
commit
8693de6be1
4 files changed
+8
-8
No files matched your search
+1
-1
@@ -21,7 +21,7 @@ public abstract class ActivityAttachedDialogFragment extends AttachedDialogFragm
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DialogListenerHost getHost() {
|
||||
protected DialogListenerHost getListenerHost() {
|
||||
return this.hostActivity;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -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.");
|
||||
}
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ public class ProtestTimeDialogFragment extends AttachedDialogFragment {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DialogListenerHost getHost() {
|
||||
protected DialogListenerHost getListenerHost() {
|
||||
return new DialogListenerHost() {
|
||||
@Override
|
||||
public DialogResultListener getListener() {
|
||||
|
||||
Reference in new issue
Block a user