Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1e85029 authored by Sam Mortimer's avatar Sam Mortimer
Browse files

LineageParts: Expose onStart/Stop/Resume/Pause methods from CustomDialogPreference

Needed for optimal handling of dialog lifecycle events.

Change-Id: Ia8937eb20b7baa4fa3855c91e70c12440f563b89
parent d629eb4a
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -68,6 +68,18 @@ public class CustomDialogPreference<T extends DialogInterface> extends DialogPre
    protected void onBindDialogView(View view) {
    }

    protected void onStart() {
    }

    protected void onStop() {
    }

    protected void onPause() {
    }

    protected void onResume() {
    }

    public Dialog onCreateDialog(Bundle savedInstanceState) {
        return null;
    }
@@ -134,6 +146,25 @@ public class CustomDialogPreference<T extends DialogInterface> extends DialogPre
                            new OnDismissListener(a, Dialog.BUTTON_NEGATIVE));
                }
            }
            getCustomizablePreference().onStart();
        }

        @Override
        public void onStop() {
            super.onStop();
            getCustomizablePreference().onStop();
        }

        @Override
        public void onPause() {
            super.onPause();
            getCustomizablePreference().onPause();
        }

        @Override
        public void onResume() {
            super.onResume();
            getCustomizablePreference().onResume();
        }

        @Override