Revert "Set system gesture exclusion rects for Bubbles"

Test: this is a revert
This reverts commit ea111fa8ce.

Change-Id: I7581bd69e39ec0ab9a7775b7c347dd27eb652798
This commit is contained in:
Mark Renouf
2019-04-04 17:14:19 -04:00
parent 0f3d14b66e
commit f4c212b99c

View File

@@ -64,8 +64,6 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Collections;
import java.util.List;
/**
* Renders bubbles in a stack and handles animating expanded and collapsed states.
@@ -166,8 +164,6 @@ public class BubbleStackView extends FrameLayout {
int[] mTempLoc = new int[2];
RectF mTempRect = new RectF();
private final List<Rect> mSystemGestureExclusionRects = Collections.singletonList(new Rect());
private ViewTreeObserver.OnPreDrawListener mViewUpdater =
new ViewTreeObserver.OnPreDrawListener() {
@Override
@@ -179,9 +175,6 @@ public class BubbleStackView extends FrameLayout {
}
};
private ViewTreeObserver.OnDrawListener mSystemGestureExcludeUpdater =
this::updateSystemGestureExcludeRects;
private ViewClippingUtil.ClippingParameters mClippingParameters =
new ViewClippingUtil.ClippingParameters() {
@@ -368,19 +361,6 @@ public class BubbleStackView extends FrameLayout {
return false;
}
private void updateSystemGestureExcludeRects() {
// Exclude the region occupied by the first BubbleView in the stack
Rect excludeZone = mSystemGestureExclusionRects.get(0);
if (mBubbleContainer.getChildCount() > 0) {
View firstBubble = mBubbleContainer.getChildAt(0);
excludeZone.set(firstBubble.getLeft(), firstBubble.getTop(), firstBubble.getRight(),
firstBubble.getBottom());
} else {
excludeZone.setEmpty();
}
mBubbleContainer.setSystemGestureExclusionRects(mSystemGestureExclusionRects);
}
/**
* Updates the visibility of the 'dot' indicating an update on the bubble.
* @param key the {@link NotificationEntry#key} associated with the bubble.
@@ -689,17 +669,12 @@ public class BubbleStackView extends FrameLayout {
updateExpandedBubble();
applyCurrentState();
// This must be a separate OnDrawListener since it should be called for every draw.
getViewTreeObserver().addOnDrawListener(mSystemGestureExcludeUpdater);
mIsExpansionAnimating = true;
Runnable updateAfter = () -> {
applyCurrentState();
mIsExpansionAnimating = false;
requestUpdate();
getViewTreeObserver().removeOnDrawListener(mSystemGestureExcludeUpdater);
updateSystemGestureExcludeRects();
};
if (shouldExpand) {