Commit Graph

76 Commits

Author SHA1 Message Date
Fengjiang Li
6bb8d79549 Predictive back: widget to all apps
This CL adds a layer of OnBackPressedHanlderRouter to Launcher:
1. 4 OnBackPressedHandler(s) are added in such order: auto cancel action mode handler, drag handler, view handler and state handler
2. first handler who can handle back will handle the entire back gesture
3. Let WidgetsFullSheet to handle widget to all apps transition

Bug: b/260956481
Test: manual
Change-Id: Idbce3dcec746226dd68aaabaddc8fe01334e9673
2023-01-24 15:51:46 -08:00
Sunny Goyal
a992ac9e8d Moving all intent receiver register calls to a single place
This is eventually allow us to move all register to background thread
Also creating a single ScreenOn tracked which is used at multiple places

Bug: 264465756
Test: Verified on device
Change-Id: Ibadf9ca43218e578954420d97a733adfa0a94fc7
Merged-In: Ib410e5bf02773cefde5bf0a0a1f2f1c108718d24
2023-01-22 05:24:48 +00:00
Brian Isganitis
589c8d3e29 Add overlay proxy type to ALL and REBIND_SAFE.
Test: Manual
Fix: 259575422
Change-Id: I121fa0471f96df90e5ff88bbd0aba04556293dc7
2022-11-17 20:08:05 +00:00
Brian Isganitis
2d6371aa34 Implement overlay window for Taskbar EDU and All Apps.
Having EDU in the same window as Taskbar causes it to be above All Apps
and other system views such as the notification tray. This change
refactors the existing All Apps window to accomodate more AFVs so that
EDU can also exist in it.

Demo: http://shortn/_Qcki3gwvf7

Test: Manual
Fix: 232177330
Change-Id: I1bef31d798041a90a0c3e033e71be63898fa5fbc
2022-10-14 22:36:14 +00:00
Sunny Goyal
1eb1124d82 Removing back-button alpha animation code
Back button is only animation in 2-button UI which is not supported anymore

Bug: 246006580
Test: Presubmit
Change-Id: I7385b07272e44c1f9f0488c158e1b4ee67060120
2022-09-09 17:15:24 -07:00
Abhilasha Chahal
e2aca3e664 Add type TYPE_ADD_TO_HOME_CONFIRMATION to AbstractFloatingView
Test: Manually verified that the Floating view appears
Bug: 217360015
Change-Id: Id9edd3f9c2ef06ece4f541830c2080aeed11f1b1

Change-Id: I7f89a191ff55bcc03ec70c49aea659188083f0dd
2022-05-18 11:32:51 +00:00
Tony Wickham
f286f9cb98 Address a couple small followups for TaskbarInsetsController
- Added no-op onDestroy()
- Reformated some if conditions, also adding
  AbstractFloatingView.hasOpenView()

Test: TaplTestsTaskbar
Bug: 215411414
Change-Id: I89b39ca5fabd03f5ac0f25d6ef69170683cf060d
2022-04-21 16:16:02 +00:00
Brian Isganitis
7ef4fe42cb Add separate AFV type for options popup dialog.
Now that we close all non rebind safe AFVs onResume, the options popup dialog is getting closed. This dialog is rebind safe, but currently using TYPE_OPTIONS_POPUP which isn't.

Test: Dialog stays open on activity recreate. Also ran affected tests.
Bug: 227142635
Change-Id: Ibbac925ce5dd2de5c7770cb8f5bd8c5e438449cf
2022-04-07 16:29:44 -07:00
Tony Wickham
538c9a0b52 Fix problems with taskbar floating views on rotation
- Close all views except TYPE_REBIND_SAFE
- Make All Apps TYPE_REBIND_SAFE again
- Reapply fullscreen to ensure any remaining floating views such as taskbr edu are laid out correctly upon rotation

Test: Rotating with folder and/or popup closes them; rotating with all apps stays open; rotating with all apps + popup closes popup but not all apps; rotating taskbar edu lays out correctly; opening shortcut or notification from all apps popup still closes all apps
Fixes: 220074790
Fixes: 219981733
Change-Id: I1dfea4ed0a636ab84bcc4e33304c80a689da01cd
2022-03-28 14:48:20 -07:00
Brian Isganitis
84da9622d7 Close taskbar all apps on popup notification and app info shortcut tap.
Test: Manual
Fix: 223659756
Change-Id: I84fd8cd84ccdce5f51874d7356cafac9bfa92004
2022-03-10 15:27:14 -08:00
Brian Isganitis
9e80fb355c Inflate taskbar all apps in abstract slide-in view.
All apps can now be dismissed via the scrim or swiping down. To properly
behave as an AFW, the apps view can no longer be within the taskbar's
layout, and will instead add and remove itself from the drag layer.

Test: Manual
Bug: 204696617
Change-Id: I86a0ffc06faa653c65b3797a57ba6512c6874221
2022-01-28 15:21:11 -05:00
Tony Wickham
d5e116a750 Don't set Taskbar window to non-fullscreen while folder animates closed
Test: Open an app, open a folder in taskbar, and drag an app from the folder. Ensure the folder close animation plays completely.
Fixes: 199954907
Change-Id: I1caec4ef24b5325724d74f10ddbeae6ef8f9e959
2021-09-14 17:48:14 -07:00
Andy Wickham
13f3ffed95 Adds initial Taskbar Edu implementation.
Currently it just pops up with one placeholder image for splitscreen.
The Next button doesn't do anything.

Screenshots:
Light: https://screenshot.googleplex.com/B27CwBcwobHTghN.png
Dark: https://screenshot.googleplex.com/48EuJZv8evd5RGW.png

Known issues:
 - Back gesture is picked up behind by the app behind the taskbar.
 - When the flag is enabled, the Edu shows up each time you open
   an app, rather than only the first time.

Bug: 180605356
Test: Manual
Change-Id: Ifba9aa59abf1501b5f8ddebb3fcc13df85f6efaa
2021-08-17 09:57:47 -07:00
Alina Zaidi
f2c79dea0d Add more education tips for widgets. (2/3)
Show education dialog on WidgetsFullSheet.
-Have a button in widget education dialog to intent into PixelTips apps.
-Make sure arrow tip view shows after dismissing education dialog on
WidgetsFullSheet if there is a widget to show it on.
-Update colors and layout for arrow tips.

Test: Tested manually
Bug: 185354491
Change-Id: I5cbdd02fc4f19a49a42dac4451b071e3d604747f
2021-06-01 13:58:18 +01:00
Jon Miranda
e3104682fb Folder polish
- Update folder hint text to ensure enough contrast.
- Clamp down on alpha when animating to local color extraction
- Update colors to new spec.

Bug: 179209484
Bug: 175329686
Test: manual
Change-Id: I9471504e10f02630ae13b2c478ced1ee05bd5220
2021-05-19 14:03:09 +00:00
Alina Zaidi
d80cec62b4 Modify pin widget dialog open-close animation.
Pin widget sheet should open from bottom up and close on drag down.
Behaviour with navigation bar is similar to that of widgets bottom sheet.

Add a drag layer and reuse AbstractSlideInView for open-close
animation.

Test: Tested manually- opening, closing through dragging/ cancel button/
back button. Adding widget to screen by dragging/ add to home screen
button.
Bug: 186124244

Change-Id: I4b77d5bdd4ed1689b651847dfed69d19cafa7456
2021-05-14 17:59:50 +01:00
Jon Miranda
0b6fa71deb Add local wallpaper color extraction to folder backgrounds.
- Starts listening to local wallpaper colors as soon as folder
  is positioned.
- The folder open animation already has a background color
  animator.
- For simplicity, folder open animation always starts
  first, and then we cancel its background color animator,
  and start a new animator to the extracted color.
- setAutoCancel would be handy here, but it does not work, will
  track in a separate bug.
- Since folders are reused, we clear our the color extractor on
  folder close.

Bug: 175329686
Test: multiple folders on rainbow background
      open each folder, ensure bg animates to proper color
Change-Id: Ie0f2c0632fa2361f7710ba247d74f882620dec16
2021-05-07 16:16:36 -07:00
Tony Wickham
e63bd38a55 Remove dead taskbar code
Test: Works as before
Bug: 182512211
Change-Id: Id4c979f2924f9ae6881a9bed18bcc52fbd80c05b
2021-03-23 11:42:50 -07:00
Tony Wickham
e5695f9196 Hide taskbar when certain floating views are open
Test: Open widgets, ensure taskbar hides
Bug: 171917176
Change-Id: Ib78182fe0ca1ea5ffbd28ab42f49ab8f0e535a18
2021-03-16 11:28:35 -07:00
Tony Wickham
ae72b46b2c Replace taskbar hotseat with real hotseat when folder is open
- Seamlessly show real hotseat and hide taskbar hotseat, while
  keeping rest of taskbar visible
- Update MultiValueAlpha to allow for taking max alpha instead
  of blending, and use that for Hotseat
- Fix folder open bounds on home screen when taskbar is present

Test: Open folder from taskbar on home, can drag out items
Bug: 182079330
Bug: 171917176
Change-Id: I7c1983e3219b1341cf233260f0ccac9051c4dc14
2021-03-12 11:05:43 -08:00
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