Pre-S: Continue to use config-changed broadcast for configuration changes
and display-changed event for rotation changes
S+: Use WindowContext#componentCallbacks for config and rotation changes, and
continue to use display listener for frame-rate changes
Bug: 179308296
Test: Manual and presubmit
Change-Id: I533e69068b5fa6c052a02759ef309dd075ee6a4b
Previously when creating a new CurrentDisplay, we would
never get the correct OrientationRectF from the hashmap
because the size field of CurrentDisplay would be incorrect
for a given rotation.
Ex. Rotation 0 and Rotation 1 would have inverted display sizes
Thus hashcode would return different values and we would only
ever see if a point is contained in the current rotation's
OrientationRectF.
Bug: 183897242
Test: Tested swiping from portrait to landscape app, was
able to swipe continuously
Change-Id: I6de625389956f55cfc2142dcb7aeef2e90c157ac
Add a widgets recommendation mechanism based on AiAI app predication
ranking with the following changes:
1. Only one widget is picked from one app.
2. Widgets that are already added to the workspace are excluded from
the recommendation.
Test: run PredicationUpdateTaskTest
Bug: 179797520
Change-Id: Ia697bc6df0bae75969e68b7b3de32d57901f7461
The general design for foldable devices contains a smaller screen and a
larger screen. Hence we need to move from caching based on rotation to
caching based on {display size, rotation} tuple.
Test: Manual on fold2
Bug: 172240450
Change-Id: I445a7545e684134d7d880f957bb97ff847b726b7
Instead of copying orientation state information from RecentsView
to taskViewSimulator, using the same state object, so that new
properties (like RecentsRotation and flags) are automatically covered
Bug: 162881482
Change-Id: I02d0a710a6ecc4a3cebd0fcc4c49032127df1ce3
This should prevent states where Assistant triggers from
the vertical-center of the screen in portrait (see bug).
Also fleshes out OrientationTouchTransformerTests and
adds some new ones that fail without this change:
- enableMultipleRegions_assistantTriggersInMostRecent
- enableMultipleRegions_assistantTriggersInCurrentOrientationAfterDisable
Fixes: 158686674
Change-Id: I6d045a485f62e4010e9e3d00805a50fdd953a2fc
> Adding tests for TaskViewSimulator to ensure proper calculations
> Disabling orientation listener while user is interacting with quickstep
Bug: 158781568
Bug: 156891776
Change-Id: I299c3b1243ac0dbf28faee1b8566c77ea3954e33
While the recents task list is frozen, launcher
will continue to listen for touch regions in
all orientations of apps it has seen while frozen.
Ex. Start w/ portrait app, then quick switch to
90-deg landscape app, touches in the navbars of both
those orientations will be treated as valid.
Once the task list unfreezes, only the orientation
that is currently displayed will have a valid navbar
touch region
fixes: 140116135
Test: tested manually in all 4 orientations with
quickswitch, swipe to recents and swipe to home
Attempted to write unit tests, but only basic ones
since there are some limitations on the MotionEvent
API for mocking
Change-Id: I8d3751571a939497b44e0dd249a0248299ba5ceb