Commit Graph

56 Commits

Author SHA1 Message Date
Sunny Goyal
384b578ab2 Removing menu and dialog for custom actions hanlding.
These do not work well with gesture-nav and can potentially
block the Launcher UI.

Instead exposing on custom actions with keyboard accelerator and
using thee internal arrowPopup for resize options
Fixing SecondoryDropTarget not sending appropriate stats log

Bug: 179854703
Test: Verified on device
Change-Id: I268690f8a937896e4350496128a38959003f8939
2021-02-16 10:45:06 -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
Hyunyoung Song
6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
Sunny Goyal
eaf7a95546 Changing minimum supported Launcher version to 26
Change-Id: I49fcf874430ac53c3246371e179fbd828e14e4da
2020-07-29 17:30:19 -07:00
Sunny Goyal
30ac97d938 Adding home animation support for non-system Launcher
When user swipes up to home, Launcher will receive a onNewIntent
callwith a bundle-extra gesture_nav_contract_v1. It will contain
the componentName & UserHandle of the closing app & a callback.
Launcher can use the callback to return the final position where
the app should animate to and an optional surface to be used for
crossFade animation. The surface cleanup can be handled in
onEnterAnimationComplete.

Change-Id: I76fdd810fdcb80b71f7d7588ccac8976d9dfe278
2020-07-21 11:43:21 -07:00
Andy Wickham
bc83edbf4d Allows Accessibility to focus on specified view in AbstractFloatingView.
Here, the first item in an ArrowPopup or Folder are focused on.

Note: There's another pre-existing bug where it announces
"Home screen x of y" when the floating view appears; this
change doesn't address that.

Fixes: 147470419
Change-Id: I1dc70edc21ea7c19a5742208512738d6c4a94067
2020-06-10 12:03:43 -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
517cec5344 Add all apps education tutorial.
* Added FeatureFlag.ENABLE_ALL_APPS_EDU
* When user swipes up on nav bar three times and goes to hint state
  consecutively, we show the new All Apps education tutorial.
* For now we block interaction while the animation is playing,
  and we remove the view when the animation is done.
* Future CL will leave view up until user successfully reaches All Apps state.

Bug: 151768994
Change-Id: I903e0a3914d0558950ecb8cd714d97ddc10ca06b
2020-05-20 11:44:23 -07:00
Samuel Fufa
82bbdaceae Migrate hotseat items into a folder
If feature flag HOTSEAT_MIGRATE_TO_FOLDER is enabled, this moves hotseat
items into a folder in the workspace. If not, it moves the whole hotseat
to the first workspace page that can host the hotseat.

Bug: 151099421
Test: Manual
Change-Id: I49f6a22a0ada2c4cf237ca91a323a46346a11a59
2020-03-19 20:10:14 -07:00
Sunny Goyal
f3ac703256 Moving animation config so a separate class
Using PendingAnimation for animation builder.
This will allow us to easily add SpringAnimation to stateAnimation

Change-Id: I8d88489a5da6fc85747ef9be7c13858b441cd28a
2020-03-16 19:36:36 -07:00
Pinyao Ting
52d0252150 Fix the issue talkback feedback doesn't say anything when user long
press on an app icon.

When user long press on an app icon, the a11y focus event wasn't
properly triggered on the container of deep shortcut, which is why
there wasn't any talkback feedback after long press on an app icon.

Bug: 140786694
Change-Id: Ib38db147faa5a163985f1ed74beec04c588b022c
2019-10-03 07:47:33 -07:00
Pinyao Ting
a74b63aa07 do not close widgets that are safe for rebind upon orientation change
bug: 135608744
Change-Id: I58e9e44eb61f3b22df6ec656ac864f6da3fb479f
2019-07-17 23:26:06 -07:00
Tony
f941f8493d Add some floating views that should hide back button
Change-Id: I5c8b7803d2ab8347d11786d84128f6f431b4cbfc
2019-05-13 11:15:54 -05:00
Hyunyoung Song
9e7d2acc22 Cleanup unnecessary override dump method
Change-Id: Ic2909a4d382362ddec9bcc2c738d13120e792fd8
2019-04-25 16:08:52 -07:00
Hyunyoung Song
a310a80c7b Add important dump logging
Bug: 130851537
Bug: 119992316

Change-Id: I3de7c1d910d1aecd80b47a85284565c79fe0e2cc
2019-04-25 15:14:44 -07:00
Sunny Goyal
7368fa4369 Skip state animation if animations are disabled
> Also update the animation disabled check to use new-API

Bug: 118678948
Change-Id: Ib709844e34bdb7e369b368a7c33f2e8ff120024b
2019-04-22 10:00:01 -07:00
Jon Miranda
de0093dfa5 Add ListenerView so that we can fast finish the FloatingIconView fade anim.
This change allows us to quickly end the animation if the user begins
interacting with launcher before the animation is over. This can currently
happen when the user swipes up to go home, and then quickly swipes up again
to enter overview.

Bug: 129421279
Change-Id: I88c7d55ef8ac09f999c082317de3bb3693c11466
2019-04-19 15:13:10 -07:00
vadimt
5a22ef7e61 Patching null dereference in AbstractFloatingView.getOpenView()
If there is a better solution, bug assignee, please proceed with it.

I'll land this immediately, as a lot of tests are broken.

Bug: 130739123
Change-Id: Iacdb9adbbf41f1f9de1390c3e7525ee0bd7beda6
2019-04-18 08:18:33 -07:00
Tony Wickham
9791bd1555 Swipe up on nav bar to go home from -1 and widgets
More specifically, any window (e.g. qsb search) or AbstractFloatingView.

NavBarToHomeTouchController now implements TouchController directly instead
of AbstractStateChangeTouchController, as it not only dealing with
launcher states. This makes it easier to override intercept logic to
handle cases like not having window focus, for example.

AbstractFloatingViews can createHintCloseAnim() to play an animation
hinting that it is about to be closed by swiping up. Widgets sheets use
this to pull back similar to the all apps transition to home.

Bug: 129976669
Change-Id: Ie157b978d9f1ee36d5fd32cea72ec02ce40878c0
2019-04-09 10:53:24 -07:00
Sunny Goyal
462551be9c Some live tile and state fixes
> Removing LayoutListener which was causing relayouts in the middle of
  the transitions
> Fixing some logging in MultiStateCallback
> Using an overlay to draw the hole for the live tile

Bug: 124451190
Change-Id: I91351f76ec7cc2793a835f40002bfd912939d40d
2019-02-18 14:59:18 -08:00
Sunny Goyal
202ae0b0f5 Sending notification and widget changes to a listner so that
popups outside Launcher can also listen for changes

Change-Id: I2eb2d8374a6806381e1c682eaef3cc35f30693df
2019-02-11 16:23:11 -08:00
Tracy Zhou
d43e7c2fd4 Support Live Tile in Quickstep (Pt1) - Z ordering
- Place Launcher above app surface.
- Use LauncherLayoutListener to clear the area where the current task is in order to punch a hole and reveal the app view underneath

Bug: 111697218
Test: Manual test

Change-Id: I4d4e0f1113a8e60566257c030ae9b591789eb3b3
2018-10-24 14:24:54 -07:00
Hyunyoung Song
f58cf5e337 Disable scrolling noti shade on abstract floating view with swipe down
interactions already doing something else.

Bug: 116143342

Change-Id: If3716de0eb1f7b508c3b74dbe2593ba62fffcf74
2018-09-19 17:05:09 -07:00
Tony Wickham
6a71a5bd77 Add undo snackbar for deleting items
- Add methods to ModelWriter to prepareForUndoDelete, then
  enqueueDeleteRunnable, followed by commitDelete or abortDelete.
- Add Snackbar floating view
- Show Undo snackbar when dropping or flinging to delete target; if the
  undo action is clicked, we abort the delete, otherwise we commit it.

Bug: 24238108
Change-Id: I9997235e1f8525cbb8b1fa2338099609e7358426
2018-08-30 16:22:25 -07:00
Sunny Goyal
d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
Tobias Dubois
7b5834d9b1 Fix overlapping FloatingViewType IntDef
TYPE_DISCOVERY_BOUNCE and TYPE_QUICKSTEP_PREVIEW have the same value.
Make sure each flag has a unique value.

Test: manual
Change-Id: I0fec3f27ffc31bad80d3af7b3baa3631b61b2567
2018-08-08 10:19:52 -07:00
Sunny Goyal
32f91ab991 Proxying touch events from RecentsTouchConsumer to Launcher
While swipe-up animation is running, the user can quickly start
another touch gesture. In that case we keep the recents transtion active
and proxy all touch events to launcher.

Bug: 110901700
Change-Id: Ie3b448dfea00473082dc9143423d3596504a3fcc
2018-07-12 14:06:54 -07:00
Sunny Goyal
87b5eb689b Exposing some private methods to easily customize arrow popup
Change-Id: I6f6dc0604a616f26c0879732a0237767ddbfdccc
2018-07-11 14:35:51 -07:00
Vadim Tryshev
17839d5f62 Removing discovery bouncer from accessibility
It was obstructing views under it.

Solves both Talkback and Switch Access issues.

Bug: 80192025
Test: Manual
Change-Id: Ia7fad91e1fcb857afbf68f879550c670279cee68
2018-05-23 16:51:41 -07:00
TreeHugger Robot
52cb0a73a4 Merge "Go back to previous state when hitting back from discovery bounce" into ub-launcher3-edmonton 2018-05-21 23:11:56 +00:00
Tony Wickham
52c1b66f46 Go back to previous state when hitting back from discovery bounce
Normally when you hit back, we just close the floating view if there
is one. This makes less sense for DiscoveryBounce, since it doesn't
feel like a different state even though it's technically a floating
view. So in that case, don't consume the back press; let launcher
handle it to go to the previous state.

Bug: 80075741
Change-Id: I7270b61be70509cb2101400a12929478a5d082aa
2018-05-21 16:01:49 -07:00
Hyunyoung Song
bd6fba9f58 onResume event should be logged (not twice but once)
Bug: 79541772

Change-Id: I5fe1271007e4579e1ec95d51c215ef48d0c6eedd
2018-05-21 12:27:46 -07:00
Tony Wickham
8155fa2aa5 Don't prevent animations in power save mode
Now that batter saver mode doesn't get rid of animations in P, we
shouldn't use custom logic to prevent them either.

Also updated ATLEAST_P to use version code.

Bug: 79990054
Change-Id: If17cf369035c976f3d9d81f35432a045f1956ce5
2018-05-18 17:18:49 -07:00
Sunny Goyal
de75321542 Fixing wrong accessibility focus when opening a floating view
> Using common logic for announcing a floating view for widgets and folders

Bug: 79091095
Bug: 79748886
Change-Id: Ibb3fe48e68e724f50d69f51a03d3b35ad0baf625
2018-05-16 13:11:00 -07:00
Jon Miranda
83337f9e8e Call close for AbstractFloatingViews that were removed while still open.
I'm not sure how/when this case occurs (perhaps during some transition/state
change), but manually removing the floating view matches the symptoms in the
bug.

Bug: 72996404
Change-Id: I1e7c1a338fcd16c8e07b3c49fb9c9b2097eb2708
2018-04-25 11:25:40 -07:00
Tony Wickham
df1eb8bb86 Don't show back button when discovery bounce is playing
Bug: 74766552
Change-Id: Ib3b514f4a2bfaa8593b82cd5acb16f02dd09dcc7
2018-04-12 17:26:18 -07:00
Jon Miranda
fcb7e19f67 Close options popup when rebinding launcher.
Bug: 77582012
Change-Id: I6707ca526c8c934f56b227288d2cbea7139ac41d
2018-04-05 11:32:41 -07:00
Sunny Goyal
0b0847b272 Fixing taskMenu and taskView clicks in fallback activity
> Extracting common methods from Launcher & DragLauncher to base classes
> Remoting some dependencies on Launcher and using the base class instead

Change-Id: I121cacf8a14190b4703cda60bdeb4f79eee69ded
2018-03-15 17:29:43 -07:00
Hyunyoung Song
b3fbc0ba8f Quick step/scrub/switch logging
- state transition happening due to Home and back is handled by
  specifying src target as 'from' container and dst target as the 'to'
  container
- Source and Destination container shows FROM and TO state for SWIPE/FLING
- event.isStateChange = true indicates that an action resulted in
  state transition
- Elapsed container millis is the screen time on the source container

Bug: 70181187

- logcat printout with setprop log.tag.UserEvent VERBOSE
1) State: WORKSPACE -> ALLAPPS
  action:FLING direction=UP
  Source child:HOTSEAT id=0	parent:WORKSPACE id=0
  Destination child:ALLAPPS
  Elapsed container 1225 ms, session 1225 ms, action 0 ms

2) ALLAPPS -> HOMESCREEN
  action:FLING direction=DOWN
  Source child:ALLAPPS	parent:ALLAPPS
  Destination child:WORKSPACE id=0
  Elapsed container 971 ms, session 2197 ms, action 0 ms

3) HOMESCREEN -> OVERVIEW
  action:FLING direction=UP
  Source child:NAVBAR	parent:WORKSPACE id=0
  Destination child:TASKSWITCHER
  Elapsed container 4834 ms, session 4834 ms, action 0 ms

4) OVERVIEW-> ALLAPPS
  action:FLING direction=UP
  Source child:TASK	parent:TASKSWITCHER
  Destination child:ALLAPPS
  Elapsed container 2176 ms, session 7010 ms, action 0 ms

5) ALLAPPS->OVERVIEW
  action:FLING direction=DOWN
  Source child:ALLAPPS	parent:ALLAPPS
  Destination child:TASKSWITCHER
  Elapsed container 3683 ms, session 10693 ms, action 0 ms

6) OVERVIEW-> HOMESCREEN
  action:FLING direction=DOWN
  Source child:TASK	parent:TASKSWITCHER
  Destination child:WORKSPACE id=0
  Elapsed container 2108 ms, session 12801 ms, action 0 ms

7) APPS-> OVERVIEW
  action:FLING direction=UP
  Source child:NAVBAR	parent:APP
  Destination child:TASKSWITCHER
  Elapsed container 104 ms, session 104 ms, action 0 ms

8) Quickscrub: action:DRAGANDDROP Source child: QUICK

9) Quickswitch: action:FLING Source child: QUICK

Change-Id: I5898230859ff600f48a2a873a40b670fe4d39a0d
2018-02-20 22:40:19 -08:00
Sunny Goyal
02424b20f3 Adding a horizontal popup when when workspace is longPressed
Change-Id: I5b3c48262c246bfe53e0010ca89c820f42503eef
2018-01-19 15:11:10 -08:00
TreeHugger Robot
6c870f2942 Merge "Adding support for auto-cancelling an action mode when interacting with launcher" into ub-launcher3-master 2018-01-04 01:11:59 +00:00
Tony Wickham
2fae2a0e9c Add system shortcuts when long pressing recent icon
We add a floating view for the menu that aligns with the task icon.

If available, the following shortcuts are present:
- Widgets
- App info
- Install (for instant apps)

It is designed to be straightforward to add to this list.

Bug: 70294936

Change-Id: I56c1098353d09fc564e0e92e59e4fcf692e486ba
2018-01-02 15:44:34 -08:00
Sunny Goyal
7c8a65e740 Adding support for auto-cancelling an action mode when interacting with launcher
Change-Id: Iba0207e36e9e5bd94bd9016318a4e00c6e1f6393
2017-12-22 11:11:54 -08:00
Sunny Goyal
7ede6118b7 Moving discovery bounce logic to a separate class.
Removing special transition handling around discovery bound to avoid
inconsistant UI state

Change-Id: Ia40bcb0719076021a6c96f1bd16d44da0286a209
2017-12-06 10:34:16 -08:00
Tony Mak
191b688cc8 Bottom user education view shown in work tab
Introduced a BottomUserEducationView for similar use case.

Screenshot: https://hsv.googleplex.com/4856820942241792

BUG=69963630

Change-Id: Ia818ee44fa5ce97ad1778f33e6a9a3a36cea5017
2017-12-04 17:36:33 -08:00
Sunny Goyal
f8088eecf1 Initial changes for handling touch events.
When the touch passes a threashold, we take a snapshot and start the launcher
activity. The launcher displays the snapshot on top of its UI.
As we get further touch events, we move this snapshot and the hotseat in reponse.

Change-Id: I4623676227000afd52805a414a4de499081feced
2017-11-10 18:06:33 -08:00
Sunny Goyal
f1fbc3fbe7 Converting widget panel into a floating view
> The widget panel is only inflated when needed
> Using the swipe up/down interaction for widgets tray
> Removing additional view wrappers from all-apps
> Widget tray is preserved across activity recreation
> Launcher no longer has WIDGET state, the actual code around
  the states will be removed in a follow-up cl

Bug: 67678570
Bug: 67585158
Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
2017-10-13 18:47:54 -07:00
Sunny Goyal
10a1bd0e65 Converting PopupContainerWithArrow into a base class so that it is easier
to create other types of popup

Bug: 67585158
Change-Id: I966ae7bb90f941951b26feaf71b3ea30c3f3c0cc
2017-10-10 10:28:05 -07:00
Sunny Goyal
3792096688 Allowing the widgetBottomSheet to be dragged
even when the touch is started from outside the panel

Removing various instanceOf checks in onNewIntent and onBackPress
and moving all the corresponding logging in the FloatingView
This simplifies handling of panel specific log and avoids
missing a particular panel type in the if-else statement.

Bug: 64751884
Bug: 64751923
Change-Id: I98f5aae18560a64be73c9efcf495479740d49a00
2017-10-02 16:18:52 -07:00
Tony Wickham
343a77e609 Rename WidgetsAndMore to WidgetsBottomSheet
(It only contains widgets now.)

Bug: 35766387
Change-Id: I5864791a9741d1c56ac6df30125fe7a4a677b4bd
2017-04-17 11:44:41 -07:00