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

Commit 89a5f718 authored by Santhosh Thangaraj's avatar Santhosh Thangaraj Committed by Android (Google) Code Review
Browse files

Merge "Fix status bar animates when open bubble updates" into rvc-dev

parents 6bb0f4c6 837d4900
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.ViewMediatorCallback;
import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.dagger.DaggerSystemUIRootComponent;
import com.android.systemui.dagger.DependencyProvider;
import com.android.systemui.dagger.SystemUIRootComponent;
@@ -164,7 +165,8 @@ public class SystemUIFactory {
                wakeUpCoordinator, keyguardBypassController,
                Dependency.get(NotificationMediaManager.class),
                Dependency.get(NotificationListener.class),
                Dependency.get(DozeParameters.class));
                Dependency.get(DozeParameters.class),
                Dependency.get(BubbleController.class));
    }

    @Module
+12 −0
Original line number Diff line number Diff line
@@ -881,6 +881,18 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
        return (isSummary && isSuppressedSummary) || isSuppressedBubble;
    }

    /**
     * True if:
     * (1) The current notification entry same as selected bubble notification entry and the
     * stack is currently expanded.
     *
     * False otherwise.
     */
    public boolean isBubbleExpanded(NotificationEntry entry) {
        return isStackExpanded() && mBubbleData != null && mBubbleData.getSelectedBubble() != null
                && mBubbleData.getSelectedBubble().getKey().equals(entry.getKey()) ? true : false;
    }

    void promoteBubbleFromOverflow(Bubble bubble) {
        bubble.setInflateSynchronously(mInflateSynchronously);
        setIsBubble(bubble, /* isBubble */ true);
+8 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import com.android.internal.util.ContrastColorUtil;
import com.android.settingslib.Utils;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.plugins.DarkIconDispatcher;
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
@@ -55,6 +56,7 @@ public class NotificationIconAreaController implements DarkReceiver,
    private final NotificationWakeUpCoordinator mWakeUpCoordinator;
    private final KeyguardBypassController mBypassController;
    private final DozeParameters mDozeParameters;
    private final BubbleController mBubbleController;

    private int mIconSize;
    private int mIconHPadding;
@@ -101,7 +103,8 @@ public class NotificationIconAreaController implements DarkReceiver,
            KeyguardBypassController keyguardBypassController,
            NotificationMediaManager notificationMediaManager,
            NotificationListener notificationListener,
            DozeParameters dozeParameters) {
            DozeParameters dozeParameters,
            BubbleController bubbleController) {
        mStatusBar = statusBar;
        mContrastColorUtil = ContrastColorUtil.getInstance(context);
        mContext = context;
@@ -112,6 +115,7 @@ public class NotificationIconAreaController implements DarkReceiver,
        mWakeUpCoordinator = wakeUpCoordinator;
        wakeUpCoordinator.addListener(this);
        mBypassController = keyguardBypassController;
        mBubbleController = bubbleController;
        notificationListener.addNotificationSettingsListener(mSettingsListener);

        initializeNotificationAreaViews(context);
@@ -291,6 +295,9 @@ public class NotificationIconAreaController implements DarkReceiver,
                        || !entry.isPulseSuppressed())) {
            return false;
        }
        if (mBubbleController.isBubbleExpanded(entry)) {
            return false;
        }
        return true;
    }

+4 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.testing.TestableLooper;
import androidx.test.filters.SmallTest;

import com.android.systemui.SysuiTestCase;
import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.NotificationListener;
import com.android.systemui.statusbar.NotificationMediaManager;
@@ -63,6 +64,8 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase {
    @Mock
    NotificationShadeWindowView mNotificationShadeWindowView;
    private NotificationIconAreaController mController;
    @Mock
    private BubbleController mBubbleController;

    @Before
    public void setup() {
@@ -74,7 +77,7 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase {

        mController = new NotificationIconAreaController(mContext, mStatusBar,
                mStatusBarStateController, mWakeUpCoordinator, mKeyguardBypassController,
                mNotificationMediaManager, mListener, mDozeParameters);
                mNotificationMediaManager, mListener, mDozeParameters, mBubbleController);
    }

    @Test