Loading quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java +5 −1 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ public class BubbleBarController extends IBubblesListener.Stub { private static class BubbleBarViewUpdate { boolean expandedChanged; boolean expanded; boolean shouldShowEducation; String selectedBubbleKey; String suppressedBubbleKey; String unsuppressedBubbleKey; Loading @@ -151,6 +152,7 @@ public class BubbleBarController extends IBubblesListener.Stub { BubbleBarViewUpdate(BubbleBarUpdate update) { expandedChanged = update.expandedChanged; expanded = update.expanded; shouldShowEducation = update.shouldShowEducation; selectedBubbleKey = update.selectedBubbleKey; suppressedBubbleKey = update.suppressedBubbleKey; unsuppressedBubbleKey = update.unsupressedBubbleKey; Loading Loading @@ -366,7 +368,9 @@ public class BubbleBarController extends IBubblesListener.Stub { mBubbleStashController.animateToInitialState(update.expanded); } } if (update.shouldShowEducation) { mBubbleBarViewController.prepareToShowEducation(); } if (update.expandedChanged) { if (update.expanded != mBubbleBarViewController.isExpanded()) { mBubbleBarViewController.setExpandedFromSysui(update.expanded); Loading quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +24 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.taskbar.bubbles; import static android.view.View.INVISIBLE; import static android.view.View.VISIBLE; import android.graphics.Point; import android.graphics.Rect; import android.util.Log; import android.view.MotionEvent; Loading Loading @@ -75,6 +76,7 @@ public class BubbleBarViewController { private boolean mHiddenForSysui; // Whether the bar is hidden because there are no bubbles. private boolean mHiddenForNoBubbles; private boolean mShouldShowEducation; public BubbleBarViewController(TaskbarActivityContext activity, BubbleBarView barView) { mActivity = activity; Loading @@ -98,7 +100,7 @@ public class BubbleBarViewController { mBarView.getLayoutParams().height = mActivity.getDeviceProfile().taskbarHeight; mBubbleBarScale.updateValue(1f); mBubbleClickListener = v -> onBubbleClicked(v); mBubbleBarClickListener = v -> setExpanded(true); mBubbleBarClickListener = v -> onBubbleBarClicked(); mBubbleDragController.setupBubbleBarView(mBarView); mBarView.setOnClickListener(mBubbleBarClickListener); mBarView.addOnLayoutChangeListener((view, i, i1, i2, i3, i4, i5, i6, i7) -> Loading @@ -121,6 +123,21 @@ public class BubbleBarViewController { } } private void onBubbleBarClicked() { if (mShouldShowEducation) { mShouldShowEducation = false; // Get the bubble bar bounds on screen Rect bounds = new Rect(); mBarView.getBoundsOnScreen(bounds); // Calculate user education reference position in Screen coordinates Point position = new Point(bounds.centerX(), bounds.top); // Show user education relative to the reference point mSystemUiProxy.showUserEducation(position); } else { setExpanded(true); } } // // The below animators are exposed to BubbleStashController so it can manage the stashing // animation. Loading Loading @@ -326,6 +343,12 @@ public class BubbleBarViewController { } } /** Marks as should show education and shows the bubble bar in a collapsed state */ public void prepareToShowEducation() { mShouldShowEducation = true; mBubbleStashController.showBubbleBar(false /* expand the bubbles */); } /** * Updates the dragged bubble view in the bubble bar view, and notifies SystemUI * that a bubble is being dragged to dismiss. Loading quickstep/src/com/android/quickstep/SystemUiProxy.java +13 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ShortcutInfo; import android.graphics.Point; import android.graphics.Rect; import android.os.Bundle; import android.os.Handler; Loading Loading @@ -731,6 +732,18 @@ public class SystemUiProxy implements ISystemUiProxy { } } /** * Tells SysUI to show user education relative to the reference point provided. * @param position the bubble bar top center position in Screen coordinates. */ public void showUserEducation(Point position) { try { mBubbles.showUserEducation(position.x, position.y); } catch (RemoteException e) { Log.w(TAG, "Failed call showUserEducation"); } } // // Splitscreen // Loading Loading
quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java +5 −1 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ public class BubbleBarController extends IBubblesListener.Stub { private static class BubbleBarViewUpdate { boolean expandedChanged; boolean expanded; boolean shouldShowEducation; String selectedBubbleKey; String suppressedBubbleKey; String unsuppressedBubbleKey; Loading @@ -151,6 +152,7 @@ public class BubbleBarController extends IBubblesListener.Stub { BubbleBarViewUpdate(BubbleBarUpdate update) { expandedChanged = update.expandedChanged; expanded = update.expanded; shouldShowEducation = update.shouldShowEducation; selectedBubbleKey = update.selectedBubbleKey; suppressedBubbleKey = update.suppressedBubbleKey; unsuppressedBubbleKey = update.unsupressedBubbleKey; Loading Loading @@ -366,7 +368,9 @@ public class BubbleBarController extends IBubblesListener.Stub { mBubbleStashController.animateToInitialState(update.expanded); } } if (update.shouldShowEducation) { mBubbleBarViewController.prepareToShowEducation(); } if (update.expandedChanged) { if (update.expanded != mBubbleBarViewController.isExpanded()) { mBubbleBarViewController.setExpandedFromSysui(update.expanded); Loading
quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +24 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.taskbar.bubbles; import static android.view.View.INVISIBLE; import static android.view.View.VISIBLE; import android.graphics.Point; import android.graphics.Rect; import android.util.Log; import android.view.MotionEvent; Loading Loading @@ -75,6 +76,7 @@ public class BubbleBarViewController { private boolean mHiddenForSysui; // Whether the bar is hidden because there are no bubbles. private boolean mHiddenForNoBubbles; private boolean mShouldShowEducation; public BubbleBarViewController(TaskbarActivityContext activity, BubbleBarView barView) { mActivity = activity; Loading @@ -98,7 +100,7 @@ public class BubbleBarViewController { mBarView.getLayoutParams().height = mActivity.getDeviceProfile().taskbarHeight; mBubbleBarScale.updateValue(1f); mBubbleClickListener = v -> onBubbleClicked(v); mBubbleBarClickListener = v -> setExpanded(true); mBubbleBarClickListener = v -> onBubbleBarClicked(); mBubbleDragController.setupBubbleBarView(mBarView); mBarView.setOnClickListener(mBubbleBarClickListener); mBarView.addOnLayoutChangeListener((view, i, i1, i2, i3, i4, i5, i6, i7) -> Loading @@ -121,6 +123,21 @@ public class BubbleBarViewController { } } private void onBubbleBarClicked() { if (mShouldShowEducation) { mShouldShowEducation = false; // Get the bubble bar bounds on screen Rect bounds = new Rect(); mBarView.getBoundsOnScreen(bounds); // Calculate user education reference position in Screen coordinates Point position = new Point(bounds.centerX(), bounds.top); // Show user education relative to the reference point mSystemUiProxy.showUserEducation(position); } else { setExpanded(true); } } // // The below animators are exposed to BubbleStashController so it can manage the stashing // animation. Loading Loading @@ -326,6 +343,12 @@ public class BubbleBarViewController { } } /** Marks as should show education and shows the bubble bar in a collapsed state */ public void prepareToShowEducation() { mShouldShowEducation = true; mBubbleStashController.showBubbleBar(false /* expand the bubbles */); } /** * Updates the dragged bubble view in the bubble bar view, and notifies SystemUI * that a bubble is being dragged to dismiss. Loading
quickstep/src/com/android/quickstep/SystemUiProxy.java +13 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ShortcutInfo; import android.graphics.Point; import android.graphics.Rect; import android.os.Bundle; import android.os.Handler; Loading Loading @@ -731,6 +732,18 @@ public class SystemUiProxy implements ISystemUiProxy { } } /** * Tells SysUI to show user education relative to the reference point provided. * @param position the bubble bar top center position in Screen coordinates. */ public void showUserEducation(Point position) { try { mBubbles.showUserEducation(position.x, position.y); } catch (RemoteException e) { Log.w(TAG, "Failed call showUserEducation"); } } // // Splitscreen // Loading