summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2019-07-29 15:30:29 -0700
committer android-build-merger <android-build-merger@google.com> 2019-07-29 15:30:29 -0700
commitedc6f40a08843a904d9554b3b5ca38637e84e136 (patch)
tree9254e71062814a16cd923abb6ec8a1b00c9ba68b
parent2615de0724f714a791c2685ac8d999b4719350c1 (diff)
parent08fef99562c127e11d66c53d0ba24126f9e3df0e (diff)
Merge "Fixed the shadows on the lockscreen for bypass" into qt-r1-dev am: 9693956247
am: 08fef99562 Change-Id: I4b58450ad0098ae79900da39b857f270ce7fee04
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java16
2 files changed, 20 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 4ccd0cd3353b..99682fcfccbf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -374,6 +374,10 @@ public class NotificationShelf extends ActivatableNotificationView implements
clipTransientViews();
setClipTopAmount(clipTopAmount);
+ boolean isHidden = getViewState().hidden || clipTopAmount >= getIntrinsicHeight();
+ if (mShowNotificationShelf) {
+ setVisibility(isHidden ? View.INVISIBLE : View.VISIBLE);
+ }
setBackgroundTop(backgroundTop);
setFirstElementRoundness(firstElementRoundness);
mShelfIcons.setSpeedBumpIndex(mAmbientState.getSpeedBumpIndex());
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index 3e4fe20a8cab..308f297c157a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -412,6 +412,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
outline.setRoundRect(mBackgroundAnimationRect,
MathUtils.lerp(mCornerRadius / 2.0f, mCornerRadius,
xProgress));
+ outline.setAlpha(1.0f - mAmbientState.getHideAmount());
} else {
ViewOutlineProvider.BACKGROUND.getOutline(view, outline);
}
@@ -1044,6 +1045,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
requestChildrenUpdate();
updateFirstAndLastBackgroundViews();
updateAlgorithmLayoutMinHeight();
+ updateOwnTranslationZ();
}
@ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
@@ -4776,6 +4778,20 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
updateAlgorithmHeightAndPadding();
updateBackgroundDimming();
requestChildrenUpdate();
+ updateOwnTranslationZ();
+ }
+
+ private void updateOwnTranslationZ() {
+ // Since we are clipping to the outline we need to make sure that the shadows aren't
+ // clipped when pulsing
+ float ownTranslationZ = 0;
+ if (mKeyguardBypassController.getBypassEnabled() && mAmbientState.isHiddenAtAll()) {
+ ExpandableView firstChildNotGone = getFirstChildNotGone();
+ if (firstChildNotGone != null && firstChildNotGone.showingPulsing()) {
+ ownTranslationZ = firstChildNotGone.getTranslationZ();
+ }
+ }
+ setTranslationZ(ownTranslationZ);
}
private void updateVisibility() {