Commit Graph

15 Commits

Author SHA1 Message Date
Steven Ng
84298b3998 Add a flag to enable custom local filter for recommended widgets
Test: Run WidgetsPredictionUpdateTaskTest
Bug: 186648032
Change-Id: I2bd5e2c81f971e0a40a4b05c8cab2a7adb171f96
2021-04-28 18:47:33 +01:00
Sunny Goyal
35c7b19fa8 Using WindowContext for listening to configuration changes
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
2021-04-22 00:23:02 -07:00
Vinit Nayak
84b3ee4f28 Iterate over all swipeable regions when calculating quickswitch gesture bounds
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
2021-04-09 17:31:15 +00:00
Sunny Goyal
f5c42ea6aa Adding some build rules in Launcher3
Bug: 182502086
Test: Presubmit
Change-Id: Ib2c18f1e252b3382030293fd3b873e840320301a
Merged-In: Ib2c18f1e252b3382030293fd3b873e840320301a
2021-03-18 01:26:36 +00:00
Steven Ng
3a8353256a Widgets recommendation backend
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
2021-03-08 23:37:51 +00:00
Himanshu Jaju
df256ae86b Add screen size to touch regions cache.
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
2021-02-08 18:23:32 +00:00
Sunny Goyal
1cd6a5f30e Fixing app-to-overview animation in 3 button mode
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
2020-11-09 15:52:29 -08:00
Sunny Goyal
84acb18dc2 Fixing robo test compilation
Change-Id: I1b1192f4cbf1ea1916f2ec4cd607743b3483250a
2020-10-23 10:35:35 -07:00
Sunny Goyal
fd58da6a75 Wrapping display properties in a wrapper class
This would allow us to support gestures on multiple-displays

Change-Id: I8f426bbdf04520f4189cadce2bde6aab4933c8d9
2020-08-12 13:43:56 -07:00
Raman Tenneti
ab98166c36 AOSP/Launcher3 - Update language to comply with Android's inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: make and Presubmit verify.

Change-Id: I44e903046dd4cd9c7c07872fc56a8d552eb09522
2020-08-04 00:35:03 +00:00
Sunny Goyal
fabfb3ae90 Using original taskInfo to create the taskKey instead of fake data
Change-Id: Ie4e35b35484e0f6cb939febe6357b37381d81682
2020-06-26 17:14:16 -07:00
Andy Wickham
4b531b972d Updates Assistant gesture regions when no longer tracking multiple.
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
2020-06-24 21:23:35 +00:00
Sunny Goyal
b64fc6c26f Fixing jump when swiping up in landscape and in waterfall cutout
> Adding tests for TaskViewSimulator to ensure proper calculations
> Disabling orientation listener while user is interacting with quickstep

Bug: 158781568
Bug: 156891776
Change-Id: I299c3b1243ac0dbf28faee1b8566c77ea3954e33
2020-06-18 00:29:00 -07:00
Sunny Goyal
302ecabf2c Fixing Fallback recents crashes when going to modal state
> Adding robo tests to prevent such regressions
Bug: 155570625

Change-Id: I5cfbfc454849116f881322e8785dfdbad6f24d08
2020-05-08 10:12:17 -07:00
Vinit Nayak
1901939be7 Modify input points to register in correct swipe touch regions
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
2020-03-02 15:28:38 -08:00