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

Commit 8f7c7b8a authored by Behnam Heydarshahi's avatar Behnam Heydarshahi
Browse files

Allow SystemUIDialog.Factory to create with context from client

Change-Id: I00438cff0525337f8f35ce19991cdf5fa39d7f91
Flag: None
Fixes: 315029242
Test: atest SystemUIDialogTest
parent 6c1bd4b3
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
         * When you just need a dialog, call this.
         */
        public SystemUIDialog create() {
            return create(new DialogDelegate<>(){});
            return create(new DialogDelegate<>(){}, mContext);
        }

        /**
@@ -155,13 +155,18 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
         *
         * When you need to customize the dialog, pass it a delegate.
         */
        public SystemUIDialog create(Delegate delegate, Context context) {
            return create((DialogDelegate<SystemUIDialog>) delegate, context);
        }

        public SystemUIDialog create(Delegate delegate) {
            return create((DialogDelegate<SystemUIDialog>) delegate);
            return create(delegate, mContext);
        }

        private SystemUIDialog create(DialogDelegate<SystemUIDialog> dialogDelegate) {
        private SystemUIDialog create(DialogDelegate<SystemUIDialog> dialogDelegate,
                Context context) {
            return new SystemUIDialog(
                    mContext,
                    context,
                    DEFAULT_THEME,
                    DEFAULT_DISMISS_ON_DEVICE_LOCK,
                    mFeatureFlags,