This changes the screen off animation so that the controller directly animates the LightRevealScrim and the shade keyguard UI, rather then tying these to the dozeAmount. This makes it easier for us to manage/cancel these animations, such as during the camera launch gesture, since the various doze components update their state asynchronously.
This approach also means that instead of actually changing everything to KEYGUARD as soon as the power button is pressed, we actually just show the LightRevealScrim and the shade's AOD UI. This results in far less jank. We then actually show the keyguard once the animation finishes or is cancelled.
Bug: 169693662
Bug: 169739682
Bug: 181020504
Fixes: 185567665
Fixes: 189342687
Fixes: 185567665
Fixes: 183195436
Test: atest SystemUITests
Test: trigger screen off and cancel it
Test: trigger screen off and don't cancel it, make sure it wakes up fine
Test: disable 'power button locks instantly' and make sure it doesn't lock the device, both when the animation finishes or when it's cancelled
Test: press the power button twice in rapid succession
Test: press the power button twice in slower succession about 200ms apart (which triggers the camera onWakingUp vs onFinishedGoingToSleep)
Test: press the power button 5 times, make sure emergency gesture comes up
Test: disable AOD, observe no screen off animation and lock functionality works
Change-Id: I1c44304becdadfd37bab7fd81286a9702e5d6141
This reverts most of ag/14554008. The keyguard visibility state isn't
updated immediatly when dozing begins, so we need to make sure we're
still registered for the StatusBarStateControllerListener for dozing
state so that the clock is in the correct state when entering AOD.
Test: manual, enter AOD from the home screen on timeout
Fixes: 188592929
Change-Id: Idf19bc86b11e3423ffdf1ed6e12ef52ea68d8881
Update AnimatableClockController's definition of attached to include
whether the keyguard is visible or not. This way, we won't animate
if the view isn't actually visible & we'll reset the clock state when
the keyguard is newly visible.
Only create a new AnimatableClockController onInit instead of
in the onAttach method for KeyguardClockSwitchController.
Fixes: 188203771
Test: manual
Change-Id: Id02132dba8b5392046cb46766aa64fd58e04a4ad
When the large clock appears, move smartspace up to take the place of
the small clock. Reverse that when notifications appear and the small
clock shows up. Animate the large clock weight on appear.
Fixes: 185301988
Test: manual (swipe away notifications)
Change-Id: Ic293cebad4e7a5311c024a4d9cdc7b206689fde7
Move clock to the start, and move smartspace content below
it. Recalibrate burn-in and fully support RTL layouts. Remove extra
top margins.
Bug: 172360102
Test: manual
Change-Id: I2dc4300106c63095ae41f9407b2fe4c053017573
- only use one paint for hours and minutes
- customize vertical line spacing for Burmese numerals to account for
long ascenders and descenders
Note: Burmese numerals sometimes get cutoff at the bottom, bug filed at
b/179815528
Test: manual
Fixes: 177206446
Bug: 179781576
Change-Id: Iac71eabdcf1ed06962f38414253a2038651168c7
- Center hours, only show one digit for hours if starts with 0.
- Decrease vertical spacing
- Remove horizontal letterSpacing adjustment (will be taken care within
the font file)
- Update color to use textColorPrimary
Test: manual
Bug: 170228350
Change-Id: I66d990eef8579ff56876ff12e1398198e515ec41
- Update clock sizes (large clock = 200dp, small clock = 100dp)
- Update clock weights (large = 100-400, small = 200-300)
- Update clocks on time zone and time format changes
(Settings > System > Date & Time)
Test: manual, atest SystemUITests
Bug: 170228350
Change-Id: I446a2625fdd776c15e744f1601b3ea0e2a873cf1
- Only use the burn-in offsets on AOD. This means the clock will be in a
different position on LS compared to AOD.
- Align the top of the KeyguardSliceView (smart space) with the top of
the text of the clock (as opposed dto the top of the clock's view)
- Decrease bottom padding on KeyguardSliceTextView so that the DND icon
doesn't get cutoff when there's a large smart space info
Test: atest SystemUITests, manual
Bug: 170228350
Change-Id: I332300616e4218b6fcd24f837127a7eee487d4e7
Updated TextInterpolator and TextAnimator to support a
Paint object for each line of text. Now we can interpolate between
the colors when animating.
Clock colors are now based on the theme (for now, wallpaper text
color). ie: first line (of vertical clock) is one color, second line is
another color.
Also adjusted Keyguard clock logic to animate on doze changes instead of
animating incrementally on setDarkAmount.
Test: atest TextInterpolatorTest TextAnimatorTest
Bug: 170228350
Change-Id: Ia62f2de48534be2007afc5a95eac46b3c44ec880