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

Commit c10f2ad5 authored by Mady Mellor's avatar Mady Mellor
Browse files

Remove BubbleProperties

This was used to enable / disable bubble bar in tests prior to the
existence of the flag annotations, now that we have the flag annotations
we no longer need this.

Flag: EXEMPT removing trivial code
Test: make sysuig
Test: atest BubbleControllerBubbleBarTest BubbleViewInfoTaskTest BubbleBarLayerViewTest BubbleInfoTest BubblesTest
Bug: 390675904
Change-Id: Ia17310cdc5b4653037eaf7b2dfb9b0a3eca2acd9
parent f7daec3b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import com.android.internal.statusbar.IStatusBarService
import com.android.wm.shell.Flags
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.bubbles.Bubbles.SysuiProxy
import com.android.wm.shell.bubbles.properties.ProdBubbleProperties
import com.android.wm.shell.bubbles.storage.BubblePersistentRepository
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.DisplayImeController
@@ -288,7 +287,6 @@ class BubbleControllerBubbleBarTest {
            mock<Transitions>(),
            SyncTransactionQueue(TransactionPool(), mainExecutor),
            mock<IWindowManager>(),
            ProdBubbleProperties,
            BubbleResizabilityChecker()
        )
    }
+0 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import com.android.internal.protolog.ProtoLog
import com.android.internal.statusbar.IStatusBarService
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.bubbles.Bubbles.SysuiProxy
import com.android.wm.shell.bubbles.properties.BubbleProperties
import com.android.wm.shell.bubbles.storage.BubblePersistentRepository
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.DisplayImeController
@@ -222,7 +221,6 @@ class BubbleControllerTest {
            mock<Transitions>(),
            SyncTransactionQueue(TransactionPool(), mainExecutor),
            mock<IWindowManager>(),
            mock<BubbleProperties>(),
            resizeChecker,
        )
        bubbleController.setInflateSynchronously(true)
+0 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import com.android.internal.protolog.ProtoLog
import com.android.internal.statusbar.IStatusBarService
import com.android.launcher3.icons.BubbleIconFactory
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.bubbles.properties.BubbleProperties
import com.android.wm.shell.bubbles.storage.BubblePersistentRepository
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.DisplayImeController
@@ -161,7 +160,6 @@ class BubbleViewInfoTaskTest {
                mock<Transitions>(),
                SyncTransactionQueue(TransactionPool(), mainExecutor),
                mock<IWindowManager>(),
                mock<BubbleProperties>(),
                BubbleResizabilityChecker()
            )

+0 −2
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import com.android.wm.shell.bubbles.FakeBubbleFactory
import com.android.wm.shell.bubbles.FakeBubbleTaskViewFactory
import com.android.wm.shell.bubbles.UiEventSubject.Companion.assertThat
import com.android.wm.shell.bubbles.animation.AnimatableScaleMatrix
import com.android.wm.shell.bubbles.properties.BubbleProperties
import com.android.wm.shell.bubbles.storage.BubblePersistentRepository
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.DisplayImeController
@@ -201,7 +200,6 @@ class BubbleBarLayerViewTest {
            mock<Transitions>(),
            SyncTransactionQueue(TransactionPool(), mainExecutor),
            mock<IWindowManager>(),
            mock<BubbleProperties>(),
            BubbleResizabilityChecker()
        )
    }
+1 −7
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@ import com.android.wm.shell.Flags;
import com.android.wm.shell.R;
import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.bubbles.bar.BubbleBarLayerView;
import com.android.wm.shell.bubbles.properties.BubbleProperties;
import com.android.wm.shell.bubbles.shortcut.BubbleShortcutHelper;
import com.android.wm.shell.common.DisplayController;
import com.android.wm.shell.common.DisplayImeController;
@@ -204,7 +203,6 @@ public class BubbleController implements ConfigurationChangeListener,
    private final ShellController mShellController;
    private final ShellCommandHandler mShellCommandHandler;
    private final IWindowManager mWmService;
    private final BubbleProperties mBubbleProperties;
    private final BubbleTaskViewFactory mBubbleTaskViewFactory;
    private final BubbleExpandedViewManager mExpandedViewManager;
    private final ResizabilityChecker mResizabilityChecker;
@@ -323,7 +321,6 @@ public class BubbleController implements ConfigurationChangeListener,
            Transitions transitions,
            SyncTransactionQueue syncQueue,
            IWindowManager wmService,
            BubbleProperties bubbleProperties,
            ResizabilityChecker resizabilityChecker) {
        mContext = context;
        mShellCommandHandler = shellCommandHandler;
@@ -373,7 +370,6 @@ public class BubbleController implements ConfigurationChangeListener,
        mDragAndDropController = dragAndDropController;
        mSyncQueue = syncQueue;
        mWmService = wmService;
        mBubbleProperties = bubbleProperties;
        shellInit.addInitCallback(this::onInit, this);
        mBubbleTaskViewFactory = new BubbleTaskViewFactory() {
            @Override
@@ -592,7 +588,6 @@ public class BubbleController implements ConfigurationChangeListener,
     * <p>If bubble bar is supported, bubble views will be updated to switch to bar mode.
     */
    public void registerBubbleStateListener(Bubbles.BubbleStateListener listener) {
        mBubbleProperties.refresh();
        if (canShowAsBubbleBar() && listener != null) {
            // Only set the listener if we can show the bubble bar.
            mBubbleStateListener = listener;
@@ -610,7 +605,6 @@ public class BubbleController implements ConfigurationChangeListener,
     * will be updated accordingly.
     */
    public void unregisterBubbleStateListener() {
        mBubbleProperties.refresh();
        if (mBubbleStateListener != null) {
            mBubbleStateListener = null;
            setUpBubbleViewsForMode();
@@ -775,7 +769,7 @@ public class BubbleController implements ConfigurationChangeListener,

    /** Whether the current configuration supports showing as bubble bar. */
    private boolean canShowAsBubbleBar() {
        return mBubbleProperties.isBubbleBarEnabled() && mBubblePositioner.isLargeScreen();
        return Flags.enableBubbleBar() && mBubblePositioner.isLargeScreen();
    }

    /**
Loading