Before the textAnimator is initialized, animateAppearOnLockscreen can
be called to set the color to be correctly set on the AnimatableClockView.
As a result, we should not suppress the calls to setTextStyle so that
the correct setTextStyle call is cached in onTextAnimatorInitialized.
Fixes: 246831875
Test: Manually checked broken usecase and several working usecases
Change-Id: I9ffbb34bc314affe64180ab1bbea411bebe37d2d
- These were only used for the unbundled launcher build, and Launcher
can reference system code directly now
Bug: 219861883
Test: Builds/Presubmit
Change-Id: I1532f1b853765fb69c5bf46ad5a08230bde00c5f
Merged-In: I1532f1b853765fb69c5bf46ad5a08230bde00c5f
- These were only used for the unbundled launcher build, and Launcher
can reference system code directly now
Bug: 219861883
Test: Builds/Presubmit
Change-Id: I1532f1b853765fb69c5bf46ad5a08230bde00c5f
This is a duplication of Ie8b08bec36bccfda5a1f1eb20c91a040c1f688ab
for the refactored clock code. It's validated via unit test as it
has proved somewhat tricky to reproduce manually.
Test: atest DefaultClockProviderTest
Fixes: 241729527
Change-Id: I0c664750190572790e71f6095a1ac8c4995c83ca
(cherry picked from commit c6bfa32a24)
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)
DefaultClock needed additional units as coverage of much of that class
was too low. This additionally adds an animation disable flag into
AnimatableClockView for use by the screenshot test.
Bug: 229771520
Test: atest DefaultClockProviderTest
Change-Id: I7d585cedb9b43ac0fb6405e36bec99ee8a246a61
(cherry picked from commit a823b466cc)
This is largely a cherry-pick of change
I6b32776dac1853eeab87c2a65da69478e4da5b75 but with
some notable changes to accomadate existing code
differences in tm-qpr-dev.
- We use a boolean instead of an enum for clock region
darkness as the enum is in a different place in tm-qpr-dev.
- We clean up some of the initialization code in
ClockEventController to prevent testing issues and provide
a dependency injection point to the screenshot test.
- Pull the clock color setting from the theme when region
sampling is disabled instead of defaulting to always dark.
Test: Manually validated colors matched reference images on
light and dark backgrounds with the region sampling feature
both enabled and disabled.
Bug: 229771520
Change-Id: I7906850b5de7f512f55e47e1122dfaacbc9c9406
(cherry picked from commit a724e0b753)
This is a duplication of Ie8b08bec36bccfda5a1f1eb20c91a040c1f688ab
for the refactored clock code. It's validated via unit test as it
has proved somewhat tricky to reproduce manually.
Test: atest DefaultClockProviderTest
Fixes: 241729527
Change-Id: I0c664750190572790e71f6095a1ac8c4995c83ca
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
DefaultClock needed additional units as coverage of much of that class
was too low. This additionally adds an animation disable flag into
AnimatableClockView for use by the screenshot test.
Bug: 229771520
Test: atest DefaultClockProviderTest
Change-Id: I7d585cedb9b43ac0fb6405e36bec99ee8a246a61
This is largely a cherry-pick of change
I6b32776dac1853eeab87c2a65da69478e4da5b75 but with
some notable changes to accomadate existing code
differences in tm-qpr-dev.
- We use a boolean instead of an enum for clock region
darkness as the enum is in a different place in tm-qpr-dev.
- We clean up some of the initialization code in
ClockEventController to prevent testing issues and provide
a dependency injection point to the screenshot test.
- Pull the clock color setting from the theme when region
sampling is disabled instead of defaulting to always dark.
Test: Manually validated colors matched reference images on
light and dark backgrounds with the region sampling feature
both enabled and disabled.
Bug: 229771520
Change-Id: I7906850b5de7f512f55e47e1122dfaacbc9c9406
This change moves text protection from the Animatable Clock Controller
to the Clock Event Controller.
Bug: 202758428
Fixes: 241260493
Test: atest ClockEventControllerTest
Change-Id: I33b8f69c1a5b7b915bb020be16593ef68c46281d
Merged-In: I33b8f69c1a5b7b915bb020be16593ef68c46281d
Revert "[DO NOT MERGE]Revert "Expose the clock version of google..."
Revert "[DO NOT MERGE]Revert "Changes to SystemUIGoogle to suppo..."
Revert submission 19508951-revert-19451291-cherrypick-clock_migration-tvip0m638i-BKWSUCNJAV
Reason for revert: Double Revert w/ fixes
Reverted Changes:
Iccd8d2e19:[DO NOT MERGE]Revert "Add clock version of google-...
I432d3d814:[DO NOT MERGE]Revert "Migrate KeyguardClockSwitch ...
Ifd0aa59df:[DO NOT MERGE]Revert "Expose the clock version of ...
I9a6ca6349:[DO NOT MERGE]Revert "Changes to SystemUIGoogle to...
To minimize merge issues, this topic consists of just cherry-picks from
master. Fixes for bugs are provided as downstream commits and will be
merged back to master as those bugs exist there as well. The commits
in this topic weren't tested in isolation beyond automated testing.
Additionally, I've updated the ktfmt exclude list to include new files
from this cherry-pick instead of reformatting those files.
Test: Screenshot test and manually validated each downstream fix mostly by
comparing reference images from known good builds to test builds.
Change-Id: Iff1d0ee8c6d09c77185be1ca5bbbe1aa5870e0c7
This change move the declaration of the region darkness enum
to a separate file in the region sampling folder.
Bug: 202758428
Test: Manual
Change-Id: Iac66797da18c0064b8d9e9a6691ad2d7ba1776f0
This change abstracts out the creation of a region sampling helper
and the initialization of all its fields. It adds test coverage
for the new class.
Bug: 202758428
Test: atest RegionSamplingInstanceTest
Change-Id: Ife2aafccc20466e81f481d1764210806dffc3123