Creates a new package within shell for floating tasks along with a
basic controller and interfaces for sysui and launcher to use to
manage floating tasks.
A single floating task is allowed at a time and they can only be
created if a sysui flag is turned on.
The floating task is backed by a TaskView, floats above all other
content, and can be moved via a handle at the top of the view. The
view sticks along the left and right edges of the screen, can be
stashed (similar to PIP), and can be removed by dragging to a dismiss
target in the middle of the screen (similar to PIP & bubbles).
The tests included trigger the sysui flag on and off to ensure the
flag behavior (i.e. that you can't create one unless the flag is on).
Test: atest FloatingTaskControllerTest
Bug: 237678727
Change-Id: I490c44685825e14166869b2cf7c2994ee0e30ba7
Also refactors the code to place the double shadow code in a shared
location, and specify the shadow config in xml instead of hardcoding.
Bug: 239089588
Test: manually on device by flashing and verifying the icon atop the
dream has the proper shadow
Change-Id: I18db07c243e20785409d5cc760b614a8ee775f1f
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
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 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
- Deprecated also the custom animation handler in PhysicsAnimator
- Ensures the transactions within PiP have VsyncId being set
- Still using getSfInstance in PipResizeGestureHandler since migrating
to getInstance causes regression for resize-and-tap PiP window.
Trace: https://ui.perfetto.dev/#!/?s=8a3a073ce2f9ad84c7e377e6ba866657076adf0525444c0261e65b2e66f24a
Bug: 222697646
Test: Record perfetto trace while moving PiP, see the Trace
Test: verify PiP functionalities still work
Change-Id: I93f8bf2392425d72829600d0bbed0b3c58ec08d0
This allows to save some power while the device is unfolded but with screen off.
+ Avoiding registering more listeners if HingeSensorAngleProvider.start() is called multiple times sequentially without a `stop` in the middle. It seems that otherwise we would get duplicated callbacks.
+ Adding onScreenTurningOn and onScreenTurningOff callbacks to forward to Launcher (as only sysui is receiving them)
Bug: 240661156
Bug: 240374404
Test: DeviceFoldStateProviderTest
Change-Id: I40b77033690c2e708275ce49bbe156c781105a00
This works in both debug and release builds. In debug builds,
all flags can be overridden via the same mechanisms as before,
but can also be overridden by flags defined on the server.
On release builds, only `ReleasedFlag`s can be overridden.
`UnreleasedFlag`s remain set in their default state.
With this cl, server side flags do not get their new value
until SystemUI is restarted (via a reboot or a crash).
Bug: 239863271
Test: atest SystemUITests
Change-Id: I08166cb90675dea06b2671669cecfc16ac58ab61
Merged-In: I08166cb90675dea06b2671669cecfc16ac58ab61
Separate RemoteAnimationTargetCompat.wrap to wrapApps and wrapNonApps to
support extracting non-app targets. Update to distinguish a divider
change from non-app targets to ensure it can be animated properly.
Fix: 222163803
Test: atest RemoteTransitionTest
Test: atest SplitTransitionTests
Test: enabled shell transition, cold launch a split pair from overview
has proper transition.
Change-Id: Ibd45d612e75c3a3b664aaf3944f424289419858b
Revert "Expose the clock version of google-sans"
Revert "Changes to SystemUIGoogle to support clock migration"
Revert submission 19451291-cherrypick-clock_migration-tvip0m638i
Reason for revert: b/241084042
Reverted Changes:
Ia053aaec6:Migrate KeyguardClockSwitch to new shared Clock li...
Ia3e067b93:Changes to SystemUIGoogle to support clock migrati...
I5dbf01a83:Add clock version of google-sans
Ia654d4f41:Expose the clock version of google-sans
Change-Id: I432d3d814c85b9ba20bbb7a88d2e52bd2337c10c
When using 3p launcher, this extra call needs to be
tracked in order to prevent returning-to the live
app instead of the launcher
Bug: 238328090
Test: atest Launcher3Tests
Change-Id: I9748da0475536373750efe9aecc7fb91b66dd61e
..used for signaling the launcher to crop the
remote animation target bounds when task animating on the taskbar.
If the task will show IME on the top means the animation taget would not
need to be cropped according to the taskBar insets, since visually the
taskbar is hidden when IME is visible.
Bug: 219981732
Test: manual as steps
0) enable taskbar with Settings > Developer options > Smallest width
as 600dp.
1) launch an app from all apps and show the IME by tapping the editor.
2) swipe out to home and launch it again by pressing the shortcut.
3) Verify the animating task preview with IME shown without being
cropped.
Change-Id: Iab526e78614c68626bd5424e0e3219044f671f4d
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
(cherry picked from commit c8b33ca43f)
Merged-In: Ia053aaec6987e00de980388a6c024d8bcf5203a2