Skip to content
Commit a05b7e33 authored by Marcello Galhardo's avatar Marcello Galhardo
Browse files

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
parent 2c5fcf44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment