Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +22 −11 Original line number Diff line number Diff line Loading @@ -1225,7 +1225,7 @@ public class BubbleController implements ConfigurationChangeListener, mBubblePositioner.setBubbleBarLocation(location); mBubblePositioner.setBubbleBarTopOnScreen(topOnScreen); if (mBubbleData.getSelectedBubble() != null) { mBubbleBarViewCallback.expansionChanged(/* isExpanded = */ true); showExpandedViewForBubbleBar(); } } Loading @@ -1243,7 +1243,7 @@ public class BubbleController implements ConfigurationChangeListener, } if (selectedBubbleKey != null && !selectedBubbleKey.equals(bubbleKey)) { // We did not remove the selected bubble. Expand it again mBubbleBarViewCallback.expansionChanged(/* isExpanded = */ true); showExpandedViewForBubbleBar(); } } Loading Loading @@ -1997,15 +1997,10 @@ public class BubbleController implements ConfigurationChangeListener, @Override public void expansionChanged(boolean isExpanded) { if (mLayerView != null) { if (!isExpanded) { // in bubble bar mode, let the request to show the expanded view come from launcher. // only collapse here if we're collapsing. if (mLayerView != null && !isExpanded) { mLayerView.collapse(); } else { BubbleViewProvider selectedBubble = mBubbleData.getSelectedBubble(); if (selectedBubble != null) { mLayerView.showExpandedView(selectedBubble); } } } } Loading Loading @@ -2151,6 +2146,13 @@ public class BubbleController implements ConfigurationChangeListener, } }; private void showExpandedViewForBubbleBar() { BubbleViewProvider selectedBubble = mBubbleData.getSelectedBubble(); if (selectedBubble != null && mLayerView != null) { mLayerView.showExpandedView(selectedBubble); } } private void updateOverflowButtonDot() { BubbleOverflow overflow = mBubbleData.getOverflow(); if (overflow == null) return; Loading Loading @@ -2532,6 +2534,15 @@ public class BubbleController implements ConfigurationChangeListener, if (mLayerView != null) mLayerView.updateExpandedView(); }); } @Override public void showExpandedView() { mMainExecutor.execute(() -> { if (mLayerView != null) { showExpandedViewForBubbleBar(); } }); } } private class BubblesImpl implements Bubbles { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -53,4 +53,6 @@ interface IBubbles { oneway void showShortcutBubble(in ShortcutInfo info) = 12; oneway void showAppBubble(in Intent intent) = 13; oneway void showExpandedView() = 14; } No newline at end of file Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +22 −11 Original line number Diff line number Diff line Loading @@ -1225,7 +1225,7 @@ public class BubbleController implements ConfigurationChangeListener, mBubblePositioner.setBubbleBarLocation(location); mBubblePositioner.setBubbleBarTopOnScreen(topOnScreen); if (mBubbleData.getSelectedBubble() != null) { mBubbleBarViewCallback.expansionChanged(/* isExpanded = */ true); showExpandedViewForBubbleBar(); } } Loading @@ -1243,7 +1243,7 @@ public class BubbleController implements ConfigurationChangeListener, } if (selectedBubbleKey != null && !selectedBubbleKey.equals(bubbleKey)) { // We did not remove the selected bubble. Expand it again mBubbleBarViewCallback.expansionChanged(/* isExpanded = */ true); showExpandedViewForBubbleBar(); } } Loading Loading @@ -1997,15 +1997,10 @@ public class BubbleController implements ConfigurationChangeListener, @Override public void expansionChanged(boolean isExpanded) { if (mLayerView != null) { if (!isExpanded) { // in bubble bar mode, let the request to show the expanded view come from launcher. // only collapse here if we're collapsing. if (mLayerView != null && !isExpanded) { mLayerView.collapse(); } else { BubbleViewProvider selectedBubble = mBubbleData.getSelectedBubble(); if (selectedBubble != null) { mLayerView.showExpandedView(selectedBubble); } } } } Loading Loading @@ -2151,6 +2146,13 @@ public class BubbleController implements ConfigurationChangeListener, } }; private void showExpandedViewForBubbleBar() { BubbleViewProvider selectedBubble = mBubbleData.getSelectedBubble(); if (selectedBubble != null && mLayerView != null) { mLayerView.showExpandedView(selectedBubble); } } private void updateOverflowButtonDot() { BubbleOverflow overflow = mBubbleData.getOverflow(); if (overflow == null) return; Loading Loading @@ -2532,6 +2534,15 @@ public class BubbleController implements ConfigurationChangeListener, if (mLayerView != null) mLayerView.updateExpandedView(); }); } @Override public void showExpandedView() { mMainExecutor.execute(() -> { if (mLayerView != null) { showExpandedViewForBubbleBar(); } }); } } private class BubblesImpl implements Bubbles { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -53,4 +53,6 @@ interface IBubbles { oneway void showShortcutBubble(in ShortcutInfo info) = 12; oneway void showAppBubble(in Intent intent) = 13; oneway void showExpandedView() = 14; } No newline at end of file