Loading packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1113,6 +1113,8 @@ <dimen name="individual_bubble_size">60dp</dimen> <!-- Size of bubble icon bitmap. --> <dimen name="bubble_icon_bitmap_size">52dp</dimen> <!-- Extra padding added to the touchable rect for bubbles so they are easier to grab. --> <dimen name="bubble_touch_padding">12dp</dimen> <!-- Size of the circle around the bubbles when they're in the dismiss target. --> <dimen name="bubble_dismiss_encircle_size">52dp</dimen> <!-- How much to inset the icon in the circle --> Loading Loading @@ -1157,6 +1159,7 @@ snap to the dismiss target. --> <dimen name="bubble_dismiss_target_padding_x">40dp</dimen> <dimen name="bubble_dismiss_target_padding_y">20dp</dimen> <!-- Size of the RAT type for CellularTile --> <dimen name="celltile_rat_type_size">10sp</dimen> </resources> packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +7 −8 Original line number Diff line number Diff line Loading @@ -182,6 +182,7 @@ public class BubbleStackView extends FrameLayout { private int mBubbleSize; private int mBubblePaddingTop; private int mBubbleTouchPadding; private int mExpandedViewPadding; private int mExpandedAnimateXDistance; private int mExpandedAnimateYDistance; Loading Loading @@ -326,6 +327,7 @@ public class BubbleStackView extends FrameLayout { Resources res = getResources(); mBubbleSize = res.getDimensionPixelSize(R.dimen.individual_bubble_size); mBubblePaddingTop = res.getDimensionPixelSize(R.dimen.bubble_padding_top); mBubbleTouchPadding = res.getDimensionPixelSize(R.dimen.bubble_touch_padding); mExpandedAnimateXDistance = res.getDimensionPixelSize(R.dimen.bubble_expanded_animate_x_distance); mExpandedAnimateYDistance = Loading Loading @@ -1453,6 +1455,11 @@ public class BubbleStackView extends FrameLayout { if (mBubbleContainer.getChildCount() > 0) { mBubbleContainer.getChildAt(0).getBoundsOnScreen(outRect); } // Increase the touch target size of the bubble outRect.top -= mBubbleTouchPadding; outRect.left -= mBubbleTouchPadding; outRect.right += mBubbleTouchPadding; outRect.bottom += mBubbleTouchPadding; } else { mBubbleContainer.getBoundsOnScreen(outRect); } Loading @@ -1477,14 +1484,6 @@ public class BubbleStackView extends FrameLayout { return 0; } private int getBottomInset() { if (getRootWindowInsets() != null) { WindowInsets insets = getRootWindowInsets(); return insets.getSystemWindowInsetBottom(); } return 0; } private boolean isIntersecting(View view, float x, float y) { mTempLoc = view.getLocationOnScreen(); mTempRect.set(mTempLoc[0], mTempLoc[1], mTempLoc[0] + view.getWidth(), Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleTouchHandler.java +2 −4 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.bubbles; import android.content.Context; import android.graphics.PointF; import android.os.Handler; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; Loading Loading @@ -65,11 +64,10 @@ class BubbleTouchHandler implements View.OnTouchListener { private int mTouchSlopSquared; private VelocityTracker mVelocityTracker; private boolean mInDismissTarget; private Handler mHandler = new Handler(); /** View that was initially touched, when we received the first ACTION_DOWN event. */ private View mTouchedView; /** Whether the current touched view is in the dismiss target. */ private boolean mInDismissTarget; BubbleTouchHandler(BubbleStackView stackView, BubbleData bubbleData, Context context) { Loading packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -334,7 +334,6 @@ public class BubbleControllerTest extends SysuiTestCase { assertTrue(mBubbleData.getBubbleWithKey(mRow.getEntry().key).showBubbleDot()); // Expand BubbleStackView stackView = mBubbleController.getStackView(); mBubbleController.expandStack(); assertTrue(mBubbleController.isStackExpanded()); verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow.getEntry().key); Loading Loading
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1113,6 +1113,8 @@ <dimen name="individual_bubble_size">60dp</dimen> <!-- Size of bubble icon bitmap. --> <dimen name="bubble_icon_bitmap_size">52dp</dimen> <!-- Extra padding added to the touchable rect for bubbles so they are easier to grab. --> <dimen name="bubble_touch_padding">12dp</dimen> <!-- Size of the circle around the bubbles when they're in the dismiss target. --> <dimen name="bubble_dismiss_encircle_size">52dp</dimen> <!-- How much to inset the icon in the circle --> Loading Loading @@ -1157,6 +1159,7 @@ snap to the dismiss target. --> <dimen name="bubble_dismiss_target_padding_x">40dp</dimen> <dimen name="bubble_dismiss_target_padding_y">20dp</dimen> <!-- Size of the RAT type for CellularTile --> <dimen name="celltile_rat_type_size">10sp</dimen> </resources>
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +7 −8 Original line number Diff line number Diff line Loading @@ -182,6 +182,7 @@ public class BubbleStackView extends FrameLayout { private int mBubbleSize; private int mBubblePaddingTop; private int mBubbleTouchPadding; private int mExpandedViewPadding; private int mExpandedAnimateXDistance; private int mExpandedAnimateYDistance; Loading Loading @@ -326,6 +327,7 @@ public class BubbleStackView extends FrameLayout { Resources res = getResources(); mBubbleSize = res.getDimensionPixelSize(R.dimen.individual_bubble_size); mBubblePaddingTop = res.getDimensionPixelSize(R.dimen.bubble_padding_top); mBubbleTouchPadding = res.getDimensionPixelSize(R.dimen.bubble_touch_padding); mExpandedAnimateXDistance = res.getDimensionPixelSize(R.dimen.bubble_expanded_animate_x_distance); mExpandedAnimateYDistance = Loading Loading @@ -1453,6 +1455,11 @@ public class BubbleStackView extends FrameLayout { if (mBubbleContainer.getChildCount() > 0) { mBubbleContainer.getChildAt(0).getBoundsOnScreen(outRect); } // Increase the touch target size of the bubble outRect.top -= mBubbleTouchPadding; outRect.left -= mBubbleTouchPadding; outRect.right += mBubbleTouchPadding; outRect.bottom += mBubbleTouchPadding; } else { mBubbleContainer.getBoundsOnScreen(outRect); } Loading @@ -1477,14 +1484,6 @@ public class BubbleStackView extends FrameLayout { return 0; } private int getBottomInset() { if (getRootWindowInsets() != null) { WindowInsets insets = getRootWindowInsets(); return insets.getSystemWindowInsetBottom(); } return 0; } private boolean isIntersecting(View view, float x, float y) { mTempLoc = view.getLocationOnScreen(); mTempRect.set(mTempLoc[0], mTempLoc[1], mTempLoc[0] + view.getWidth(), Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleTouchHandler.java +2 −4 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.bubbles; import android.content.Context; import android.graphics.PointF; import android.os.Handler; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; Loading Loading @@ -65,11 +64,10 @@ class BubbleTouchHandler implements View.OnTouchListener { private int mTouchSlopSquared; private VelocityTracker mVelocityTracker; private boolean mInDismissTarget; private Handler mHandler = new Handler(); /** View that was initially touched, when we received the first ACTION_DOWN event. */ private View mTouchedView; /** Whether the current touched view is in the dismiss target. */ private boolean mInDismissTarget; BubbleTouchHandler(BubbleStackView stackView, BubbleData bubbleData, Context context) { Loading
packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -334,7 +334,6 @@ public class BubbleControllerTest extends SysuiTestCase { assertTrue(mBubbleData.getBubbleWithKey(mRow.getEntry().key).showBubbleDot()); // Expand BubbleStackView stackView = mBubbleController.getStackView(); mBubbleController.expandStack(); assertTrue(mBubbleController.isStackExpanded()); verify(mBubbleExpandListener).onBubbleExpandChanged(true, mRow.getEntry().key); Loading