Commit Graph

1530 Commits

Author SHA1 Message Date
Hawkwood Glazier
5fa4319669 Merge "Ensure state is set correctly after animateAppearOnLockscreen is called" into tm-qpr-dev am: 66f5377be9 am: 6bd6a90eac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19971066

Change-Id: I69d92a99a30933450439ecb60b63dd0012a4b918
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-19 19:03:47 +00:00
Hawkwood Glazier
6bd6a90eac Merge "Ensure state is set correctly after animateAppearOnLockscreen is called" into tm-qpr-dev am: 66f5377be9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19971066

Change-Id: Ib3ca05d14959bd43f111637b51831d0689b629ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-19 18:27:50 +00:00
Hawkwood Glazier
e5383425e1 Ensure state is set correctly after animateAppearOnLockscreen is called
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
2022-09-16 23:12:10 +00:00
Hawkwood Glazier
4942e374bb [DO NOT MERGE] Resolve file inconsistencies between master and tm-qpr-dev am: 3140d3530c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19933558

Change-Id: I3ddccb23cdb1ca1da9aef1743673e8cb1734f749
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 15:05:19 +00:00
Hawkwood Glazier
60e003dd44 Merge "[DO NOT MERGE] Resolve file inconsistencies between master and tm-qpr-dev" into tm-qpr-dev 2022-09-16 15:00:01 +00:00
TreeHugger Robot
825473aa9a Merge "Revert "Removing unused surface transaction wrappers"" into tm-qpr-dev am: 6d8c460357 am: eb6c5f0bb8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19971329

Change-Id: Ib7ec25afb57bfeceeb31a12e98823885fc77c0d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 01:42:14 +00:00
TreeHugger Robot
eb6c5f0bb8 Merge "Revert "Removing unused surface transaction wrappers"" into tm-qpr-dev am: 6d8c460357
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19971329

Change-Id: I833f095df500e4bae44347c08a6f0612761c40fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 01:14:41 +00:00
TreeHugger Robot
6d8c460357 Merge "Revert "Removing unused surface transaction wrappers"" into tm-qpr-dev 2022-09-16 00:20:41 +00:00
Sunny Goyal
2460910c8c Revert "Removing unused surface transaction wrappers"
Revert submission 19933596-tcompat

Reason for revert: b/246899728
Reverted Changes:
I31123dff7:Using Transaction directly instead of building sur...
I2e2526d21:Removing unused surface transaction wrappers

Change-Id: I44944ccd94def3b5925f1008f0b8d47387594f2b
2022-09-15 20:48:09 +00:00
Winson Chung
6ed85c9a54 Merge "Remove more thin wrappers from the shared lib" into tm-qpr-dev am: de2e7c4348
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19915348

Change-Id: I434601c0369f72f498daf53d7c989140d340b389
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 22:15:02 +00:00
Winson Chung
de2e7c4348 Merge "Remove more thin wrappers from the shared lib" into tm-qpr-dev 2022-09-14 22:03:05 +00:00
Sunny Goyal
31844ecf1e Merge "Removing unused surface transaction wrappers" into tm-qpr-dev am: b45f750657 am: b5a5e1b1b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19933929

Change-Id: I756244cd0f5e33f6e9b2951915011da35923f129
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 21:02:13 +00:00
Hawkwood Glazier
3140d3530c [DO NOT MERGE] Resolve file inconsistencies between master and tm-qpr-dev
Bug: 229771520
Test: Manually checked the device build
Change-Id: I03bf5eac968b425344236fbea897501bc5ecbeec
2022-09-14 19:08:04 +00:00
Winson Chung
7d4a22c86c Remove more thin wrappers from the shared lib
- 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
2022-09-14 16:31:17 +00:00
Winson Chung
3acc70a6ed Merge "Remove more thin wrappers from the shared lib" 2022-09-14 16:30:43 +00:00
Sunny Goyal
b5a5e1b1b2 Merge "Removing unused surface transaction wrappers" into tm-qpr-dev am: b45f750657
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19933929

Change-Id: Ied7bfb00bb02f4fb75f75bb628686a5a739991f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 04:28:16 +00:00
Winson Chung
a62cb21ba1 Remove more thin wrappers from the shared lib
- 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
2022-09-12 22:57:55 +00:00
Sunny Goyal
31564922c2 Removing unused surface transaction wrappers
Bug: 221961069
Test: Presubmit
Change-Id: I2e2526d215ab2c9acfd0ae1f86711d9681f62f19
2022-09-12 15:40:56 -07:00
Sunny Goyal
c8b3e2f051 Merge "Removing back-button alpha controlling logic" into tm-qpr-dev am: 1c02d77cd7 am: d305e20034
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19915767

Change-Id: Ie6fdfb8d7e2c2437da50b9bcb3a62d34268f3222
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 18:00:45 +00:00
Sunny Goyal
d305e20034 Merge "Removing back-button alpha controlling logic" into tm-qpr-dev am: 1c02d77cd7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19915767

Change-Id: I38b72f7f76c071437488439f627e3142967ff19b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 17:16:38 +00:00
Sunny Goyal
e0b9b1f1dc Removing back-button alpha controlling logic
Bug: 246006580
Test: Presubmit
Change-Id: I57e6346eca52c850a31bdfa399f58e9df97cf682
2022-09-09 21:02:54 -07:00
Krzysztof Kosiński
08f1222bef Merge "Switch to source-built GSON." into tm-qpr-dev-plus-aosp am: b5e2835e2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19904758

Change-Id: Ic1200936b44c3d840479e179ed54ce7435b11be9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 19:12:11 +00:00
Krzysztof Kosiński
81ad6d5096 Switch to source-built GSON.
Bug: 243950468
Test: local build, presubmit
Change-Id: Ifd9c83ce4940d209a473d20e4581c83b1e112d81
2022-09-09 04:58:51 +00:00
Hawkwood Glazier
d236127c79 Initialize TimeZone during DefaultClockProvider init
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)
2022-09-06 18:23:14 +00:00
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
8d7ed90864 Additional Tests for DefaultClock
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)
2022-09-06 18:23:13 +00:00
Grace
c254146e3c Update DefaultClockProvider colors
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)
2022-09-06 18:23:13 +00:00
Hawkwood Glazier
53f0dc4fdd Allow manually specified time
Additionally, disable layout animation from test

Bug: 229771520
Test: Automated
Change-Id: I2518d293f5b03e7bea7a45d8ef24ec6a998b5d30
(cherry picked from commit ed1efe9f31)
2022-09-06 18:23:08 +00:00
Hawkwood Glazier
c6bfa32a24 [DO NOT MERGE] Initialize TimeZone during DefaultClockProvider init
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
2022-08-31 22:27:06 +00:00
Hawkwood Glazier
6a62f99b50 [DO NOT MERGE] 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
2022-08-31 22:27:06 +00:00
Hawkwood Glazier
a823b466cc [DO NOT MERGE] Additional Tests for DefaultClock
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
2022-08-31 22:27:05 +00:00
Grace
a724e0b753 [DO NOT MERGE] Update DefaultClockProvider colors
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
2022-08-31 22:27:05 +00:00
Grace
417feefd5f [DO NOT MERGE] Moving Text Protection to Clock Event Controller
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
2022-08-31 22:27:05 +00:00
Hawkwood Glazier
843cd5ea89 [DO NOT MERGE] Revert "[DO NOT MERGE]Revert "Migrate KeyguardClockSwitch to new..."
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
2022-08-31 22:26:07 +00:00
Grace Han
030f49a843 Merge "Fix Region Sampling Bounds" into tm-qpr-dev am: f2f92cd251 am: 77d16ca954
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19700950

Change-Id: I64e6898da20fb4b4399c9defaa6b26e870f77fa6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 06:13:46 +00:00
Grace Han
f2f92cd251 Merge "Fix Region Sampling Bounds" into tm-qpr-dev 2022-08-25 05:17:36 +00:00
Grace Han
b713bb6936 Fix Region Sampling Bounds
This change updates the sampling bounds used for region sampling.

Bug: 202758428
Test: Manual
Change-Id: I7a33bb6ce27fdbd8891434c627a3b10545086272
2022-08-25 01:18:42 +00:00
Alex Florescu
37c2a44319 Merge "Show floating rotation button in sticky immersive mode if taskbar is used" into tm-qpr-dev am: 04fd349391 am: 80f4d0f80e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19581774

Change-Id: I49338977753b4b3fc6dcef4c322805d50b08d622
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 04:49:57 +00:00
TreeHugger Robot
d8769634c8 Merge "Dump additional AnimatableClock updates" into tm-qpr-dev 2022-08-23 14:29:10 +00:00
Alex Florescu
04fd349391 Merge "Show floating rotation button in sticky immersive mode if taskbar is used" into tm-qpr-dev 2022-08-23 08:22:38 +00:00
Beverly
4466bbb4f6 Dump additional AnimatableClock updates
Test: dump sysui
Bug: 241729527
Bug: 222260948
Change-Id: I8d747a08e4d0a0ad211872f0d2a8495839b0f3a5
Merged-In: I8d747a08e4d0a0ad211872f0d2a8495839b0f3a5
2022-08-22 19:56:14 +00:00
Beverly
3b10e5e0e2 Dump additional AnimatableClock updates
Test: dump sysui
Bug: 241729527
Bug: 222260948
Change-Id: I8d747a08e4d0a0ad211872f0d2a8495839b0f3a5
2022-08-22 19:55:32 +00:00
Grace Han
5ffeefe020 Merge "Create New Class for Region Darkness Enum" 2022-08-22 15:41:10 +00:00
Grace Han
ebbe9d14bd Create New Class for Region Darkness Enum
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
2022-08-20 01:29:04 +00:00
Hawkwood Glazier
aad4ac792e Merge "[DO NOT MERGE] Allow manually specified time" into tm-qpr-dev 2022-08-19 21:21:37 +00:00
Hawkwood Glazier
ed1efe9f31 [DO NOT MERGE] Allow manually specified time
Additionally, disable layout animation from test

Bug: 229771520
Test: Automated
Change-Id: I2518d293f5b03e7bea7a45d8ef24ec6a998b5d30
2022-08-19 21:18:00 +00:00
Alex Florescu
b49a28e1c8 Show floating rotation button in sticky immersive mode if taskbar is used
Bug: 241245977
Bug: 216182085
Test: atest SystemUITests:RotationButtonControllerTest
Change-Id: I1664241cc8cd156e301466c06c92090c1eb5be8d
2022-08-19 15:18:00 +00:00
Shan Huang
d888fe4428 Merge "[DO NOT MERGE] Separate Region Sampling Instance" into tm-qpr-dev 2022-08-18 23:51:11 +00:00
Grace
0371876473 [DO NOT MERGE] Separate Region Sampling Instance
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
2022-08-17 18:54:01 +00:00
Hongwei Wang
ab48e5528b Merge "[Re-land] Deprecate getSfInstance usage in PiP component" into tm-qpr-dev am: 4a24c54245 am: 9d5b2d3356
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18930752

Change-Id: I69974dd777775711fa8f707f3fe67f842fe2097d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-11 15:09:10 +00:00