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

Commit 36696ae7 authored by Behnam Heydarshahi's avatar Behnam Heydarshahi Committed by Android (Google) Code Review
Browse files

Merge "Allow SystemUIDialog.Factory to create with context from client" into main

parents 20c207fc 8f7c7b8a
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,