summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2021-10-06Update dozing state on clock view attachedBeverly
Else, the clock may animate in at the wrong font weight. Test: atest AnimatableClockControllerTest Test: manually swipe away all notifications on LS, see the large clock animate in at full font weight Fixes: 201615075 Change-Id: I139e5a5c88551f23f99decff3e7ffc8bdaa5bba4
2021-09-16Ensure callbacks removed when view detached.Dan Sandler
Fixes: 193414087 Test: atest SystemUITests Test: examine heap dumps for SysuiStatusBarStateController$RankedListener instances Change-Id: I052c823b266449208424322457adcfdb483a278d
2021-07-21Rely on the dozeAmount changes for mIsDozingBeverly
The large clock view can be attached while the doze transition is happening, so we don't want to mistakently set mIsDozing=false from StatusBarStateController#isDozing when we should be relying on the update from onDozeAmountChanged. Test: manual Fixes: 194277812 Change-Id: I202b9d845194f9d97d8ac1d6d1ff7e3f78491fd7
2021-07-09Don't animate weight to 0 on face unlock bypassBeverly
The transition happens so fast, you can barely see the weight animation, so let's not animate it. Test: manual Fixes: 192352151 Change-Id: Ie7430d6ab3ab0675826005125f87db03886ddc48
2021-07-07Bring back time formatting for single line clockBeverly
Use old date format for the single line clock, so that we now support (for single line clock) different clock representations. For example, French Canadian uses an h instead of a colon (13 h 01 instead of 13:01). Test: manual Bug: 186726401 Fixes: 191761465 Change-Id: If97a49780029f24dc99625a310729630b69e7a68
2021-06-29Fix clock font weight animation to always match the latest doze state.Shan Huang
Bug:189296201 Fixes:189296201 Test: Turn off AOD, put screen off, plugin charger, checks the font weight after phone wakes up. Change-Id: I1206efbf213e6fbbfddfc2eb884f66a9321bf993
2021-06-11Bypass fixes for clockMatt Pietal
1. Algo bypass flag can be ignored for positioning, as it was causing the keyguard to get stuck and show underneath the bouncer. 2. Cleanup old layout code 3. The clock would disappear after face auth on reboot, since the bouncer is required. Check for strong auth Fixes: 185314537 Test: manual exploration with and without bypass and face auth Change-Id: I423fc81d3dca7aa7d8c44cd152bd29d91c479322
2021-05-27Adds the ScreenOffAnimationController, which fixes multiple issues with ↵Josh Tsuji
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-20Forward fix/revert of clock detached state on keyguard visibilityBeverly
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-18Merge "Don't animate large clock appearance on AOD" into sc-devMatt Pietal
2021-05-14Consider the clock detached if the keyguard isn't visibleBeverly
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-14Don't animate large clock appearance on AODMatt Pietal
Just don't do it. Fixes: 188205862 Test: manual Change-Id: I0e13658f1bd478dca55203ea5ccf40801859b56e
2021-05-13Smartspace - Animate vertically with clock changeMatt Pietal
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-04-28Animate clock weight to 0 on bypass face authBeverly
Test: manual Fixes: 186631254 Change-Id: Ib9ceb4c23c06717404845535ee86987d7f43686f
2021-04-12Animate LockScreen and AOD clock text for charging eventsShan Huang
Test: Manual Bug: 182719493 Change-Id: I57f7cd834a08d8846a35cdf731611fc7a239b85a
2021-03-24Introduce new colorful wallpaperTextColorBeverly
Use for clock and udfps icon Test: manual Fixes: 182799149 Change-Id: Ife6f4eb9c352bdde41570eb82e6c5f480032a214
2021-03-11Only animate clock weight if doze is animatingBeverly
Test: manual Fixes: 180574794 Change-Id: I055e1b7d2e3f0db9d4359bba5295f6ee8ae27502
2021-02-19AOD/LS - Move clock to startMatt Pietal
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-09Update LS/AOD clockBeverly
- 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-01-14Revert LS/AOD clock color changeBeverly
Until new colors will take into account contrast with the wallpaper. Test: manual Bug: 170228350 Change-Id: Icd3628e1f8aedfaeeb3b1cd264c6d0851b0f8cce
2021-01-13Update LS/AOD clockBeverly
- 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
2020-12-03Update AOD/LS clockBeverly
- 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-11-17Update spacing/layout of LS clockBeverly
- 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-17Add support for LS Clock to use > 1 Paint objectBeverly
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