Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +2 −0 Original line number Diff line number Diff line Loading @@ -512,6 +512,7 @@ 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; Loading @@ -529,6 +530,7 @@ public class BubbleController implements ConfigurationChangeListener, * will be updated accordingly. */ public void unregisterBubbleStateListener() { mBubbleProperties.refresh(); if (mBubbleStateListener != null) { mBubbleStateListener = null; setUpBubbleViewsForMode(); Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/properties/BubbleProperties.kt +3 −0 Original line number Diff line number Diff line Loading @@ -29,4 +29,7 @@ interface BubbleProperties { * When this is `false`, bubbles will be floating. */ val isBubbleBarEnabled: Boolean /** Refreshes the current value of [isBubbleBarEnabled]. */ fun refresh() } libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/properties/ProdBubbleProperties.kt +8 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,12 @@ import android.os.SystemProperties object ProdBubbleProperties : BubbleProperties { // TODO(b/256873975) Should use proper flag when available to shell/launcher override val isBubbleBarEnabled = private var _isBubbleBarEnabled = SystemProperties.getBoolean("persist.wm.debug.bubble_bar", false) override val isBubbleBarEnabled = _isBubbleBarEnabled override fun refresh() { _isBubbleBarEnabled = SystemProperties.getBoolean("persist.wm.debug.bubble_bar", false) } } packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -2262,5 +2262,8 @@ public class BubblesTest extends SysuiTestCase { public boolean isBubbleBarEnabled() { return mIsBubbleBarEnabled; } @Override public void refresh() {} } } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +2 −0 Original line number Diff line number Diff line Loading @@ -512,6 +512,7 @@ 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; Loading @@ -529,6 +530,7 @@ public class BubbleController implements ConfigurationChangeListener, * will be updated accordingly. */ public void unregisterBubbleStateListener() { mBubbleProperties.refresh(); if (mBubbleStateListener != null) { mBubbleStateListener = null; setUpBubbleViewsForMode(); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/properties/BubbleProperties.kt +3 −0 Original line number Diff line number Diff line Loading @@ -29,4 +29,7 @@ interface BubbleProperties { * When this is `false`, bubbles will be floating. */ val isBubbleBarEnabled: Boolean /** Refreshes the current value of [isBubbleBarEnabled]. */ fun refresh() }
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/properties/ProdBubbleProperties.kt +8 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,12 @@ import android.os.SystemProperties object ProdBubbleProperties : BubbleProperties { // TODO(b/256873975) Should use proper flag when available to shell/launcher override val isBubbleBarEnabled = private var _isBubbleBarEnabled = SystemProperties.getBoolean("persist.wm.debug.bubble_bar", false) override val isBubbleBarEnabled = _isBubbleBarEnabled override fun refresh() { _isBubbleBarEnabled = SystemProperties.getBoolean("persist.wm.debug.bubble_bar", false) } }
packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -2262,5 +2262,8 @@ public class BubblesTest extends SysuiTestCase { public boolean isBubbleBarEnabled() { return mIsBubbleBarEnabled; } @Override public void refresh() {} } }