diff options
3 files changed, 10 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 27b94d10f91c..fad8436a392c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -1023,7 +1023,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { * @return whether the view state is currently expanded. */ public boolean isExpanded() { - return !mOnKeyguard + return isExpanded(false /* allowOnKeyguard */); + } + + public boolean isExpanded(boolean allowOnKeyguard) { + return (!mOnKeyguard || allowOnKeyguard) && (!hasUserChangedExpansion() && (isSystemExpanded() || isSystemChildExpanded()) || isUserExpanded()); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java index b94c15b1d191..ce55527076fd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java @@ -549,7 +549,7 @@ public class NotificationContentView extends FrameLayout { private int calculateVisibleType() { if (mUserExpanding) { int height = !mIsChildInGroup || isGroupExpanded() - || mContainingNotification.isExpanded() + || mContainingNotification.isExpanded(true /* allowOnKeyguard */) ? mContainingNotification.getMaxContentHeight() : mContainingNotification.getShowingLayout().getMinHeight(); if (height == 0) { @@ -588,7 +588,8 @@ public class NotificationContentView extends FrameLayout { } } else { if (noExpandedChild || (viewHeight <= mContractedChild.getHeight() - && (!mIsChildInGroup || !mContainingNotification.isExpanded()))) { + && (!mIsChildInGroup + || !mContainingNotification.isExpanded(true /* allowOnKeyguard */)))) { return VISIBLE_TYPE_CONTRACTED; } else { return VISIBLE_TYPE_EXPANDED; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java index 795573352ba8..9d50ab44ffa6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java @@ -511,7 +511,7 @@ public class NotificationChildrenContainer extends ViewGroup { break; } ExpandableNotificationRow child = mChildren.get(i); - float childHeight = child.isExpanded() + float childHeight = child.isExpanded(true /* allowOnKeyguard */) ? child.getMaxExpandHeight() : child.getShowingLayout().getMinHeight(true /* likeGroupExpanded */); maxContentHeight += childHeight; @@ -532,7 +532,7 @@ public class NotificationChildrenContainer extends ViewGroup { int childCount = mChildren.size(); for (int i = 0; i < childCount; i++) { ExpandableNotificationRow child = mChildren.get(i); - float childHeight = child.isExpanded() + float childHeight = child.isExpanded(true /* allowOnKeyguard */) ? child.getMaxExpandHeight() : child.getShowingLayout().getMinHeight(true /* likeGroupExpanded */); float singleLineHeight = child.getShowingLayout().getMinHeight( |