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

Commit a1ff6f50 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Make CommandQueue implement CallbackController"

parents 1ddb6e81 d7c9855e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public class BiometricDialogImpl extends SystemUI implements CommandQueue.Callba
        createDialogs();

        if (!mDialogs.isEmpty()) {
            getComponent(CommandQueue.class).addCallbacks(this);
            getComponent(CommandQueue.class).addCallback(this);
            mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ public class GlobalActionsComponent extends SystemUI implements Callbacks, Globa
                .withCallback(this::onExtensionCallback)
                .build();
        mPlugin = mExtension.get();
        SysUiServiceProvider.getComponent(mContext, CommandQueue.class).addCallbacks(this);
        SysUiServiceProvider.getComponent(mContext, CommandQueue.class).addCallback(this);
    }

    private void onExtensionCallback(GlobalActions newPlugin) {
+2 −2
Original line number Diff line number Diff line
@@ -55,12 +55,12 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks
        mContext = context;
        mKeyguardMonitor = Dependency.get(KeyguardMonitor.class);
        mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
        SysUiServiceProvider.getComponent(context, CommandQueue.class).addCallbacks(this);
        SysUiServiceProvider.getComponent(context, CommandQueue.class).addCallback(this);
    }

    @Override
    public void destroy() {
        SysUiServiceProvider.getComponent(mContext, CommandQueue.class).removeCallbacks(this);
        SysUiServiceProvider.getComponent(mContext, CommandQueue.class).removeCallback(this);
        if (mGlobalActions != null) {
            mGlobalActions.destroy();
            mGlobalActions = null;
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ public class PipUI extends SystemUI implements CommandQueue.Callbacks {
                : com.android.systemui.pip.phone.PipManager.getInstance();
        mPipManager.initialize(mContext);

        getComponent(CommandQueue.class).addCallbacks(this);
        getComponent(CommandQueue.class).addCallback(this);
        putComponent(PipUI.class, this);
    }

+2 −2
Original line number Diff line number Diff line
@@ -108,12 +108,12 @@ public class QSFragment extends Fragment implements QS, CommandQueue.Callbacks {
                mQSPanel.getTileLayout().restoreInstanceState(savedInstanceState);
            }
        }
        SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).addCallbacks(this);
        SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).addCallback(this);
    }

    @Override
    public void onDestroyView() {
        SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).removeCallbacks(this);
        SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).removeCallback(this);
        super.onDestroyView();
    }

Loading