Create accessibility menu for bubble bar
Bug: 344670180 Test: open accessibility action menu on bubble bar. use menu to - expand bubble bar - dismiss bubble bar Test: when bubble bar is on the right, the action menu has an option to move bubble bar to the left only, use menu to move bar to the left Test: when bubble bar is on the left, the action menu has an option to move bubble bar to the right only, use menu to move bar to the right Flag: com.android.wm.shell.enable_bubble_bar Change-Id: Id875a43927bc3410a83d1342b9456330c9521085
This commit is contained in:
@@ -117,7 +117,7 @@ public class BubbleBarViewController {
|
||||
dp -> onBubbleBarConfigurationChanged(/* animate= */ true));
|
||||
mBubbleBarScale.updateValue(1f);
|
||||
mBubbleClickListener = v -> onBubbleClicked((BubbleView) v);
|
||||
mBubbleBarClickListener = v -> onBubbleBarClicked();
|
||||
mBubbleBarClickListener = v -> expandBubbleBar();
|
||||
mBubbleDragController.setupBubbleBarView(mBarView);
|
||||
mBarView.setOnClickListener(mBubbleBarClickListener);
|
||||
mBarView.addOnLayoutChangeListener(
|
||||
@@ -137,6 +137,21 @@ public class BubbleBarViewController {
|
||||
public void onBubbleBarTouchedWhileAnimating() {
|
||||
BubbleBarViewController.this.onBubbleBarTouchedWhileAnimating();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void expandBubbleBar() {
|
||||
BubbleBarViewController.this.expandBubbleBar();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismissBubbleBar() {
|
||||
onDismissAllBubbles();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBubbleBarLocation(BubbleBarLocation location) {
|
||||
mBubbleBarController.updateBubbleBarLocation(location);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -162,7 +177,7 @@ public class BubbleBarViewController {
|
||||
mBubbleStashController.onNewBubbleAnimationInterrupted(false, mBarView.getTranslationY());
|
||||
}
|
||||
|
||||
private void onBubbleBarClicked() {
|
||||
private void expandBubbleBar() {
|
||||
if (mShouldShowEducation) {
|
||||
mShouldShowEducation = false;
|
||||
// Get the bubble bar bounds on screen
|
||||
@@ -609,17 +624,17 @@ public class BubbleBarViewController {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when bubble was dragged into the dismiss target. Notifies System
|
||||
* Called when given bubble was dismissed. Notifies SystemUI
|
||||
* @param bubble dismissed bubble item
|
||||
*/
|
||||
public void onDismissBubbleWhileDragging(@NonNull BubbleBarItem bubble) {
|
||||
public void onDismissBubble(@NonNull BubbleBarItem bubble) {
|
||||
mSystemUiProxy.dragBubbleToDismiss(bubble.getKey(), mTimeSource.currentTimeMillis());
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when bubble stack was dragged into the dismiss target
|
||||
* Called when bubble stack was dismissed
|
||||
*/
|
||||
public void onDismissAllBubblesWhileDragging() {
|
||||
public void onDismissAllBubbles() {
|
||||
mSystemUiProxy.removeAllBubbles();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user