Fixes that notifications were sometimes clipped on the lockscreen
When dragging down a notification into the bottom, the top notification
could become clipped.
Test: add notifications, pull down on last notification on lockscreen
Bug: 32437839
Change-Id: Ibb58d1aa7575fbe9d84b8542ac57ffae494bb127
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
index f468b5c..94fc17a8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
@@ -22,6 +22,7 @@
import com.android.systemui.R;
import com.android.systemui.statusbar.ActivatableNotificationView;
import com.android.systemui.statusbar.NotificationShelf;
+import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import java.util.ArrayList;
@@ -53,6 +54,7 @@
private int mMaxLayoutHeight;
private ActivatableNotificationView mLastVisibleBackgroundChild;
private float mCurrentScrollVelocity;
+ private int mStatusBarState;
public AmbientState(Context context) {
reload(context);
@@ -250,4 +252,12 @@
public float getCurrentScrollVelocity() {
return mCurrentScrollVelocity;
}
+
+ public boolean isOnKeyguard() {
+ return mStatusBarState == StatusBarState.KEYGUARD;
+ }
+
+ public void setStatusBarState(int statusBarState) {
+ mStatusBarState = statusBarState;
+ }
}