diff options
| author | 2017-04-05 23:35:54 +0000 | |
|---|---|---|
| committer | 2017-04-05 23:35:59 +0000 | |
| commit | 58b39a1f87ba0646d74dbd1b18bf9d87ef53216e (patch) | |
| tree | 7b1fdbc37bfcd8cdfdb602abef83407f82902525 | |
| parent | 94b6b532c09aa2dc9f31c0158c04a75072106c32 (diff) | |
| parent | 47374630bf1cd09274928232259d6cecd33ecb53 (diff) | |
Merge "Fixed that the icon could dissappear" into oc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java | 3 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/stack/ViewState.java | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 8042321ef29f..715dc82d1a1f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -434,7 +434,8 @@ public class NotificationShelf extends ActivatableNotificationView implements iconState.scaleY = 1.0f; iconState.hidden = false; } - if (row.isAboveShelf() || (!row.isInShelf() && isLastChild && row.areGutsExposed())) { + if (row.isAboveShelf() || (!row.isInShelf() && (isLastChild && row.areGutsExposed() + || row.getTranslationZ() > mAmbientState.getBaseZHeight()))) { iconState.hidden = true; } int shelfColor = icon.getStaticDrawableColor(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/ViewState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/ViewState.java index c8659fb62051..5b594be507d2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/ViewState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/ViewState.java @@ -190,7 +190,9 @@ public class ViewState { view.setScaleY(scaleY); } - boolean becomesInvisible = this.alpha == 0.0f || (this.hidden && !isAnimating(view)); + int oldVisibility = view.getVisibility(); + boolean becomesInvisible = this.alpha == 0.0f + || (this.hidden && (!isAnimating(view) || oldVisibility != View.VISIBLE)); boolean animatingAlpha = isAnimating(view, TAG_ANIMATOR_ALPHA); if (animatingAlpha) { updateAlphaAnimation(view); @@ -212,7 +214,6 @@ public class ViewState { } // apply visibility - int oldVisibility = view.getVisibility(); int newVisibility = becomesInvisible ? View.INVISIBLE : View.VISIBLE; if (newVisibility != oldVisibility) { if (!(view instanceof ExpandableView) || !((ExpandableView) view).willBeGone()) { |