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

Commit 4a21bd3f authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Pass bubble logger to BubbleBarExpandedView" into main

parents 8463b471 35137deb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ class BubbleStackViewTest {

    private val context = ApplicationProvider.getApplicationContext<Context>()
    private lateinit var positioner: BubblePositioner
    private lateinit var bubbleLogger: BubbleLogger
    private lateinit var iconFactory: BubbleIconFactory
    private lateinit var expandedViewManager: FakeBubbleExpandedViewManager
    private lateinit var bubbleStackView: BubbleStackView
@@ -96,10 +97,11 @@ class BubbleStackViewTest {
                )
            )
        positioner = BubblePositioner(context, windowManager)
        bubbleLogger = BubbleLogger(UiEventLoggerFake())
        bubbleData =
            BubbleData(
                context,
                BubbleLogger(UiEventLoggerFake()),
                bubbleLogger,
                positioner,
                BubbleEducationController(context),
                shellExecutor,
@@ -394,6 +396,7 @@ class BubbleStackViewTest {
            expandedViewManager,
            bubbleTaskViewFactory,
            positioner,
            bubbleLogger,
            bubbleStackView,
            null,
            iconFactory,
+6 −2
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.R
import com.android.internal.logging.testing.UiEventLoggerFake
import com.android.internal.protolog.ProtoLog
import com.android.internal.statusbar.IStatusBarService
import com.android.launcher3.icons.BubbleIconFactory
@@ -70,6 +71,7 @@ class BubbleViewInfoTaskTest {
    private lateinit var bgExecutor: TestExecutor
    private lateinit var bubbleStackView: BubbleStackView
    private lateinit var bubblePositioner: BubblePositioner
    private lateinit var bubbleLogger: BubbleLogger
    private lateinit var expandedViewManager: BubbleExpandedViewManager

    private val bubbleTaskViewFactory = BubbleTaskViewFactory {
@@ -103,10 +105,11 @@ class BubbleViewInfoTaskTest {
                mainExecutor
            )
        bubblePositioner = BubblePositioner(context, windowManager)
        bubbleLogger = BubbleLogger(UiEventLoggerFake())
        val bubbleData =
            BubbleData(
                context,
                mock<BubbleLogger>(),
                bubbleLogger,
                bubblePositioner,
                BubbleEducationController(context),
                mainExecutor,
@@ -138,7 +141,7 @@ class BubbleViewInfoTaskTest {
                WindowManagerShellWrapper(mainExecutor),
                mock<UserManager>(),
                mock<LauncherApps>(),
                mock<BubbleLogger>(),
                bubbleLogger,
                mock<TaskStackListenerImpl>(),
                mock<ShellTaskOrganizer>(),
                bubblePositioner,
@@ -314,6 +317,7 @@ class BubbleViewInfoTaskTest {
            expandedViewManager,
            bubbleTaskViewFactory,
            bubblePositioner,
            bubbleLogger,
            bubbleStackView,
            null /* layerView */,
            iconFactory,
+4 −1
Original line number Diff line number Diff line
@@ -27,11 +27,13 @@ import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
import com.android.internal.logging.testing.UiEventLoggerFake
import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.R
import com.android.wm.shell.bubbles.Bubble
import com.android.wm.shell.bubbles.BubbleData
import com.android.wm.shell.bubbles.BubbleExpandedViewManager
import com.android.wm.shell.bubbles.BubbleLogger
import com.android.wm.shell.bubbles.BubblePositioner
import com.android.wm.shell.bubbles.BubbleTaskView
import com.android.wm.shell.bubbles.BubbleTaskViewFactory
@@ -106,11 +108,12 @@ class BubbleBarExpandedViewTest {
        bubbleExpandedView.initialize(
            expandedViewManager,
            positioner,
            BubbleLogger(UiEventLoggerFake()),
            false /* isOverflow */,
            bubbleTaskView,
            mainExecutor,
            bgExecutor,
            regionSamplingProvider
            regionSamplingProvider,
        )

        getInstrumentation().runOnMainSync(Runnable {
+4 −0
Original line number Diff line number Diff line
@@ -572,6 +572,7 @@ 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.
@@ -581,6 +582,7 @@ public class Bubble implements BubbleViewProvider {
            BubbleExpandedViewManager expandedViewManager,
            BubbleTaskViewFactory taskViewFactory,
            BubblePositioner positioner,
            BubbleLogger bubbleLogger,
            @Nullable BubbleStackView stackView,
            @Nullable BubbleBarLayerView layerView,
            BubbleIconFactory iconFactory,
@@ -595,6 +597,7 @@ public class Bubble implements BubbleViewProvider {
                    expandedViewManager,
                    taskViewFactory,
                    positioner,
                    bubbleLogger,
                    stackView,
                    layerView,
                    iconFactory,
@@ -616,6 +619,7 @@ public class Bubble implements BubbleViewProvider {
                    expandedViewManager,
                    taskViewFactory,
                    positioner,
                    bubbleLogger,
                    stackView,
                    layerView,
                    iconFactory,
+6 −1
Original line number Diff line number Diff line
@@ -892,7 +892,7 @@ public class BubbleController implements ConfigurationChangeListener,
            registerBroadcastReceiver();
            if (isShowingAsBubbleBar()) {
                mBubbleData.getOverflow().initializeForBubbleBar(
                        mExpandedViewManager, mBubblePositioner);
                        mExpandedViewManager, mBubblePositioner, mLogger);
            } else {
                mBubbleData.getOverflow().initialize(
                        mExpandedViewManager, mStackView, mBubblePositioner);
@@ -1100,6 +1100,7 @@ public class BubbleController implements ConfigurationChangeListener,
                    mExpandedViewManager,
                    mBubbleTaskViewFactory,
                    mBubblePositioner,
                    mLogger,
                    mStackView,
                    mLayerView,
                    mBubbleIconFactory,
@@ -1111,6 +1112,7 @@ public class BubbleController implements ConfigurationChangeListener,
                    mExpandedViewManager,
                    mBubbleTaskViewFactory,
                    mBubblePositioner,
                    mLogger,
                    mStackView,
                    mLayerView,
                    mBubbleIconFactory,
@@ -1585,6 +1587,7 @@ public class BubbleController implements ConfigurationChangeListener,
                        mExpandedViewManager,
                        mBubbleTaskViewFactory,
                        mBubblePositioner,
                        mLogger,
                        mStackView,
                        mLayerView,
                        mBubbleIconFactory,
@@ -1647,6 +1650,7 @@ public class BubbleController implements ConfigurationChangeListener,
                    mExpandedViewManager,
                    mBubbleTaskViewFactory,
                    mBubblePositioner,
                    mLogger,
                    mStackView,
                    mLayerView,
                    mBubbleIconFactory,
@@ -1727,6 +1731,7 @@ public class BubbleController implements ConfigurationChangeListener,
                mExpandedViewManager,
                mBubbleTaskViewFactory,
                mBubblePositioner,
                mLogger,
                mStackView,
                mLayerView,
                mBubbleIconFactory,
Loading