Commit Graph

96 Commits

Author SHA1 Message Date
Hawkwood Glazier
b064383802 Correct large clock position
This corrects the large clock positioning error that was introduced with
Ia053aaec6987e00de980388a6c024d8bcf5203a2. It does this by rearranging
the layout slightly to get back to the same position. Of note:
 - Previously the margin for the large clock was computed dynamically
   and applied to the large clock frame from a static resource and
   dynamic value based on the font. Now the static portion is applied
   directly from the resource to the clock frame in the layout resource.
   The dynamic portion is applied to the AnimatableClockView directly
   instead of it's parent as before.
 - ChildClipping has been disabled on the parent view as the dynamic
   portion of this margin moves the AnimatableClockView outside of
   it's parent's bounds.
 - The margin that is now applied to the AnimatableClockView is
   scaled by 0.5 to account produce the ccorrect placement after
   center-aligning the view in it's parent. Before the full value
   was applied to the parent, creating an equivalent effect.

This also fixes the clock translation issue when the splitshade appears
and disappears. They were both fundamentally layout issues with the
refactored clock code.

This change was manually tested by flashing each device and comparing
the clock position in every configuration against a refenece image from
a dogfood build. Additionally the motion of the clock was validated
when the splitshade appears and disappears on a tablet in landscape.

Test: Manual validated screenshots from several devices against reference
images from a known good build. Additionally validated with a screenshot
test, although golden images had to be updated.

Bug: 229771520
Fixes: 241083568
Fixes: 241084042
Change-Id: I273c2996ff67c7b5f77c6bafb292d53275c7bc47
(cherry picked from commit 6a62f99b50)
2022-09-06 18:23:13 +00:00
Hawkwood Glazier
2a4d9e5d51 Prevent NPE when displaying a missing clock
Test: Manual
Bug: 229771520
Fixes: 237255645
Change-Id: I17cddba7aee082c118f9f63eaab8a8c025daee73
2022-06-28 19:30:01 +00:00
Hawkwood Glazier
7c98605a0a Add Flag for Custom Clocks
Test: Manual
Bug: 229771520
Change-Id: Ic06481b3da589ab6f27ae4ff79bd39a45dee3711
2022-06-22 15:45:24 +00:00
Hawkwood Glazier
c8b33ca43f Migrate KeyguardClockSwitch to new shared Clock library
This change modifies the KeyguardClockSwitch and Controller
to get clocks from the ClockRegistry. Since the only clock
available from the registry is the default one, this should
have no user-facing changes, and is intended only to update
the relevant codepaths.

Bug: 229771520
Test: Manual and Automated
Change-Id: Ia053aaec6987e00de980388a6c024d8bcf5203a2
2022-06-21 18:11:38 +00:00
TreeHugger Robot
4705876c75 Merge "Update view when locale changes" into tm-dev am: 61fd8b9538 am: 60f39e8c7d am: 72ef6b43a2 am: 6d7e32159c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18795097

Change-Id: If178881e9cf49e8f60631dedb77fc64dcaeeb7c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 02:55:07 +00:00
Matt Pietal
97f3a42dc5 Update view when locale changes
Updating the locale would leave lockscreen smartspace showing the old
locale. Need to force a rebuild of the view to reflect the update.

Fixes: 225843613
Test: atest KeyguardStatusViewControllerTest KeyguardClockSwitchControllerTest
Change-Id: If37e138925c7ea8cb13dad4fa2f687215d1a7ff9
2022-06-08 15:37:30 +00:00
Hawkwood Glazier
18c08045e9 Migrate AnimatableClockView to SystemUISharedLib
Attempt #2

Bug: 229771520
Test: Automated
Change-Id: I93170c27d47017a81c4ef430823939fd0b9ec9c7
2022-06-02 18:16:32 +00:00
Martijn Coenen
b821a9ae3c Revert "Migrate AnimatableClockView to SystemUISharedLib"
Revert submission 18538234-anim_clock_view_migrate

Reason for revert: b/234715807
Reverted Changes:
Ic1270b5fc:Migrate AnimatableClockView to SystemUISharedLib
Ieeef5d67c:Update package of AnimatableClockView

Change-Id: Id88b5ea8a578c2dc322b17cc86d5b65f7ddcf4c2
2022-06-02 14:14:22 +00:00
Hawkwood Glazier
1a356f83b7 Migrate AnimatableClockView to SystemUISharedLib
Bug: 229771520
Test: Automated
Change-Id: Ic1270b5fc31526b877068eb3357f822d7818d304
2022-06-01 14:25:08 +00:00
Josh Tsuji
ddfe8bda75 Use Launcher smartspace instead of SysUI's for the shared element transition.
See justification/explanation in linked bug.

I re-ordered some methods in the unlock controller so they'd make more sense,
they're generally called from top to bottom now during the unlock sequence.

Bug: 229890190
Fixes: 227713319
Test: atest SystemUITests
Test: manual
Merged-In: I58fa437eea183691ff29548143664698498c2105
Change-Id: I58fa437eea183691ff29548143664698498c2105
2022-04-29 05:40:54 +00:00
Josh Tsuji
53781df704 Use Launcher smartspace instead of SysUI's for the shared element transition.
See justification/explanation in linked bug.

I re-ordered some methods in the unlock controller so they'd make more sense,
they're generally called from top to bottom now during the unlock sequence.

Bug: 229890190
Fixes: 227713319
Test: atest SystemUITests
Test: manual
Change-Id: I58fa437eea183691ff29548143664698498c2105
2022-04-28 13:00:16 -04:00
Josh Tsuji
57478fe07c Remove keyguard unlock listener to fix leak.
Fixes: 221870458
Test: atest SystemUITests
Change-Id: I58f02735a386e1621873166d1793f592cb2f9249
2022-04-11 20:42:13 +00:00
Josh Tsuji
5781577d82 Remove keyguard unlock listener to fix leak.
Fixes: 221870458
Test: atest SystemUITests
Change-Id: I58f02735a386e1621873166d1793f592cb2f9249
2022-04-11 12:11:17 -04:00
Dave Mankoff
22149274f9 Merge "Remove FileDescriptor from systemui.Dumpable." into tm-dev 2022-04-07 20:19:05 +00:00
Aaron Liu
a8e6880064 Merge changes from topic "presubmit-am-6c9d45f3c448459988f5ee40b416e0db" into tm-mainline-prod am: 28a6327fb8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17592725

Change-Id: Idf012401a89f6f66fbd6377879e0004d21334c08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 18:00:18 +00:00
Aaron Liu
e28baefa31 [Fix settings] Multi user for settings wrapper
Audit and fix SettingsProxy usages to account for multiple users.

Note that this does not fix any Settings usages that does not use
SettingsProxy. There maybe be outstanding files to change, but from a
glance, most of the usages seem to be user aware.

Bug: 226391543
Test: Manual and fixed unit tests

Change-Id: Ia8ff59fe55049cc79ac73237087d3aaca2cbb3b3
2022-04-06 17:38:26 +00:00
Dave Mankoff
96985e5212 Remove FileDescriptor from systemui.Dumpable.
This is the first step in moving over to the new public
android.util.Dumpable api.

Bug: 217567642
Test: m SystemUI
Merged-In: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0
Change-Id: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0
2022-04-05 20:48:27 +00:00
Dave Mankoff
d5fd839f13 Remove FileDescriptor from systemui.Dumpable.
This is the first step in moving over to the new public
android.util.Dumpable api.

Bug: 217567642
Test: m SystemUI
Change-Id: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0
2022-04-05 15:15:13 +00:00
Beverly Tai
404e04500d Merge "Update clock position" into tm-dev 2022-03-29 13:29:09 +00:00
Beverly
d519839411 Update clock position
Take into account the descent of the font.
For numeral fonts that support languages such as
Burmese, this space can be significant.

Test: atest KeyguardClockSwitchControllerTest
Test: manual
Fixes: 220158349
Change-Id: I778d9988e78ddde89a245f0383954ec9203bc185
2022-03-25 19:00:04 +00:00
Beverly
65009983be Add additional debug logs to clock view
Test: manually check logcat
Bug: 222260948
Change-Id: Iadc00b1140bd72c72f0119f15f619e6de22ae316
2022-03-24 21:38:31 +00:00
Josh Tsuji
32354d952b Adds Launcher in-window animations, and reworks how the unlock flow works.
Bug: 197636887
Test: atest SystemUITests
Change-Id: If6ff114f90fcfc19b9e3530bb0dea8cc0591f745
2022-01-18 17:41:28 -05:00
Matt Pietal
bbf95880ff Merge "Legacy smartspace alignment fixes" into sc-v2-dev am: 65d19ed043 am: 05305a93c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16467929

Change-Id: I3b1a7321666275964b6042043bfe92a7a293f3e3
2021-12-15 18:21:23 +00:00
Matt Pietal
62e224407d Legacy smartspace alignment fixes
If newer smartspace content is not enabled, the title alignment and
burn-in placement of legacy smartspace is incorrect. Align to the
start.

Fixes: 210090859
Test: manual, play music and disable new smartspace

Change-Id: Id038290100b9bc254d6060cb163b0fe772518018
2021-12-14 11:15:31 -05:00
TreeHugger Robot
24a379c92f Merge "Update clock location" into sc-v2-dev am: bda966d4d0 am: b4f39650a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16457712

Change-Id: I551726bc137a67472f5e7c7a06860e0810c014db
2021-12-14 00:59:05 +00:00
Matt Pietal
5a251be21f Update clock location
If smartspace, the large clock would overlap with UDFPS content. Make
sure the negative margin gets applied in all cases. Make slight
adjustments to the margin.

Bug: 209864593
Test: manual, oriole + all display sizes
Change-Id: Ibacdc777a8a1d6bcf9324cc12871fc6662a3d5c4
2021-12-13 14:31:39 -05:00
TreeHugger Robot
80a49a081f Merge "Fold to AOD animation: part 2, add fold to aod controller" 2021-12-13 17:58:24 +00:00
Nick Chameyev
418683f500 Fold to AOD animation: part 2, add fold to aod controller
Adds animation that animates AOD content
from left to right when folding a foldable
device.

There are still a couple of issue that should be
addressed in the follow up CLs:
* Navigation bar handle sometimes displayed on AOD
* Showing keyguard when folding from unlocked state
sometimes takes too much time so the screen blocker
times out which leads to flickering

Bug: 202844967
Test: fold from lockscreen, fold from unlocked device,
 aod enabled/disabled, gesture nav enabled/disabled
Test: screen off animation when unlocked
Test: screen off animation when locked
Test: screen off animation when timed out
Test: fingerprint unlock from aod
Change-Id: Ie44f82119ac770ce34faecc60402044d4109dddf
2021-12-13 15:30:29 +00:00
Michal Brzezinski
af3f020b35 Centering big clock vertically on large screen lockscreen and AOD
Big clock was not centered vertically properly in case we don't support smartspace on the device. When smartspace is not present big clock's height is wrap_content and that makes it (and all parent views) takes much less space. Then even though clock might be centered in parent, parent is not centered on the screen so it doesn't change much.
This change is making it always go match_parent, that is (more or less) full height of the screen.

Fixes: 209013448
Test: manual
Change-Id: I721b5750ae34d204c6eb0bdb7edca6aa12e3a88b
2021-12-10 18:03:35 +00:00
Matt Pietal
6f341cd95c Allow a settings override for double-line clock
This setting allows users to always show a single-line format clock,
regardless of notification status.

Fixes: 194905512
Test: atest KeyguardClockSwitchControllerTest
Change-Id: I77269988447fc5732ff6b8774654ce4bf9c026de
2021-11-17 19:26:26 +00:00
Matt Pietal
9688ad33e7 [DO NOT MERGE] Allow a settings override for double-line clock
This setting allows users to always show a single-line format clock,
regardless of notification status.

Fixes: 194905512
Test: atest KeyguardClockSwitchControllerTest
Change-Id: I77269988447fc5732ff6b8774654ce4bf9c026de
2021-11-17 13:31:26 +00:00
Beverly
392d8686a9 Add a bold-text version for the keyguard clock
Test: manual (Settings > A11y > Text and display > Bold text)
Test: atest AnimatableClockControllerTest
Fixes: 201034059
Change-Id: I656afac3ee22e79a0bf218803699ab5182c34c66
2021-11-11 14:01:39 -05:00
Matt Pietal
648a020480 Don't register multiple predraw listeners
Also make sure they are removed properly when the view becomes
detached.

Fixes: 203257107
Test: atest KeyguardClockSwitchControllerTest

Change-Id: Ied4d4e7774d15af71648b188ac723c9c7635f506
2021-10-20 11:30:19 -04:00
Matt Pietal
b03823f4dc AOD - Notif icon location
Support a mode where icons are visible on AOD with the large
clock. This means shifting both smartspace and icons when switching
between large/small clocks.

Also: Continue to remove old keyguard flag
Also: Add a couple logs for smartspace, let
LockscreenSmartspaceController handle disconnect directly

Fixes: 201548040
Test: atest KeyguardClockSwitchControllerTest KeyguardSliceViewTest KeyguardUpdateMonitorTest KeyguardStatusViewControllerTest
Change-Id: I3697aea0c1a8083e87d446d082d95aab573af83a
2021-10-14 11:56:53 +00:00
Beverly Tai
385e707260 Merge "Update dozing state on clock view attached" into sc-qpr1-dev am: f841ce4725
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15993367

Change-Id: I9cdc74eb37fc0efaa14b47d93b1293639e41ba25
2021-10-06 17:49:50 +00:00
Beverly
3fac0854c2 Update dozing state on clock view attached
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-10-06 14:09:39 +00:00
Beverly
3a7d2e55a6 Update clock burn-in so it doesn't clash with udpfs
* update the UDFPS icon burn-in parameters to be in pixels
because we don't want display density to increase the
position movement
* when the clock is centered aligned, we want to make sure
it doesn't overlap with the udfps icon

Test: atest SystemUITests, manually update clock times with
with DozeUi.BURN_IN_TESTING_ENABLED enabled and see clock
doesn't interfere with the UDFPS icon.
Fixes: 192423460

Change-Id: I6f95fe3ad763971b804129b517f4c98192ab3674
Merged-In: I6f95fe3ad763971b804129b517f4c98192ab3674
2021-09-27 12:30:33 +00:00
Beverly
9b62051f88 Update clock burn-in so it doesn't clash with udpfs
* update the UDFPS icon burn-in parameters to be in pixels
because we don't want display density to increase the
position movement
* when the clock is centered aligned, we want to make sure
it doesn't overlap with the udfps icon

Test: atest SystemUITests, manually update clock times with
with DozeUi.BURN_IN_TESTING_ENABLED enabled and see clock
doesn't interfere with the UDFPS icon.
Fixes: 192423460

Change-Id: I6f95fe3ad763971b804129b517f4c98192ab3674
2021-09-17 17:48:25 +00:00
Matt Pietal
b9b97ec9d4 [DO NOT MERGE] Support multiple smartspace views
Previously, a singleton view was reused in multiple places. However,
this does not work when multiple displays are in use, such as when
casting the device display to another screen. Supports sets of views
that are activated when they are attached to windows, and removed when
they are detached.

Fixes: 196175396
Test: atest LockscreenSmartspaceControllerTest
Change-Id: Ied1ecff9103d8539f075785409d2951a1be21ab2
2021-08-25 16:06:40 -04:00
Michał Brzeziński
fdaaa7d1f3 Revert "Moving smartspace to the right on the lockscreen for split shade"
This reverts commit d04b85a037.

Reason for revert: UX decision on smartspace positioning was reverted
Bug: 197624854
Bug: 196977150

Change-Id: I6247289495d39c7f216d90a7de5227b9daa56a44
Merged-In: I6247289495d39c7f216d90a7de5227b9daa56a44
2021-08-24 19:25:58 +01:00
Neha Jain
de25146d1c Merge "Limit keyguard views on alt displays" into sc-dev am: b3deaf2b6d am: dcb1cbfcfb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15547527

Change-Id: I67521d43a083bc0dab4b5666e3eb35914d5be144
2021-08-13 19:14:56 +00:00
Matt Pietal
893286a5d4 Limit keyguard views on alt displays
When casting or on other displays, the keyguard has always limited the
information shown when locked. Don't show the smartspace and icons on
these alternate displays

Fixes: 196175396
Test: manual (cast to nest display device)
Change-Id: Ied1ecff9103d8539f075785409d2951a1be21ab2
2021-08-12 18:26:15 -04:00
Michal Brzezinski
8afdd40f0e Moving smartspace to the right on the lockscreen for split shade
There is a new view managed by ConstraintLayout guidelines that serves as container for smartspace and is placed on the right.
It's visible only in split shade and then it contains Smartspace. Smartspace view is switching between the default (current) view container and the new split shade container.
Switching Smartspace view and visibility of its containers is managed by LockscreenSmartspaceController.

Bug: 193654214
Test: KeyguardClockSwitchControllerTest, LockscreenSmartspaceControllerTest, KeyguardClockPositionAlgorithmTest
Change-Id: I1afcdf7f3c750c36b995f1d6fd9d4393eee8cbef
Merged-In: I1afcdf7f3c750c36b995f1d6fd9d4393eee8cbef
2021-08-04 11:59:42 +01:00
Beverly Tai
857a5a2b36 Merge "Bring back time formatting for single line clock" into sc-dev am: 67e353d818
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15192039

Change-Id: I0a2b6289008be559afa67fb318857ec25650f44f
2021-07-07 21:00:45 +00:00
Beverly
4812dfbc62 Bring back time formatting for single line clock
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-07-07 20:45:06 +00:00
Matt Pietal
1664fe7849 Merge "Large clock positioning" into sc-dev am: 4719320ff6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15154904

Change-Id: I94e3add2e63af7b4c1087827a2b0792ab9e05238
2021-06-30 20:38:37 +00:00
Matt Pietal
969616a0bd Large clock positioning
- Better position the large clock to support various display
sizes. Specs call for centering minus a slight adjustment vertically.
- Make sure notifications don't run into the indication area. The
prior padding was too small.
- Ensure a smooth transition between lockscreen and bouncer
- Fix the smartspace with large clock to not interfere with the dock
settings icon

Fixes: 190047134
Test: manual (all display sizes)
Change-Id: I89e35eef35dc1d3d609b381f768779226962585f
2021-06-30 11:03:12 -04:00
Matt Pietal
3615d4b819 Merge "Lockscreen spacing to UX specs" into sc-dev am: e1ae3b743e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15049505

Change-Id: I3cc8f4ec22695d27db065d8244a3a84b7a7cd340
2021-06-22 17:03:10 +00:00
Matt Pietal
65b9b13465 Lockscreen spacing to UX specs
Reduce spacing between smartspace and notification area. Remove
concept of 'expanded clock position' from
KeyguardClockPositionAlgorithm, as it was only used when content was
vertically centered. Similarly, remove difference between
bypass/non-bypass height as the two layouts now match.

Fixes: 183008450
Fixes: 190831603
Test: atest KeyguardClockPositionAlgorithmTest
Change-Id: Ie274e34eb61a876166c11e4f4fa3b9d95ef49888
2021-06-21 15:37:48 -04:00
Michal Brzezinski
a34ae4718a Always showing big clock on the lockscreen in split shade
Big clock should be always visible on the left side of the lockscreen
in split shade mode, regardless of the number of notifications.

Bug: 190702873
Test: KeyguardClockSwitchTest and NotificationPanelViewTest
Change-Id: I7c4bb9684533f278f2014cf6fdf1b1b3f2e04515
2021-06-14 17:00:23 +01:00