Merge "Fix status bar animates when open bubble updates" into rvc-dev am: 89a5f7183e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11708150 Change-Id: I26190f3adf1c4cb22bc97510623d8f8d8ab50b58
This commit is contained in:
committed by
Automerger Merge Worker
commit
56c4314fdf
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user