diff options
Diffstat (limited to 'libs')
16 files changed, 36 insertions, 51 deletions
diff --git a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleStackViewTest.kt b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleStackViewTest.kt index 9d445f0bb80d..88bfeb21bb74 100644 --- a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleStackViewTest.kt +++ b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleStackViewTest.kt @@ -685,7 +685,6 @@ class BubbleStackViewTest { expandedViewManager, bubbleTaskViewFactory, positioner, - bubbleLogger, bubbleStackView, null, iconFactory, diff --git a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleViewInfoTaskTest.kt b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleViewInfoTaskTest.kt index 77aee98e6f6e..4168686e9947 100644 --- a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleViewInfoTaskTest.kt +++ b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleViewInfoTaskTest.kt @@ -327,7 +327,6 @@ class BubbleViewInfoTaskTest { expandedViewManager, bubbleTaskViewFactory, bubblePositioner, - bubbleLogger, bubbleStackView, null /* layerView */, iconFactory, diff --git a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/FakeBubbleFactory.kt b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/FakeBubbleFactory.kt index 750178678785..af33a8daee9d 100644 --- a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/FakeBubbleFactory.kt +++ b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/FakeBubbleFactory.kt @@ -45,10 +45,10 @@ class FakeBubbleFactory { .inflate(R.layout.bubble_bar_expanded_view, null, false /* attachToRoot */) as BubbleBarExpandedView) .apply { + this.bubbleLogger = bubbleLogger initialize( expandedViewManager, bubblePositioner, - bubbleLogger, false, /* isOverflow */ bubbleTaskView, mainExecutor, diff --git a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelperTest.kt b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelperTest.kt index 68b3d8822525..56cee4221dba 100644 --- a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelperTest.kt +++ b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelperTest.kt @@ -358,7 +358,7 @@ class BubbleBarAnimationHelperTest { private fun createOverflow(): BubbleOverflow { val overflow = BubbleOverflow(context, bubblePositioner) - overflow.initializeForBubbleBar(expandedViewManager, bubblePositioner, bubbleLogger) + overflow.initializeForBubbleBar(expandedViewManager, bubblePositioner) return overflow } diff --git a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewTest.kt b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewTest.kt index 037bd227d33c..1440873cfdf7 100644 --- a/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewTest.kt +++ b/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewTest.kt @@ -114,10 +114,10 @@ class BubbleBarExpandedViewTest { bubbleExpandedView = inflater.inflate( R.layout.bubble_bar_expanded_view, null, false /* attachToRoot */ ) as BubbleBarExpandedView + bubbleExpandedView.bubbleLogger = BubbleLogger(uiEventLoggerFake) bubbleExpandedView.initialize( expandedViewManager, positioner, - BubbleLogger(uiEventLoggerFake), false /* isOverflow */, bubbleTaskView, mainExecutor, @@ -279,7 +279,6 @@ class BubbleBarExpandedViewTest { expandedView.initialize( expandedViewManager, positioner, - BubbleLogger(uiEventLoggerFake), false /* isOverflow */, taskView, mainExecutor, @@ -321,7 +320,6 @@ class BubbleBarExpandedViewTest { expandedView.initialize( expandedViewManager, positioner, - BubbleLogger(uiEventLoggerFake), false /* isOverflow */, taskView, mainExecutor, diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java index 50ff58d7cf22..ddcdf9f8c617 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubble.java @@ -675,7 +675,6 @@ public class Bubble implements BubbleViewProvider { * @param expandedViewManager the bubble expanded view manager. * @param taskViewFactory the task view factory used to create the task view for the bubble. * @param positioner the bubble positioner. - * @param bubbleLogger log bubble metrics. * @param stackView the view the bubble is added to, iff showing as floating. * @param layerView the layer the bubble is added to, iff showing in the bubble bar. * @param iconFactory the icon factory used to create images for the bubble. @@ -685,7 +684,6 @@ public class Bubble implements BubbleViewProvider { BubbleExpandedViewManager expandedViewManager, BubbleTaskViewFactory taskViewFactory, BubblePositioner positioner, - BubbleLogger bubbleLogger, @Nullable BubbleStackView stackView, @Nullable BubbleBarLayerView layerView, BubbleIconFactory iconFactory, @@ -700,7 +698,6 @@ public class Bubble implements BubbleViewProvider { expandedViewManager, taskViewFactory, positioner, - bubbleLogger, stackView, layerView, iconFactory, @@ -722,7 +719,6 @@ public class Bubble implements BubbleViewProvider { expandedViewManager, taskViewFactory, positioner, - bubbleLogger, stackView, layerView, iconFactory, diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java index 66abcabed109..b93b7b86e661 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java @@ -1028,7 +1028,7 @@ public class BubbleController implements ConfigurationChangeListener, registerBroadcastReceiver(); if (isShowingAsBubbleBar()) { mBubbleData.getOverflow().initializeForBubbleBar( - mExpandedViewManager, mBubblePositioner, mLogger); + mExpandedViewManager, mBubblePositioner); } else { mBubbleData.getOverflow().initialize( mExpandedViewManager, mStackView, mBubblePositioner); @@ -1236,7 +1236,6 @@ public class BubbleController implements ConfigurationChangeListener, mExpandedViewManager, mBubbleTaskViewFactory, mBubblePositioner, - mLogger, mStackView, mLayerView, mBubbleIconFactory, @@ -1248,7 +1247,6 @@ public class BubbleController implements ConfigurationChangeListener, mExpandedViewManager, mBubbleTaskViewFactory, mBubblePositioner, - mLogger, mStackView, mLayerView, mBubbleIconFactory, @@ -1560,7 +1558,7 @@ public class BubbleController implements ConfigurationChangeListener, // Lazy init stack view when a bubble is created ensureBubbleViewsAndWindowCreated(); mBubbleTransitions.startConvertToBubble(b, taskInfo, mExpandedViewManager, - mBubbleTaskViewFactory, mBubblePositioner, mLogger, mStackView, mLayerView, + mBubbleTaskViewFactory, mBubblePositioner, mStackView, mLayerView, mBubbleIconFactory, mInflateSynchronously); } } @@ -1771,7 +1769,6 @@ public class BubbleController implements ConfigurationChangeListener, mExpandedViewManager, mBubbleTaskViewFactory, mBubblePositioner, - mLogger, mStackView, mLayerView, mBubbleIconFactory, @@ -1835,7 +1832,6 @@ public class BubbleController implements ConfigurationChangeListener, mExpandedViewManager, mBubbleTaskViewFactory, mBubblePositioner, - mLogger, mStackView, mLayerView, mBubbleIconFactory, @@ -1917,7 +1913,6 @@ public class BubbleController implements ConfigurationChangeListener, mExpandedViewManager, mBubbleTaskViewFactory, mBubblePositioner, - mLogger, mStackView, mLayerView, mBubbleIconFactory, diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleLogger.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleLogger.java index 00b2f15f45eb..831f2271d500 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleLogger.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleLogger.java @@ -20,6 +20,8 @@ import com.android.internal.logging.UiEvent; import com.android.internal.logging.UiEventLogger; import com.android.internal.util.FrameworkStatsLog; +import javax.inject.Inject; + /** * Implementation of UiEventLogger for logging bubble UI events. * @@ -169,6 +171,7 @@ public class BubbleLogger { } } + @Inject public BubbleLogger(UiEventLogger uiEventLogger) { mUiEventLogger = uiEventLogger; } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflow.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflow.kt index 086c91985ae3..d94f8440d3c9 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflow.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleOverflow.kt @@ -73,13 +73,11 @@ class BubbleOverflow(private val context: Context, private val positioner: Bubbl fun initializeForBubbleBar( expandedViewManager: BubbleExpandedViewManager, positioner: BubblePositioner, - bubbleLogger: BubbleLogger, ) { createBubbleBarExpandedView() .initialize( expandedViewManager, positioner, - bubbleLogger, /* isOverflow= */ true, /* bubbleTaskView= */ null, /* mainExecutor= */ null, diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java index 48b83ce49e61..df8b4fd12540 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java @@ -90,13 +90,12 @@ public class BubbleTransitions { */ public BubbleTransition startConvertToBubble(Bubble bubble, TaskInfo taskInfo, BubbleExpandedViewManager expandedViewManager, BubbleTaskViewFactory factory, - BubblePositioner positioner, BubbleLogger logger, BubbleStackView stackView, + BubblePositioner positioner, BubbleStackView stackView, BubbleBarLayerView layerView, BubbleIconFactory iconFactory, boolean inflateSync) { - ConvertToBubble convert = new ConvertToBubble(bubble, taskInfo, mContext, - expandedViewManager, factory, positioner, logger, stackView, layerView, iconFactory, + return new ConvertToBubble(bubble, taskInfo, mContext, + expandedViewManager, factory, positioner, stackView, layerView, iconFactory, inflateSync); - return convert; } /** @@ -182,7 +181,7 @@ public class BubbleTransitions { ConvertToBubble(Bubble bubble, TaskInfo taskInfo, Context context, BubbleExpandedViewManager expandedViewManager, BubbleTaskViewFactory factory, - BubblePositioner positioner, BubbleLogger logger, BubbleStackView stackView, + BubblePositioner positioner, BubbleStackView stackView, BubbleBarLayerView layerView, BubbleIconFactory iconFactory, boolean inflateSync) { mBubble = bubble; mTaskInfo = taskInfo; @@ -195,7 +194,6 @@ public class BubbleTransitions { expandedViewManager, factory, positioner, - logger, stackView, layerView, iconFactory, diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTask.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTask.java index 96b6043059d2..d78f459c6f5f 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTask.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTask.java @@ -73,7 +73,6 @@ public class BubbleViewInfoTask { private final WeakReference<BubbleExpandedViewManager> mExpandedViewManager; private final WeakReference<BubbleTaskViewFactory> mTaskViewFactory; private final WeakReference<BubblePositioner> mPositioner; - private final WeakReference<BubbleLogger> mBubbleLogger; private final WeakReference<BubbleStackView> mStackView; private final WeakReference<BubbleBarLayerView> mLayerView; private final BubbleIconFactory mIconFactory; @@ -95,7 +94,6 @@ public class BubbleViewInfoTask { BubbleExpandedViewManager expandedViewManager, BubbleTaskViewFactory taskViewFactory, BubblePositioner positioner, - BubbleLogger bubbleLogger, @Nullable BubbleStackView stackView, @Nullable BubbleBarLayerView layerView, BubbleIconFactory factory, @@ -108,7 +106,6 @@ public class BubbleViewInfoTask { mExpandedViewManager = new WeakReference<>(expandedViewManager); mTaskViewFactory = new WeakReference<>(taskViewFactory); mPositioner = new WeakReference<>(positioner); - mBubbleLogger = new WeakReference<>(bubbleLogger); mStackView = new WeakReference<>(stackView); mLayerView = new WeakReference<>(layerView); mIconFactory = factory; @@ -224,7 +221,7 @@ public class BubbleViewInfoTask { ProtoLog.v(WM_SHELL_BUBBLES, "Task initializing bubble bar expanded view key=%s", mBubble.getKey()); viewInfo.bubbleBarExpandedView.initialize(mExpandedViewManager.get(), - mPositioner.get(), mBubbleLogger.get(), false /* isOverflow */, + mPositioner.get(), false /* isOverflow */, viewInfo.taskView, mMainExecutor, mBgExecutor, new RegionSamplingProvider() { @Override diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTaskLegacy.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTaskLegacy.java index c1da94cc470f..06e02a1a4cf8 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTaskLegacy.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleViewInfoTaskLegacy.java @@ -78,7 +78,6 @@ public class BubbleViewInfoTaskLegacy extends private WeakReference<BubbleExpandedViewManager> mExpandedViewManager; private WeakReference<BubbleTaskViewFactory> mTaskViewFactory; private WeakReference<BubblePositioner> mPositioner; - private WeakReference<BubbleLogger> mBubbleLogger; private WeakReference<BubbleStackView> mStackView; private WeakReference<BubbleBarLayerView> mLayerView; private BubbleIconFactory mIconFactory; @@ -96,7 +95,6 @@ public class BubbleViewInfoTaskLegacy extends BubbleExpandedViewManager expandedViewManager, BubbleTaskViewFactory taskViewFactory, BubblePositioner positioner, - BubbleLogger bubbleLogger, @Nullable BubbleStackView stackView, @Nullable BubbleBarLayerView layerView, BubbleIconFactory factory, @@ -109,7 +107,6 @@ public class BubbleViewInfoTaskLegacy extends mExpandedViewManager = new WeakReference<>(expandedViewManager); mTaskViewFactory = new WeakReference<>(taskViewFactory); mPositioner = new WeakReference<>(positioner); - mBubbleLogger = new WeakReference<>(bubbleLogger); mStackView = new WeakReference<>(stackView); mLayerView = new WeakReference<>(layerView); mIconFactory = factory; @@ -127,9 +124,8 @@ public class BubbleViewInfoTaskLegacy extends } if (mLayerView.get() != null) { return BubbleViewInfo.populateForBubbleBar(mContext.get(), mExpandedViewManager.get(), - mTaskViewFactory.get(), mPositioner.get(), mBubbleLogger.get(), - mLayerView.get(), mIconFactory, mBubble, mSkipInflation, mMainExecutor, - mBackgroundExecutor); + mTaskViewFactory.get(), mPositioner.get(), mLayerView.get(), mIconFactory, + mBubble, mSkipInflation, mMainExecutor, mBackgroundExecutor); } else { return BubbleViewInfo.populate(mContext.get(), mExpandedViewManager.get(), mTaskViewFactory.get(), mPositioner.get(), mStackView.get(), mIconFactory, @@ -191,7 +187,6 @@ public class BubbleViewInfoTaskLegacy extends BubbleExpandedViewManager expandedViewManager, BubbleTaskViewFactory taskViewFactory, BubblePositioner positioner, - BubbleLogger bubbleLogger, BubbleBarLayerView layerView, BubbleIconFactory iconFactory, Bubble b, @@ -205,7 +200,7 @@ public class BubbleViewInfoTaskLegacy extends LayoutInflater inflater = LayoutInflater.from(c); info.bubbleBarExpandedView = (BubbleBarExpandedView) inflater.inflate( R.layout.bubble_bar_expanded_view, layerView, false /* attachToRoot */); - info.bubbleBarExpandedView.initialize(expandedViewManager, positioner, bubbleLogger, + info.bubbleBarExpandedView.initialize(expandedViewManager, positioner, false /* isOverflow */, bubbleTaskView, mainExecutor, backgroundExecutor, new RegionSamplingProvider() { @Override diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java index ac5b9c9866ed..78c6cf377d8e 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java @@ -53,6 +53,8 @@ import com.android.wm.shell.taskview.TaskView; import java.util.concurrent.Executor; import java.util.function.Supplier; +import javax.inject.Inject; + /** Expanded view of a bubble when it's part of the bubble bar. */ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskViewHelper.Listener { /** @@ -107,7 +109,6 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView private Bubble mBubble; private BubbleExpandedViewManager mManager; private BubblePositioner mPositioner; - private BubbleLogger mBubbleLogger; private boolean mIsOverflow; private BubbleTaskViewHelper mBubbleTaskViewHelper; private BubbleBarMenuViewController mMenuViewController; @@ -177,6 +178,11 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView VISIBLE } + // Ideally this would be package private, but we have to set this in a fake for test and we + // don't yet have dagger set up for tests, so have to set manually + @Inject + public BubbleLogger bubbleLogger; + public BubbleBarExpandedView(Context context) { this(context, null); } @@ -218,7 +224,6 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView /** Initializes the view, must be called before doing anything else. */ public void initialize(BubbleExpandedViewManager expandedViewManager, BubblePositioner positioner, - BubbleLogger bubbleLogger, boolean isOverflow, @Nullable BubbleTaskView bubbleTaskView, @Nullable Executor mainExecutor, @@ -226,7 +231,6 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView @Nullable RegionSamplingProvider regionSamplingProvider) { mManager = expandedViewManager; mPositioner = positioner; - mBubbleLogger = bubbleLogger; mIsOverflow = isOverflow; mMainExecutor = mainExecutor; mBackgroundExecutor = backgroundExecutor; @@ -290,20 +294,20 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView if (mListener != null) { mListener.onUnBubbleConversation(bubble.getKey()); } - mBubbleLogger.log(bubble, BubbleLogger.Event.BUBBLE_BAR_APP_MENU_OPT_OUT); + bubbleLogger.log(bubble, BubbleLogger.Event.BUBBLE_BAR_APP_MENU_OPT_OUT); } @Override public void onOpenAppSettings(Bubble bubble) { mManager.collapseStack(); mContext.startActivityAsUser(bubble.getSettingsIntent(mContext), bubble.getUser()); - mBubbleLogger.log(bubble, BubbleLogger.Event.BUBBLE_BAR_APP_MENU_GO_TO_SETTINGS); + bubbleLogger.log(bubble, BubbleLogger.Event.BUBBLE_BAR_APP_MENU_GO_TO_SETTINGS); } @Override public void onDismissBubble(Bubble bubble) { mManager.dismissBubble(bubble, Bubbles.DISMISS_USER_GESTURE); - mBubbleLogger.log(bubble, BubbleLogger.Event.BUBBLE_BAR_BUBBLE_DISMISSED_APP_MENU); + bubbleLogger.log(bubble, BubbleLogger.Event.BUBBLE_BAR_BUBBLE_DISMISSED_APP_MENU); } @Override diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMComponent.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMComponent.java index 151dc438702d..ed5bebbb6a29 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMComponent.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMComponent.java @@ -23,6 +23,7 @@ import androidx.annotation.Nullable; import com.android.wm.shell.appzoomout.AppZoomOut; import com.android.wm.shell.back.BackAnimation; import com.android.wm.shell.bubbles.Bubbles; +import com.android.wm.shell.bubbles.bar.BubbleBarExpandedView; import com.android.wm.shell.desktopmode.DesktopMode; import com.android.wm.shell.displayareahelper.DisplayAreaHelper; import com.android.wm.shell.keyguard.KeyguardTransitions; @@ -72,6 +73,8 @@ public interface WMComponent { getShell().onInit(); } + // Interfaces provided to SysUI + @WMSingleton ShellInterface getShell(); @@ -116,4 +119,9 @@ public interface WMComponent { @WMSingleton Optional<AppZoomOut> getAppZoomOut(); + + // Injector methods to support field injection + + /** Injector method for {@link BubbleBarExpandedView}. */ + void inject(BubbleBarExpandedView bubbleBarExpandedView); } diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleOverflowTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleOverflowTest.java index a1d4a1a301bd..094af9652ea3 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleOverflowTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleOverflowTest.java @@ -26,7 +26,6 @@ import android.view.WindowManager; import androidx.test.filters.SmallTest; -import com.android.internal.logging.testing.UiEventLoggerFake; import com.android.wm.shell.ShellTestCase; import org.junit.Before; @@ -46,7 +45,6 @@ public class BubbleOverflowTest extends ShellTestCase { private TestableBubblePositioner mPositioner; private BubbleOverflow mOverflow; private BubbleExpandedViewManager mExpandedViewManager; - private BubbleLogger mBubbleLogger; @Mock private BubbleController mBubbleController; @@ -60,7 +58,6 @@ public class BubbleOverflowTest extends ShellTestCase { mExpandedViewManager = BubbleExpandedViewManager.fromBubbleController(mBubbleController); mPositioner = new TestableBubblePositioner(mContext, mContext.getSystemService(WindowManager.class)); - mBubbleLogger = new BubbleLogger(new UiEventLoggerFake()); when(mBubbleController.getPositioner()).thenReturn(mPositioner); when(mBubbleController.getStackView()).thenReturn(mBubbleStackView); @@ -80,7 +77,7 @@ public class BubbleOverflowTest extends ShellTestCase { @Test public void test_initialize_forBubbleBar() { - mOverflow.initializeForBubbleBar(mExpandedViewManager, mPositioner, mBubbleLogger); + mOverflow.initializeForBubbleBar(mExpandedViewManager, mPositioner); assertThat(mOverflow.getBubbleBarExpandedView()).isNotNull(); assertThat(mOverflow.getExpandedView()).isNull(); diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleTransitionsTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleTransitionsTest.java index 9d0ddbc6de12..4198f5904566 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleTransitionsTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleTransitionsTest.java @@ -78,8 +78,6 @@ public class BubbleTransitionsTest extends ShellTestCase { @Mock private BubblePositioner mBubblePositioner; @Mock - private BubbleLogger mBubbleLogger; - @Mock private BubbleStackView mStackView; @Mock private BubbleBarLayerView mLayerView; @@ -139,7 +137,7 @@ public class BubbleTransitionsTest extends ShellTestCase { ActivityManager.RunningTaskInfo taskInfo = setupBubble(); final BubbleTransitions.BubbleTransition bt = mBubbleTransitions.startConvertToBubble( mBubble, taskInfo, mExpandedViewManager, mTaskViewFactory, mBubblePositioner, - mBubbleLogger, mStackView, mLayerView, mIconFactory, false); + mStackView, mLayerView, mIconFactory, false); final BubbleTransitions.ConvertToBubble ctb = (BubbleTransitions.ConvertToBubble) bt; ctb.onInflated(mBubble); when(mLayerView.canExpandView(any())).thenReturn(true); |