Commit Graph

6741 Commits

Author SHA1 Message Date
Sreyas e7dd35ef0d OverviewActions: Renaming overview_actions_container and setActionsView
Change-Id: Ie444101f246e0d00980b47ce39f6e74dade23f73
2020-03-06 10:50:43 -08:00
Vadim Tryshev 9099dfcfb7 Merge "Test tweaks for the memory activity recreation test" into ub-launcher3-master 2020-03-06 18:36:05 +00:00
Winson Chung ca755c3846 Fallback to predefined orientation handler if recents view isn't available
Bug: 146176182
Test: Swipe up with 3p launcher to home
Change-Id: Iaed42fb9ef598d65e1cf2d166cc343f888352d47
(cherry picked from commit e90adc47ef)
2020-03-06 17:36:05 +00:00
Winson Chung e90adc47ef Fallback to predefined orientation handler if recents view isn't available
Change-Id: Iaed42fb9ef598d65e1cf2d166cc343f888352d47
2020-03-06 00:01:49 -08:00
Vinit Nayak 8f03c5c1ce Merging from ub-launcher3-master @ build 6269120
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_rvc-dev_6269120.html
Change-Id: I17d430abf3804e30d5d76628c2a4e693d4f1d700
2020-03-06 03:50:15 +00:00
TreeHugger Robot 93648b0a5a Merge "Move getRotationHelper() call to LauncherRecentsView" into ub-launcher3-master 2020-03-06 01:11:10 +00:00
Vinit Nayak a6fb77f1b5 Move getRotationHelper() call to LauncherRecentsView
3P launchers were causing a ClassCastException so
moved it down to Launcher specific code.
3P as a whole will have to be handled better with the
new rotation paradigm so this will be addressed then.

Fixes: 146176182
Test: Set Nova Launcher as default home app
Swiped up to recents, nothing breaks.

Change-Id: I91a267f3a29bd5b9638bc9b69d864ac2de3f3d72
2020-03-05 16:19:26 -08:00
Matt Casey cc6caff02f Merge "Let launcher to provide its own OverscrollPlugin" into ub-launcher3-master 2020-03-05 22:18:05 +00:00
TreeHugger Robot d26618acba Merge "Enabling testQuickSwitchFromApp after causes of flakiness were fixed" into ub-launcher3-master 2020-03-05 18:56:07 +00:00
Matt Casey 0318a652c1 Let launcher to provide its own OverscrollPlugin
If the local OverscrollPlugin provided by the activity is non-null and
FORCE_LOCAL_OVERSCROLL_PLUGIN is true, the local plugin object overrides
the loaded actual plugin.

Test: Manual testing flipping the flag and observing which plugin is
activated.
Bug: 150245271

Change-Id: I0cd5184628c2cb572b5e1c56d6a008dcaa8807fb
2020-03-05 13:54:45 -05:00
TreeHugger Robot 51e71c70cd Merge "Fixing unregistering mOtherHomeAppUpdateReceiver twice" into ub-launcher3-master 2020-03-05 18:29:24 +00:00
TreeHugger Robot 38f68a1479 Merge "Disabling testToast on virtual devices" into ub-launcher3-master 2020-03-05 03:44:24 +00:00
TreeHugger Robot 0d0dd812f6 Merge "Update pullback start and max progress based on RecentsView scale" into ub-launcher3-master 2020-03-05 03:06:38 +00:00
vadimt f6385576d5 Disabling testToast on virtual devices
Bug: 150303529
Change-Id: Ie523b79468f37e9edbd50f77db4d358e6713a463
2020-03-04 18:49:52 -08:00
Tony Wickham 34e88d0999 Update pullback start and max progress based on RecentsView scale
Instead of having defined constants that are hard to tune, now we
calculate the factors at runtime based on the launcher animation scale.
This ensures the pullback always has reasonable values regardless of
orientation, feature flags, etc.

Bug: 149934536
Change-Id: If07e3b87475f8f9613e94df00c394430aad7d507
2020-03-04 18:20:52 -08:00
Riddle Hsu 7a7468fd39 Invalidate snapshot of home if its UI is changed
Snapshot may be enabled for home task when turning off
screen. If home UI has changed after screen off, the
snapshot should not be used to avoid ugly visual effect.

Bug: 140811348
Test: Lock/unlock device while home is on top with 4 cases:
      1. All apps is shown.
      2. Overview is shown.
      3. Options menu is shown.
      4. Quick search bar is active.
      The expected result should be no starting window
      when unlocking because the snapshot is dropped.

Change-Id: I4bd9926b6f9332ac16b1b3a25ffdd44706015a33
(cherry picked from commit 0ae61c8d29)
2020-03-05 01:39:18 +00:00
vadimt 04b90c0fcb Test tweaks for the memory activity recreation test
Speeding up switching navigation mode by switching from latch
(which is not fired) to polling. I'll figure out later why the latch
doesn't work.

Bug: 139137636
Change-Id: I28a9b2b9a3882919fd2a3280b9804afe1b44a46e
2020-03-04 17:36:29 -08:00
Winson Chung 67457275e0 Merge "Register/unregister all apps system action with accessibility" into ub-launcher3-master 2020-03-05 01:24:03 +00:00
Hongming Jin d91cb6e75f Register/unregister all apps system action with accessibility
Bug: 136286274
Change-Id: Ia43d30b7cf078f56cc9887c8b3fb31924ad2b1b0
2020-03-04 16:24:05 -08:00
Sreyas Rangaraju 75f7e649c0 Merge "OverviewActions: Creating single view instance. Makes use of there being a single instance of OverviewActionsView rather than each Task having it's own." into ub-launcher3-master 2020-03-04 22:40:35 +00:00
Jon Miranda 1a3047666a Add more swipe up to home/spring variables as dynamic resources.
Bug: 147302669
Change-Id: I7a13f1eac8324d963302f5f42793478896f10097
2020-03-04 12:52:02 -08:00
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
vadimt 99f8a99463 Enabling testQuickSwitchFromApp after causes of flakiness were fixed
Bug: 143285809
Change-Id: Ie0c20bfdb04276adf349e90bf6826c89e9fbb5e3
2020-03-04 10:52:22 -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
Sunny Goyal 424e7fdf6b Fixing unregistering mOtherHomeAppUpdateReceiver twice
mUpdateRegisteredPackage was not cleared when unregistering
mOtherHomeAppUpdateReceiver

Bug: 150543327
Change-Id: I1058c0262588cbeb1d6c61299cb4d4c38d622d98
2020-03-02 13:33:43 -08:00
Mehdi Alizadeh 3210c06687 Merging from ub-launcher3-master @ build 6248758
Test: manual, presubmit on the source branch
http: //x20/teams/android-launcher/merge/ub-launcher3-master_6248758.html
Change-Id: I1c64ab220493793ba10cbbecf38a4df8381d8a54
Bug: 150504032
2020-02-29 01:52:25 +00: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