Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.stack; import android.annotation.Nullable; import android.content.Context; import android.view.View; Loading Loading @@ -236,6 +237,7 @@ public class AmbientState { mShelf = shelf; } @Nullable public NotificationShelf getShelf() { return mShelf; } Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +9 −2 Original line number Diff line number Diff line Loading @@ -122,8 +122,10 @@ public class StackScrollAlgorithm { } private void updateShelfState(StackScrollState resultState, AmbientState ambientState) { NotificationShelf shelf = ambientState.getShelf(); if (shelf != null) { shelf.updateState(resultState, ambientState); } } private void updateClipping(StackScrollState resultState, StackScrollAlgorithmState algorithmState, AmbientState ambientState) { Loading Loading @@ -495,6 +497,10 @@ public class StackScrollAlgorithm { */ private void clampPositionToShelf(ExpandableViewState childViewState, AmbientState ambientState) { if (ambientState.getShelf() == null) { return; } int shelfStart = ambientState.getInnerHeight() - ambientState.getShelf().getIntrinsicHeight(); childViewState.yTranslation = Math.min(childViewState.yTranslation, shelfStart); Loading Loading @@ -556,7 +562,8 @@ public class StackScrollAlgorithm { } else if (i == 0 && ambientState.isAboveShelf(child)) { // In case this is a new view that has never been measured before, we don't want to // elevate if we are currently expanded more then the notification int shelfHeight = ambientState.getShelf().getIntrinsicHeight(); int shelfHeight = ambientState.getShelf() == null ? 0 : ambientState.getShelf().getIntrinsicHeight(); float shelfStart = ambientState.getInnerHeight() - shelfHeight + ambientState.getTopPadding() + ambientState.getStackTranslation(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.stack; import android.annotation.Nullable; import android.content.Context; import android.view.View; Loading Loading @@ -236,6 +237,7 @@ public class AmbientState { mShelf = shelf; } @Nullable public NotificationShelf getShelf() { return mShelf; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +9 −2 Original line number Diff line number Diff line Loading @@ -122,8 +122,10 @@ public class StackScrollAlgorithm { } private void updateShelfState(StackScrollState resultState, AmbientState ambientState) { NotificationShelf shelf = ambientState.getShelf(); if (shelf != null) { shelf.updateState(resultState, ambientState); } } private void updateClipping(StackScrollState resultState, StackScrollAlgorithmState algorithmState, AmbientState ambientState) { Loading Loading @@ -495,6 +497,10 @@ public class StackScrollAlgorithm { */ private void clampPositionToShelf(ExpandableViewState childViewState, AmbientState ambientState) { if (ambientState.getShelf() == null) { return; } int shelfStart = ambientState.getInnerHeight() - ambientState.getShelf().getIntrinsicHeight(); childViewState.yTranslation = Math.min(childViewState.yTranslation, shelfStart); Loading Loading @@ -556,7 +562,8 @@ public class StackScrollAlgorithm { } else if (i == 0 && ambientState.isAboveShelf(child)) { // In case this is a new view that has never been measured before, we don't want to // elevate if we are currently expanded more then the notification int shelfHeight = ambientState.getShelf().getIntrinsicHeight(); int shelfHeight = ambientState.getShelf() == null ? 0 : ambientState.getShelf().getIntrinsicHeight(); float shelfStart = ambientState.getInnerHeight() - shelfHeight + ambientState.getTopPadding() + ambientState.getStackTranslation(); Loading