Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +41 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; import android.graphics.RectF; import android.os.Bundle; import android.service.notification.StatusBarNotification; import android.util.Log; import android.util.StatsLog; Loading @@ -36,6 +37,7 @@ import android.view.ViewOutlineProvider; import android.view.ViewTreeObserver; import android.view.WindowInsets; import android.view.WindowManager; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.FrameLayout; import androidx.annotation.MainThread; Loading Loading @@ -205,10 +207,15 @@ public class BubbleStackView extends FrameLayout { .setDampingRatio(SpringForce.DAMPING_RATIO_LOW_BOUNCY)); setClipChildren(false); setFocusable(true); mBubbleContainer.bringToFront(); } @Override public void getBoundsOnScreen(Rect outRect, boolean clipToParent) { getBoundsOnScreen(outRect); } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); Loading @@ -227,6 +234,36 @@ public class BubbleStackView extends FrameLayout { } } @Override public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfoInternal(info); info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_DISMISS); if (mIsExpanded) { info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_COLLAPSE); } else { info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_EXPAND); } } @Override public boolean performAccessibilityActionInternal(int action, Bundle arguments) { if (super.performAccessibilityActionInternal(action, arguments)) { return true; } switch (action) { case AccessibilityNodeInfo.ACTION_DISMISS: stackDismissed(); return true; case AccessibilityNodeInfo.ACTION_COLLAPSE: collapseStack(); return true; case AccessibilityNodeInfo.ACTION_EXPAND: expandStack(); return true; } return false; } /** * Updates the visibility of the 'dot' indicating an update on the bubble. * @param key the {@link NotificationEntry#key} associated with the bubble. Loading Loading @@ -719,7 +756,9 @@ public class BubbleStackView extends FrameLayout { @Override public void getBoundsOnScreen(Rect outRect) { if (!mIsExpanded) { if (mBubbleContainer.getChildCount() > 0) { mBubbleContainer.getChildAt(0).getBoundsOnScreen(outRect); } } else { mBubbleContainer.getBoundsOnScreen(outRect); } Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +41 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; import android.graphics.RectF; import android.os.Bundle; import android.service.notification.StatusBarNotification; import android.util.Log; import android.util.StatsLog; Loading @@ -36,6 +37,7 @@ import android.view.ViewOutlineProvider; import android.view.ViewTreeObserver; import android.view.WindowInsets; import android.view.WindowManager; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.FrameLayout; import androidx.annotation.MainThread; Loading Loading @@ -205,10 +207,15 @@ public class BubbleStackView extends FrameLayout { .setDampingRatio(SpringForce.DAMPING_RATIO_LOW_BOUNCY)); setClipChildren(false); setFocusable(true); mBubbleContainer.bringToFront(); } @Override public void getBoundsOnScreen(Rect outRect, boolean clipToParent) { getBoundsOnScreen(outRect); } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); Loading @@ -227,6 +234,36 @@ public class BubbleStackView extends FrameLayout { } } @Override public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfoInternal(info); info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_DISMISS); if (mIsExpanded) { info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_COLLAPSE); } else { info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_EXPAND); } } @Override public boolean performAccessibilityActionInternal(int action, Bundle arguments) { if (super.performAccessibilityActionInternal(action, arguments)) { return true; } switch (action) { case AccessibilityNodeInfo.ACTION_DISMISS: stackDismissed(); return true; case AccessibilityNodeInfo.ACTION_COLLAPSE: collapseStack(); return true; case AccessibilityNodeInfo.ACTION_EXPAND: expandStack(); return true; } return false; } /** * Updates the visibility of the 'dot' indicating an update on the bubble. * @param key the {@link NotificationEntry#key} associated with the bubble. Loading Loading @@ -719,7 +756,9 @@ public class BubbleStackView extends FrameLayout { @Override public void getBoundsOnScreen(Rect outRect) { if (!mIsExpanded) { if (mBubbleContainer.getChildCount() > 0) { mBubbleContainer.getChildAt(0).getBoundsOnScreen(outRect); } } else { mBubbleContainer.getBoundsOnScreen(outRect); } Loading