Commit Graph

3123 Commits

Author SHA1 Message Date
Sreyas 321bfae905 OverviewActions: Creating single view instance.
Makes use of there being a single instance of OverviewActionsView
rather than each Task having it's own.

Change-Id: I881121f84de99cade3cd8f07fa8510a557b28f57
2020-03-04 11:38:59 -08:00
TreeHugger Robot 9f30165b8c Merge "Set default launcher orientation to portrait" into ub-launcher3-master 2020-03-04 01:43:30 +00:00
Vinit Nayak 5fcf061cb9 Set default launcher orientation to portrait
Also stop OrientationTouchTransformer from
spamming logs
b/150214193 should track properly handling
this in the future

Fixes: 146176182
Test: New vertical layout showed up when
swiping to Overview w/ landscape app.
Works for both autorotate on and off.

Change-Id: I3707cf7b5693be0fcf4d63491901f4ec00793f4f
2020-03-03 16:54:08 -08:00
Andy Wickham a9673f4b5c Adds option to launch Gesture Sandbox from dev settings.
This is set to have the same task affinity as Launcher
so that it inherits the ability to ignore system gestures.

Bug: 148542211
Change-Id: I29bc5599dea61c44be721dcc0bec7bc494c415c4
2020-03-04 00:47:38 +00:00
TreeHugger Robot 0f0a53a35f Merge "Enable support for same page hotseat migration" into ub-launcher3-master 2020-03-04 00:26:20 +00:00
Vinit Nayak f9328198e1 Rotate touch events for land/seascape navbars
Previous change removed checking for navbar
location to transpose touch event.

fixes: 150700927
Test: Quickstep TAPL test passes.
Change-Id: I47683f8a75f24c8bfc46437e0eef9172c23cc452
2020-03-03 15:03:04 -08:00
Tony Wickham 294238a2fa Dump GestureState and created overview activity
Bug: 150525635
Change-Id: I6f5bf0f9c917845b6e880323dbba99552a9c43ba
2020-03-02 22:08:31 -08:00
TreeHugger Robot 5dc6060c84 Merge "Fixing activity referred after destroying by PinnedStackAnimationListener" into ub-launcher3-master 2020-03-03 04:04:09 +00:00
Jon Miranda 7edcd7803f Makes spring variable dynamic resources so that they can be changed via plugin
Bug: 147302669
Change-Id: Ia4e74ff46a4d8338a56ea75ed826b69102c42d93
2020-03-02 18:48:23 -08:00
vadimt c4c16e7aeb Fixing activity referred after destroying by PinnedStackAnimationListener
This is perhaps not a leak, but it conflicts with how StrictMode
activity leak detection works.

Bug: 139137636
Change-Id: If7fd0361b8e5ff81a2c0adb2308793ff87349951
2020-03-02 18:44:24 -08:00
Vinit Nayak acaf0749b3 Adjust target and src rects for swipe to home animation
Floating icon animation runs entirely in portrait
since that's what orienation launcher starts in.
Current app window target rects are in landscape to
be able animate to Overview correctly (which is not
in portrait since the leash from WM is in the same
orientation as that of foreground app).
Invert that rect as the animation from app window
to floating icon progresses.

Fixes: 148528795
Change-Id: Ie1149a1a8904afc80bd1986f8d67b6f2d88c49f2
2020-03-02 18:02:52 -08:00
Vinit Nayak a406f727ad Add vertical layout support for Overview in portrait
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.

PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.

The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]

Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
2020-03-02 18:02:35 -08: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
Hongwei Wang d7ac763b98 Merge "Indicate PiP animation type from Launcher to SysUI" into ub-launcher3-master 2020-03-02 23:10:28 +00:00
Vadim Tryshev d4fb87e265 Merge "Disabling failing test" into ub-launcher3-master 2020-03-02 21:39:58 +00:00
vadimt c8bae0ab71 Disabling failing test
Change-Id: I5989ce406c66834b77ff4bd073cd3ad92df9fda2
2020-03-02 13:35:55 -08:00
Becky Qiu ae28b5e251 Merge "Revert "Revert "[Overview Actions] Disable swiping for TaskView if it's in select mode.""" into ub-launcher3-master 2020-02-28 23:34:46 +00:00
Vadim Tryshev d8995a6fda Merge "Revert "TAPL: Verifying activity start/stop events"" into ub-launcher3-master 2020-02-28 22:29:47 +00:00
Vadim Tryshev 3dd64ca3a8 Revert "TAPL: Verifying activity start/stop events"
This reverts commit 1186700c9a.

Reason for revert: Fails in the lab

Change-Id: I6715a058c76d96752b904331968b46a07ce93f85
2020-02-28 22:28:16 +00:00
Becky Qiu 5667f6fbd3 Revert "Revert "[Overview Actions] Disable swiping for TaskView if it's in select mode.""
This reverts commit 7ff297a81f.

Reason for revert: Verified this was not the cl broke post submit.

Change-Id: Id992c6937a4230b945436ddb868204366ffd045e
2020-02-28 14:13:36 -08:00
Zak Cohen 23ceafe3d5 Merge "TAPL tests - make all apps in overview checks less fragile." into ub-launcher3-master 2020-02-28 21:21:36 +00:00
Zak Cohen dc24231e4f TAPL tests - make all apps in overview checks less fragile.
Tests that check for all apps in overview mode were only checking for
actions being enabled. This isn't sufficient logic, two button mode also
uses all apps.

Centralize the check for all apps.

Test: local tapl tests
Change-Id: If1bf98019e6f1aea8f7967883aba6780743e9d6b
2020-02-28 11:59:33 -08:00
Vadim Tryshev 64a932ed2a Merge "TAPL: Verifying activity start/stop events" into ub-launcher3-master 2020-02-28 19:22:32 +00:00
Becky Qiu 7ff297a81f Revert "[Overview Actions] Disable swiping for TaskView if it's in select mode."
This reverts commit 0499fb2060.

Reason for revert: This might break the post submit test. See b/150401176

Change-Id: Iafc420fff72de8e83ce5e325fc1e5b1a1efe7350
2020-02-28 01:52:58 +00:00
Hongwei Wang b08f2d7222 Indicate PiP animation type from Launcher to SysUI
Also, need callback from SysUI to Launcher once the pip animation is
started to keep back compatibility.

Bug: 146594635
Test: manually
Merged-In: I617a17fd5f6049d9f1d49f9f834623a2bb49f6ca
Change-Id: I617a17fd5f6049d9f1d49f9f834623a2bb49f6ca
(cherry picked from commit a1a91b0c50)
2020-02-27 17:15:18 -08:00
Samuel Fufa a421143dd7 Enable support for same page hotseat migration
Bug: 142753423
Test: Manual
Change-Id: Ib53a64629a595c412e30ca5ff46077efc73a3f3e
2020-02-27 13:47:03 -08:00
Zak Cohen eecb258cc7 Merge changes from topic "enable" into ub-launcher3-master
* changes:
  Overview Actions - Enable by default.
  TAPL test update - don't run all apps in overview tests with actions.
2020-02-27 19:48:51 +00:00
TreeHugger Robot 3ba6800552 Merge "Using StrictMode to detect activity leaks" into ub-launcher3-master 2020-02-27 19:19:14 +00:00
vadimt 1186700c9a TAPL: Verifying activity start/stop events
It also turned out that Pilfer event seems to come in a
non-deterministic order relative to the events from the Main and TIS
sequences. So I moved it to its own sequence.

Change-Id: I5851aafb6d04398c5727712eaf8561916a30c4c5
2020-02-27 11:12:35 -08:00
Becky Qiu b5565fb62f Merge "[Overview Actions] Disable swiping for TaskView if it's in select mode." into ub-launcher3-master 2020-02-27 18:48:09 +00:00
Zak Cohen de9823243a Merge "Make RectFSpringAnim resilient to negative height starting rect." into ub-launcher3-master 2020-02-26 21:25:36 +00:00
Zak Cohen f2a15f1be5 Make RectFSpringAnim resilient to negative height starting rect.
Test: ran tapl tests, failed before, passed after
Change-Id: I10b82dd348b5c12550e60b145c76dad542aa56e8
2020-02-26 10:53:53 -08:00
TreeHugger Robot 5991eb8337 Merge changes from topic "new-task-snapshots-ub-launcher3-master" into ub-launcher3-master
* changes:
  Toggle loading state based on config_lowResTaskSnapshotScale
  Add config to enable snapshot preloading
2020-02-26 17:42:40 +00:00
Becky Qiu 0499fb2060 [Overview Actions] Disable swiping for TaskView if it's in select mode.
This including swiping up to dismiss, down to launch app, left and right to switch apps.

Test: local
Bug: 139828243
Change-Id: Ib588c8725fb765097d03a5def719abdffd603708
2020-02-25 17:16:48 -08:00
Evan Rosky e7e91fd60e Connect split-screen things to systemui divider
Since divider stuff lives in sysui instead of framework

Bug: 133381284
Test: Manual, open 2 apps in split and drag-up to show
      recents.
Change-Id: If6740b7ee4829bf4cac6e829e81943f16a41f977
(cherry picked from commit 3ef159becd)
2020-02-25 23:42:42 +00:00
Zak Cohen fe935dfbc1 TAPL test update - don't run all apps in overview tests with actions.
Overview actions removes the all apps from overview. Don't run the tests
that depend on these.
Ultimately need to add more tests for the actions.

Test: tapl local
Change-Id: I2471d10af7bc03a40a94f99aa16354b85bdb3ad7
2020-02-25 15:09:12 -08:00
vadimt 1779a38290 Using StrictMode to detect activity leaks
Change-Id: I615f641897d57be0cd31be944796c6931ef9ab00
2020-02-25 14:46:27 -08:00
TreeHugger Robot d71c3b185d Merge "Setting interpolator beforehand, instead of overriding it after the pending animaiton is created" into ub-launcher3-master 2020-02-25 18:23:19 +00:00
vadimt b79614cc93 Performing a check for a crashed Launcher process for each UI test 2020-02-25 02:28:32 +00:00
Sunny Goyal 93c4de7413 Setting interpolator beforehand, instead of overriding it after the pending
animaiton is created

Change-Id: I7caec2eeb86084591fa627518d064b7ebb895d65
2020-02-24 16:45:11 -08:00
Sunny Goyal d2c56525bb Merge "Using LeastSquaresVelocityTrackerStrategy for calculating velocity when detecting motion pause events. This is the same logic used by the platform implementation VelocityTracker" into ub-launcher3-master 2020-02-24 18:30:13 +00:00
Sreyas Rangaraju bc50563915 Merge "OverviewActions: Creating parent view to house RecentsView and Overview Actions." into ub-launcher3-master 2020-02-22 01:11:47 +00:00
Tony Wickham 3310b76a27 Merge "Remove mSourceWindowClipInsetsForLiveTile" into ub-launcher3-master 2020-02-22 00:34:09 +00:00
Sreyas a241df66df OverviewActions: Creating parent view to house RecentsView and Overview Actions.
Creating RecentsViewHolder to be contain LauncherRecentsView in OverviewPanel so Overview Actions View can be created only once.

Change-Id: I111f88903d2ff80275cc2e07b761577260073c17
2020-02-21 16:14:51 -08:00
Peter Kalauskas 5bb63c916e Toggle loading state based on config_lowResTaskSnapshotScale
Change high res loading state implementation to toggle on/off based on
config_lowResTaskSnapshotScale!=0 instead of ro.config.low_ram=true

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148099851
Change-Id: I316e553a8a13fe38f1224c38f7aa717a0f628f57
2020-02-21 23:36:58 +00:00
Peter Kalauskas 03c8f296cd Add config to enable snapshot preloading
Enable preloading if config_enableTaskSnapshotPreloading instead of
assuming it should be off for all low ram devices. This allows it to be
configured via an overlay.

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148099851
Change-Id: I9e3320dcff5b710e110cc7199c41c5a004991592
2020-02-21 23:35:37 +00:00
Sunny Goyal a173193afa Using LeastSquaresVelocityTrackerStrategy for calculating velocity
when detecting motion pause events. This is the same logic used by
the platform implementation VelocityTracker

Bug: 139750033
Change-Id: I87aabd46e58a5caa1395be3a63fd38d0ee75e355
2020-02-21 15:28:06 -08:00
Tony Wickham f1030cf564 Merge changes Ie48f4b66,Ia48f4453 into ub-launcher3-master
* changes:
  Always update clip rect before applying surface params
  Clean up AppWindowAnimationHelper and TransformParams
2020-02-20 22:53:10 +00:00
Tony Wickham a754374c30 Remove mSourceWindowClipInsetsForLiveTile
It seems that the only time it is used, it is the same as
mSourceWindowClipInsets anyway.

Bug: 149870691
Change-Id: I3b1a5a47a0d49cdd6eb8a3271ca24da6c17109cb
2020-02-20 14:08:07 -08:00
Tony Wickham d1d342b1c7 Always update clip rect before applying surface params
Previously, we were only updating the clip rect when params.currentRect
== null, meaning the clip would be stale once the caller started
providing its own rect (e.g. when swiping to home).

Also fix some visual jumps when swiping home, all caused by running the
transform progress from 0 to 1 instead of starting at whatever the
progress was before ending the gesture, e.g.:
- When swiping to home without animating into an icon, the corner radius
  was set back to the window corner radius.
- Before this change, the clip didn't update throughout the animation,
  making the window slightly bigger than the floating icon view; after
  this change, the clip jumped to show the insets again before clipping
  back down during the home animation.

Bug: 149870691
Change-Id: Ie48f4b665a5bf3cbef76bdf7f043febe99fb84a0
2020-02-20 14:07:09 -08:00