Commit Graph

17 Commits

Author SHA1 Message Date
Josh Tsuji
ee89a547f1 Adds the ScreenOffAnimationController, which fixes multiple issues with unlocked screen off.
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
2021-05-27 16:26:22 -04:00
Beverly
27e2efeeeb Forward fix/revert of clock detached state on keyguard visibility
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
2021-05-20 16:41:09 -04:00
Matt Pietal
006b3a23c7 Merge "Don't animate large clock appearance on AOD" into sc-dev 2021-05-18 14:05:30 +00:00
Beverly
f18b2894e4 Consider the clock detached if the keyguard isn't visible
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
2021-05-14 16:22:18 -04:00
Matt Pietal
acb528f2d7 Don't animate large clock appearance on AOD
Just don't do it.

Fixes: 188205862
Test: manual
Change-Id: I0e13658f1bd478dca55203ea5ccf40801859b56e
2021-05-14 15:02:13 -04:00
Matt Pietal
b40d4b4857 Smartspace - Animate vertically with clock change
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
2021-05-13 16:19:46 -04:00
Beverly
c8410aa9c2 Animate clock weight to 0 on bypass face auth
Test: manual
Fixes: 186631254
Change-Id: Ib9ceb4c23c06717404845535ee86987d7f43686f
2021-04-28 14:31:27 -04:00
Shan Huang
e0362426eb Animate LockScreen and AOD clock text for charging events
Test: Manual
Bug: 182719493

Change-Id: I57f7cd834a08d8846a35cdf731611fc7a239b85a
2021-04-12 21:23:26 +08:00
Beverly
36f2a1f4cd Introduce new colorful wallpaperTextColor
Use for clock and udfps icon

Test: manual
Fixes: 182799149
Change-Id: Ife6f4eb9c352bdde41570eb82e6c5f480032a214
2021-03-24 12:33:31 -04:00
Beverly
aadf7bafc5 Only animate clock weight if doze is animating
Test: manual
Fixes: 180574794
Change-Id: I055e1b7d2e3f0db9d4359bba5295f6ee8ae27502
2021-03-11 18:21:04 +00:00
Matt Pietal
9cc2bce012 AOD/LS - Move clock to start
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
2021-02-19 08:16:25 -05:00
Beverly
f046e8ddd7 Update LS/AOD clock
- 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
2021-02-09 17:29:14 -05:00
Beverly
ce5d7b481a Revert LS/AOD clock color change
Until new colors will take into account contrast with the wallpaper.

Test: manual
Bug: 170228350
Change-Id: Icd3628e1f8aedfaeeb3b1cd264c6d0851b0f8cce
2021-01-14 15:00:54 -05:00
Beverly
81affc1f1f Update LS/AOD clock
- 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
2021-01-13 16:22:09 -05:00
Beverly
e1b6d7f819 Update AOD/LS clock
- 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
2020-12-03 14:09:35 +00:00
Beverly
741c6e367d Update spacing/layout of LS clock
- 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
2020-11-17 19:32:00 +00:00
Beverly
192b7c9eaa Add support for LS Clock to use > 1 Paint object
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
2020-11-17 14:20:02 -05:00