Commit Graph

65 Commits

Author SHA1 Message Date
Tony Wickham
eccf070bae Change TAPL to swipe to stash taskbar (instead of deprecated long press)
This also means Taskbar is transient by default in automated tests,
instead of persistent. Updated some checks accordingly.

Flag: LEGACY ENABLE_TRANSIENT_TASKBAR ENABLED
Test: TaskbarExpandCollapse#hideShowTaskbar; TaplTestsTaskbar;
TaplTestsTransientTaskbar; TaplTestsPersistentTaskbar
Bug: 270395798

Change-Id: Ib6e592a31a55a912a7ea991a421a9c60bca51c80
2023-11-01 23:16:10 +00:00
Jon Miranda
9c478b6c29 Add taskbarIconSize to GridOption/DisplayOptions
- Renamed variables to make it more clear what they represent
- DeviceProfile will be source of truth for taskbar
  sizes

Bug: 265144213
Test: phone, multi-display, tablet
Change-Id: Id9c19d15a65894fd7645e0f876a4b6527b713c34
Flag: ENABLE_TRANSIENT_TASKBAR=true
2023-03-24 12:29:11 -07:00
Tony Wickham
c73db73a79 Handle swipe down on taskbar to stash
- Moved all touch-to-stash logic to new TaskbarStashViaTouchController
  (handles both tap outside to stash instantly as well as swipe down
  inside to stash after letting go)
- This is a TouchController on TaskbarDragLayer, so it intercepts
  touches from TaskbarView before icons can be dragged during swipe down

Test: swipe up to invoke transient taskbar in an app, swipe down or
touch outside to stash
Flag: ENABLE_TRANSIENT_TASKBAR=true
Fixes: 246631710

Change-Id: I5cf64848bba34ad32fcc80a93fb4f79ebd2c10a7
2023-03-23 15:13:52 +00:00
Sebastián Franco
a4798b5687 Merge "Revert "Prevent double touch inputs in the BaseDragLayer"" into tm-qpr-dev 2022-10-26 16:42:12 +00:00
Sebastián Franco
7d4176bf73 Revert "Prevent double touch inputs in the BaseDragLayer"
This reverts commit 68fc44ffad.

Reason for revert: Wrong handling of events

Change-Id: Ic34916123ed6c4ba33f629549dda2cdbc890b413
2022-10-25 22:35:34 +00:00
Sunny Goyal
d859060860 Merging MultiValueAlpha with MultiPropertyFactory
Bug: 246644619
Test: Presubmi
Change-Id: Id5abc5f3169544656f1139ae17ca59e34ac65dac
2022-10-24 14:38:18 -07:00
Sebastian Franco
68fc44ffad Prevent double touch inputs in the BaseDragLayer
If you hold a long press and while pressing you start another
long press again with another finger, then a new onLongPress event
will trigger and in some cases we are not processing that case.

By ignoring the evetns with the flag ACTION_OUTSIDE we can prevent
such cases.

Fix: 247477725
Test: ReorderWidgets
Change-Id: I31833bc54db2771809562bd1f92c8523eb2f05ab
2022-10-11 09:54:46 -05:00
Thales Lima
f0c633bc48 Take account of IME insets
Fix: 233159032
Test: manual
Change-Id: I2a23c13f7b2bcd8b0c758140dd1fdd5bb800f3f1
2022-07-07 11:57:04 +01:00
Vinit Nayak
2cb5cb5d00 Report ITYPE_BOTTOM_MANDATORY_GESTURES insets for Taskbar
Bug: 205493938
Change-Id: I196bc52c1bec75b5442f3546f466799ba9c3831b
2022-05-16 21:38:28 -07:00
Andras Kloczl
0056e95d8e Change home dragging logic for dead zones
- If a dragged item is not over a valid drop target
then we don't highlight anything and on drop we move
it back to its original position.
- Instead of checking if the dragged item is over the
hotseat view, now we check if the item is over the hotseat
shortcuts.
- Smartspace is a dead zone

Test: drag items from different workspaces, allapps, widget
  picker etc. to all parts of the screen and verify which
  view is targeted and where the item gets dropped.
  Check on phone/foldable/tablet.
Bug: 228201267
Change-Id: I18de576ea300d58ae645e511b238e0b946b5595a
2022-04-26 16:28:11 +01:00
Sunny Goyal
6bc4257d86 Separating refresh rate tracking to a separate class
Bug: 221961069
Test: Presubmit
Change-Id: I04091ebc9f3d88d2dbbde1bf0d5390c815e026d1
2022-02-28 17:13:00 -08:00
Sunny Goyal
1721ccf385 Simplifying the drop animation code
> Removing some unused parameters

Bug: 190524398
Test: Manual
Change-Id: Iea0c2e7a9d30a10fd7443ea57992c59ea60badf8
2021-06-08 14:43:57 -07:00
Sunny Goyal
4ed0fb5074 Removing dependency on wallpaper colors and using theme resources
Bug: 184676715
Test: Manual
Change-Id: Ie9a9a784c4a8a8cd484bfd8ea463deedcd4deed6
2021-04-27 16:29:08 -07:00
Tony Wickham
7ba547cd2d Folder support in Taskbar
- Add TaskbarActivityContext which allows shared Launcher elements to
  "just work" using existing generic ActivityContext.
- TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>.
- Inflate FolderIcon and Folder using TaskbarActivityContext to be
  shown in TaskbarContainerView.
- Use TaskbarActivityContext's DeviceProfile to determine icon size
  instead of overriding in styles. This also ensures that normal
  BubbleTextView icons have the same size as FolderIcons.

Test: Place a folder in home screen hotseat, ensure it shows up in
taskbar and can be opened, and that apps inside it can be launched
or dragged.
Bug: 171917176

Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
2021-02-16 15:07:01 -08:00
Sunny Goyal
a4647b681f Adding support for keyboard based drag and drop
For keyboard DnD, we use Accessible DnD implementation.
A placeholder FloatingView draws the focus indicator
for the virtual views

Test: Visible
Bug: 178781566
Change-Id: I632fc7377dffa1e05e3f0a9c3ad18641deb5a1a4
2021-02-05 13:05:24 -08:00
vadimt
c610f26404 Removing unused tracing
Test: presubmit
Bug: 139891609
Change-Id: I30b432d329d6606b3d955409c167bddbacce8a37
2020-12-11 19:43:49 -08: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
TreeHugger Robot
44b72984e6 Merge "Removing diags for a fixed flake" into ub-launcher3-master 2020-07-20 20:27:09 +00:00
vadimt
665232be61 Removing diags for a fixed flake
Bug: 160238801
Change-Id: Ia166eb1f154ddeeb70da5a141c9e985a265ba49a
2020-07-20 12:24:50 -07:00
Sunny Goyal
5d09b2e358 Updating some comments and variables
Change-Id: Ib3223c66e9ce187cebc6ce26a46b228f95787778
2020-07-17 18:58:49 +00:00
vadimt
1af70f2729 Add logging for non-sending "end scrolled" event for Widgets
Bug: 160238801
Change-Id: I60a1cb689110c5b22b0a145b3cca7d47d867005e
2020-06-30 12:36:09 -07:00
Sunny Goyal
b10e865e48 Preventing parallel motion event dispatching from view system and event proxy
1) When view system is already dispatching an event, proxy-dispatch is restricted
   to gesture only and follow the gesture dispatching rule.
2) If a full-proxy-dispatch is going on, and view-dispatch comes in, view-dispatch
   takes over and proxy-dispatch is cancelled.
3) During gesture-only proxy dispatch, if view-dispatch already started a gesture,
   proxy dispatch is ignored. Otherwise view-dispatch is restricted to non-gesture
   dispatching only (and proxy-dispatch is already restricted to gesture only).

Bug: 158130948
Change-Id: Ied351663e16beda5acf49a52bdefea881c18b9cf
2020-06-15 11:50:54 -07:00
vadimt
34cc5f45d0 Allowing ListenerView intercept events in system areas
See the discussion in thje bug

Bug: 156044202
Change-Id: I68b3826602250ef163b96be95d80b98691456443
2020-06-04 13:39:25 -07:00
Jon Miranda
10a6ed86eb More logging for pause non-detection
Bug: 156044202
Change-Id: I68d6febf4c201c2fea41c7e24600dcc2c54a680a
2020-06-01 09:39:13 -07:00
vadimt
822efc9e82 Remove tracing for widgets scroll bug
Bug: 152354290
Change-Id: Iff56460f3f673f7089d647d08bb621c3965c7444
2020-04-17 19:04:41 -07:00
vadimt
8e981a74c3 Tracing widgets page events propagation to catch flake
Bug: 152354290
Change-Id: Ia2c9e0ade8f2777e085381d10e8461f97e76de7d
2020-03-31 14:50:45 -07:00
Tony Wickham
d6f917f182 Support blacklisting live wallpapers from showing sysui scrims
Add wallpaper changed broadcast receiver to BaseDragLayer, which
checks if the new wallpaper is blacklisted and relays that to
remove the scrims.

Bug: 150144115
Change-Id: I55b7b98fdd419cd76532492461a872367efed67b
2020-03-19 16:32:33 -07:00
Sunny Goyal
4e82f5bc36 Fixing crash when swiping up using 3P Launcher
Change-Id: Ia181edc1a00136374b3f0d848beccf0c9acd7b5c
2020-03-12 12:32:40 -07:00
vadimt
dbc7583054 Remove unnecessary PilferPointer events and enable testPressHomeOnAllAppsContextMenu
Change-Id: I04199f46024b05f05d04ba2be7a797842bb48527
2020-02-25 18:17:04 -08:00
vadimt
675c877765 Removing tracing for a fixed flake
Presumably, the flake was fixed when I added waiting for model load
before the test body starts.

Bug: 138729456
Change-Id: Ie921ebd40e42a7d73884c19949ca5f0129afc96e
2020-01-06 18:35:37 -08:00
Andy Wickham
d386d7da7c Forces OveriewInputConsumer to be used when Assistant is running on top of Launcher.
Previously it was using OtherActivityInputConsumer, which got things in a
pretty weird state (e.g. most recent app would appear in the center as if
it was the active app when you started Quick Switching, etc.).

By default (toggleable by a feature flag), OverviewWithoutFocusInputConsumer
is used because Assistant doesn't seem to respect the CLOSE_SYSTEM_DIALOGS
broadcast, at least in half-shelf mode. In this case, the Home intent is
sent on swipe up, or you can dismiss it with the back gesture or by tapping
above the half shelf.

The new feature flag ASSISTANT_GIVES_LAUNCHER_FOCUS routes touches through
OverviewInputConsumer. As opposed to OverviewWithoutFocusInputConsumer,
this allows Quick Step to work while Assistant is running. Additional logic
is added to dismiss the Assistant when appropriate. Note that the dismissal
happens atomically, so it's not completely fluid with the other animations.
As mentioned above, this is disabled by default because Assistant doesn't
currently respect CLOSE_SYSTEM_DIALOGS.

Demo with the flag enabled (and Assistant respecting CLOSE_SYSTEM_DIALOGS):
https://drive.google.com/open?id=1W5jGpn_TEC-KjrYwQtaBT3pzxG_5tC4W

Bug: 139661510
Change-Id: I261653118aff289b329ec2a7ca6e52f100f7835a
Tested: Manually used quick switch after invoking Assistant from home screen.
2019-10-29 14:25:29 -07:00
Winson Chung
478414a7c3 Merge changes I4532e429,I532645de into ub-launcher3-qt-future-dev
* changes:
  Defer listening on widget host until after the state transition ends
  Migrate to using DefaultDisplay
2019-09-09 21:39:18 +00:00
Winson Chung
ef52876739 Defer listening on widget host until after the state transition ends
Bug: 140246642
Change-Id: I4532e4298f04ff5c6dea04ccda89320995cadb80
2019-09-09 10:24:53 -07:00
vadimt
30618db33f Add tracing for non-dragging icon
Bug: 138729456
Change-Id: Ib18f1544f2520509bd982f032bf3ed0c72ca9529
2019-09-05 14:08:39 -07:00
Sunny Goyal
4e6c45bcd3 Using the first frame delay based on the display refresh rate instead of
hardcoding it to 16ms

> Creating a utility class for caching display property changes

Bug: 128940249
Change-Id: I6f9a214548de65bd1c8530508d665ee88312da4a
2019-07-24 10:12:37 -07:00
Tony Wickham
b6841ac630 Revert the changes that prevented touch on RecentsView during animation
The original bug that was solving seems to be fixed by other changes,
and this allows users to scroll, dismiss, etc on recent tasks before
fully reaching overview from an app.

Bug: 137487381
Change-Id: I28a708811bba3ce739ce261f19eb29558d8f0e7d
2019-07-22 12:39:59 -07:00
Tony Wickham
6670435c14 Merge "Allow TouchControllers to override shouldDisableGestures" into ub-launcher3-qt-r1-dev 2019-07-18 22:27:54 +00:00
Tony Wickham
f33b6d4378 Allow TouchControllers to override shouldDisableGestures
Currently only StatusBarTouchController overrides this to always return
false, so that you can swipe down for notifications during transition to
home screen from an app (in gesture nav).

Bug: 137161198
Change-Id: I803c37937d5294810cbe0c1bbffcd5dddcc5ca3b
2019-07-18 15:10:21 -07:00
vadimt
7a4ed2f258 Removing tracing for fixed bugs
Bug: 133009122
Bug: 133765434
Bug: 134532571
Change-Id: I37aa1851a1bc0874c0b9acf561bde28966e9b523
2019-07-15 18:48:06 -07:00
vadimt
1fd52d9024 Remove tracing for a fixed bug
Bug: 132900132
Change-Id: Ic4ce3669f88c932e392b7517ec9fda11384dc334
2019-07-11 16:00:12 -07:00
vadimt
2af71dd058 Removing tracing for a fixed bug.
Bug: 133867119
Change-Id: I796118f5ff0c27db002bb0e3369e651c95b06bbe
2019-07-11 20:18:32 +00:00
Jon Miranda
826cdcd32f Fix bug where icon is no present during app close animation.
* WindowTransformSwipeHandler closes all AbstractFloatingViews, including
  ListenerView, which results in FloatingIconView getting removed.
* In IconLoadResult.onIconLoaded, we remove the check for isIconLoaded since
  its not needed. This was also causing a race condition since isIconLoaded
  is not set to true until after we tell onIconLoaded to run.
* In BaseDragLayer, we have a delay before checking if the view is open and
  then closing the floating view if true. This caused issues since we reycle
  the view. Now we check if the view is open before running the delay to call
  close.

Bug: 136044361
Change-Id: I7442a589a62c3cdf90b70d146e0ecf3e4300ddf7
2019-07-02 14:35:11 -07:00
vadimt
73ed3e432c Adding tracing for a bug about missing input events
Bug: 136215685
Change-Id: I1e735c1e787710ae37b7c7d1a6a06498edd7c525
2019-06-27 19:03:33 -07:00
Sunny Goyal
c4bb3739b1 Cleaning up some animation states:
> When running one-off animations during quickstep, cancelling prevoisly
  running animations.
> Cancelling such one-off animations when state is reset
> Preventing touch proxied from recent transition to affect quickswitch
  (by affecting pagedView)

Bug: 135686388
Bug: 135571566
Change-Id: Id647015a583761d8fd46a02e3e2d88027e282a79
2019-06-21 12:47:56 -07:00
Tony
32cb616fab Fix bugs with hotseat in overview
- Allow touches to go through recents to the hotseat.
- Translate the hotseat with the all apps shelf when swiping
  up in background app state.

Bug: 135222111
Change-Id: Ib887fc25ccfeb406a44074198c11f7b1d245443c
2019-06-18 13:41:08 -07:00
vadimt
f02bef7345 More tracing for app not starting from all apps
Bug: 132900132
Bug: 134172603
Change-Id: I6a85e616552e84b8165661d25ed4330f55d3946f
2019-06-13 14:05:17 -07:00
TreeHugger Robot
f54839bf35 Merge "Remove unnecessary dispatchInsets routing" into ub-launcher3-qt-dev 2019-05-24 00:31:18 +00:00
Sunny Goyal
ab3963ddcf Moving TestInformationProvider to Launcher3 so that it can be used for
testing Launcher3 without quickstep

Also keeping the provider as disabled until needed

Change-Id: Ib5f459e02ae551724b390f3b74f43d601568d749
2019-05-23 14:02:33 -07:00
vadimt
e17d1feb79 Adding tracing for a lab-only flake
We had a resolved case in the past where an app's context menu didn't
open on a long click (thanks to app updates), now the menu opens, but
the drag gesture doesn't drag the icon.

Bug: 133009122
Change-Id: I45d104a92fab6556ecd937aef76f0a8147e67f56
2019-05-21 17:19:23 -07:00
Sunny Goyal
2524b82369 Remove unnecessary dispatchInsets routing
Insets are dispatched to all views. We never consume the insets and
let each view decide what to do with it.
Also fixing scrim in all-apps when in full-gesture navigation

Change-Id: Ib1c6bef5b32aac0c6ea03078b5138d2d0408c6d8
2019-05-21 15:58:44 -07:00