In DeviceFoldStateProvider.kt, FOLD_UPDATE_FINISH_HALF_OPEN is emitted if the rotation changes while the animation is in progress.
This targets the case when the device goes to tabletop mode during the transition.
+ Using RotationChangeProvider to fix problems when the new orientation change was received in a background thread unexpectedly. This fixes: (1) wrong launcher icons movement after the rotation, and (2) wrong dark overlay scrim after rotation.
+ Minor formattig fixes by ktfmt
Bug: 241743859
Test: DeviceFoldStateProviderTest && NaturalRotationUnfoldProgressProviderTest && manual stress testing
Change-Id: I0ff6a823709e0891a7bcd13528a0e160d6f39c98
When in 'tabletop' or 'book' mode, allow the display to rotate
even if it is frozen. Then return to the previously locked rotation when
the device is unfolded.
Bug: 240146362
Test: locally tested + ran atest on DisplayRotationTests
Change-Id: I9869f5b070fecd7df70e08323dfacef8b883f470
Launcher was not properly giving the user an error message when an activity failed to launch from recents. Added a result code check.
Bug: 240373119
Test: Manually repro'd bug and checked logs
Change-Id: I12e299077b51b27c4e3f477a0a7440f0502fee39
This change cleans up the Clock interfaces a bit by seperating some of
the interface methods and passing darkness data in to each clock face
seperately.
Test: Manually checked existing clock on device. Some unit tests.
Bug: 229771520
Change-Id: I8fee1c6c9bfff3a970f8333c5d5c3940f797dc28
- Currently, the collection of binders to send to Launcher is inverted
and managed by OverviewProxyService which has to know about each
component directly (and a SysUI interface has to be created to support
this even if there are no other calls in SysUI to that component).
Instead, we should have each component register itself with the
ShellController for controllers which can be exposed to an external
process, and each product can customize which set of controllers it
needs to support.
- Add missing dump registration for ShellController
- Updating docs for creating remote callable controllers
Bug: 238217847
Test: atest WMShellUnitTests
Change-Id: Icd0ed33bdbd68b1dd9d782b9ba1f5b4a604479ba
Merged-In: Icd0ed33bdbd68b1dd9d782b9ba1f5b4a604479ba
The code was hardcoded to assume left/right translations, which went
in the wrong direction on unfold. Add an additional multiplier for
RTL.
Fixes: 241793140
Test: atest UnfoldConstantTranslateAnimatorTest
Change-Id: I535ab6e53bf15747e22dcab30d03e01156261158
- Remove some pip methods that aren't used from SysUI
- Migrate an old ISystemUIProxy pip call to IPip
Bug: 238217847
Test: atest WMShellUnitTests
Change-Id: Iab57329a9d79704b0e35fdb22a36594aa4368141
Desktop recents entry needs some extra information about a Task.
Add support to populate this
Bug: 244348395
Test: manual
Change-Id: If358ea63dff0725f312672f5c247147c1e3cb9f9
mSamplingRequestBounds was causing a race condition in RegionSamplingHelper because it becomes an empty Rectangle in the main thread when the background thread needs it to be non-empty for CompositionSamplingListener.register().To fix this, a final copy of mSamplingRequestBounds is passed to the background thread, so that it will always be working with a non-empty Rectangle.
Test: atest testCompositionSamplingListener_has_nonEmptyRect
Fixes: 247690841
Change-Id: Ib0139c8be80f828172e1909503dcf57a59673717
Moves Launcher's PreviewPositionHelper to shared
library between SystemUI and Launcher to reuse
it in the future in the partial screensharing
recents selector.
There should be no functional changes in the
code itself.
Bug: 240924926
Test: presubmit
Change-Id: I66c2b2ff68deb56394b52c07b98e36d23822025f
This enabled launcher to show all desktop apps when user clicks on the
desktop tile in recents.
This is only enabled when Desktop Mode feature flag is enabled.
Bug: 244348395
Test: atest DesktopModeControllerTest
Change-Id: I3c89ef01fd7d1f457a7afabda94b481711c0a350
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