Bug:
69168591
Test: add notification with action bar, observe propper rounding
Change-Id: I69d3a7c776635b1c63d0b91b998f066a0d2f130f
NotificationContentView contentView = (NotificationContentView) child;
if (isClippingNeeded()) {
return true;
- } else if (!hasNoRounding() && contentView.shouldClipToRounding()) {
+ } else if (!hasNoRounding()
+ && contentView.shouldClipToRounding(getCurrentTopRoundness() != 0.0f,
+ getCurrentBottomRoundness() != 0.0f)) {
return true;
}
} else if (child == mChildrenContainer) {
return false;
}
- public boolean shouldClipToRounding() {
- boolean needsPaddings = shouldClipToRounding(getVisibleType());
+ public boolean shouldClipToRounding(boolean topRounded, boolean bottomRounded) {
+ boolean needsPaddings = shouldClipToRounding(getVisibleType(), topRounded, bottomRounded);
if (mUserExpanding) {
- needsPaddings |= shouldClipToRounding(mTransformationStartVisibleType);
+ needsPaddings |= shouldClipToRounding(mTransformationStartVisibleType, topRounded,
+ bottomRounded);
}
return needsPaddings;
}
- private boolean shouldClipToRounding(int visibleType) {
+ private boolean shouldClipToRounding(int visibleType, boolean topRounded,
+ boolean bottomRounded) {
NotificationViewWrapper visibleWrapper = getVisibleWrapper(visibleType);
if (visibleWrapper == null) {
return false;
}
- return visibleWrapper.shouldClipToRounding();
+ return visibleWrapper.shouldClipToRounding(topRounded, bottomRounded);
}
}
import android.content.Context;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
-import android.os.Build;
import android.view.View;
import com.android.systemui.R;
}
@Override
- public boolean shouldClipToRounding() {
+ public boolean shouldClipToRounding(boolean topRounded, boolean bottomRounded) {
return true;
}
}
}
@Override
- public boolean shouldClipToRounding() {
+ public boolean shouldClipToRounding(boolean topRounded, boolean bottomRounded) {
return true;
}
}
updateActionOffset();
}
+ @Override
+ public boolean shouldClipToRounding(boolean topRounded, boolean bottomRounded) {
+ if (super.shouldClipToRounding(topRounded, bottomRounded)) {
+ return true;
+ }
+ return bottomRounded && mActionsContainer != null
+ && mActionsContainer.getVisibility() != View.GONE;
+ }
+
private void updateActionOffset() {
if (mActionsContainer != null) {
// We should never push the actions higher than they are in the headsup view.
return 0;
}
- public boolean shouldClipToRounding() {
+ public boolean shouldClipToRounding(boolean topRounded, boolean bottomRounded) {
return false;
}
}