Fix "No Notification" text not gradually showing on LockScreen
The problem and solution can be summarised in 3 aspects: - EmptyShadeView visibility was not synchronized with the parent container. To fix that, we will update the `EmptyShadeView` when the container is set to visible (see `NotificationStackScrollLayoutController#updateVisibility`). - EmptyShadeView visibility rule did not consider transitions when deciding to hide itself on keyguard screen. To fix that, we will compare in the current state is different from the outgoing state in addition to the outgoing state been `Keyguard` (see `NotificaitonStackScrollLayoutController#updateShowEmptyShadeView`). - The notification layout is visible while on keyguard when in split mode (large screen), different from the phone where a transition is executed. To fix that, we will manually animate the `EmptyShadeView` while in lock screen using `ShadeInterpolation.getAlphaContent` to reproduce the nice fade transition we have in phones (see `StackScrollAlgorithm#updateAlphaState`). Test: manual (tablet) - Turn on your device. - If you have notifications: - Expand your notifications. - Tap "Clear All" button. - Expand your notifications slowly. - Notice "No Notifications" text will gradually fade in with your movement. Test: manual (phone) - Behaviour did not change. Test: atest ~/tm-qpr-dev/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmTest.kt Fixes: 239903210 Change-Id: I25c0d3fdb484d27eb319e4e22e23facb32c6f6fa
Loading
Please register or sign in to comment