Merge "Made sure that the ambient single line view remains invisible" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-05-15 19:42:39 +00:00
committed by Android (Google) Code Review

View File

@@ -1199,8 +1199,13 @@ public class NotificationContentView extends FrameLayout {
}
private void updateSingleLineView() {
if (mIsChildInGroup) {
boolean isNewView = mSingleLineView == null;
mSingleLineView = mHybridGroupManager.bindFromNotification(
mSingleLineView, mStatusBarNotification.getNotification());
if (isNewView) {
updateViewVisibility(mVisibleType, VISIBLE_TYPE_SINGLELINE,
mSingleLineView, mSingleLineView);
}
} else if (mSingleLineView != null) {
removeView(mSingleLineView);
mSingleLineView = null;
@@ -1209,8 +1214,13 @@ public class NotificationContentView extends FrameLayout {
private void updateAmbientSingleLineView() {
if (mIsChildInGroup) {
boolean isNewView = mAmbientSingleLineChild == null;
mAmbientSingleLineChild = mHybridGroupManager.bindAmbientFromNotification(
mAmbientSingleLineChild, mStatusBarNotification.getNotification());
if (isNewView) {
updateViewVisibility(mVisibleType, VISIBLE_TYPE_AMBIENT_SINGLELINE,
mAmbientSingleLineChild, mAmbientSingleLineChild);
}
} else if (mAmbientSingleLineChild != null) {
removeView(mAmbientSingleLineChild);
mAmbientSingleLineChild = null;