Commit Graph

241 Commits

Author SHA1 Message Date
Ikram Gabiyev
6d3ad6820d Turn off filter ui if flag is off
Fix a bug in a condition determining when to show
filter ui for a certain taskview, making sure
that the ui is off when the feature flag for
multi-instance is off.

Test: reproduced the steps laid out in the bug

Bug: 264218764
Change-Id: Ie745789ad834d56b79de47e5196737eb08b081fa
2023-01-04 00:16:34 +00:00
TreeHugger Robot
39688d2d61 Merge "Update taskbar to spec" into tm-qpr-dev 2023-01-03 17:42:41 +00:00
Tony Wickham
2a058f5be1 Update taskbar to spec
- Space between icons is 24dp in all cases (transient, persistent,
  small tablet, large tablet)
- Persistent taskbar icon size remains 44dp, but transient taskbar icon
  sizes have changed slightly: 57dp -> 52dp for large tablets and
  50dp -> 48dp for small tablets
- Also moved all values to quickstep package to avoid confusion

Test: manual, visual
Fixes: 263465844
Change-Id: I563d64dca2d920762233dd6147395c5bba3ffcf3
2022-12-28 18:56:43 +00:00
Ikram Gabiyev
448e0ade10 Filter recents view instances by package name
Filter instances of GroupTasks based on package name
as a part of support for multi-instance

Add a feature flag to toggle multi-instance features

See the video below for how to use the demo.
Note: some extra UI elements were added since video
was recorded, but the filtering process is the same.
http://recall/-/da585DRwKRZK3S2xxcQrSm/gW9HZnbCvGyH1DQiVizOW2

See go/multi-instance for more info about the feature

Bug: 253520408

Test: manually tested the instance filtering

Change-Id: I19c947ca353699096388b9fbbdca6d75cb0041a7
2022-12-28 00:10:48 +00:00
Sunny Goyal
09fab7ee7d Merge "Unifying multiple all-apps implementations" into tm-qpr-dev 2022-12-15 17:03:05 +00:00
Sunny Goyal
adb364a104 Unifying multiple all-apps implementations
> Using a single layout for the all-apps content
> Removing some unnecessary themes
> Fixing search chashes in SecondaryDisplayLauncher

Bug: 259733681
Test: Existing TAPL tests verify that Launcher/AllApps work properly
Change-Id: Icd5310316499cd421bc039cdbd4d398b813cd477
2022-12-14 11:27:12 -08:00
Jon Miranda
e7417ce2ae Taskbar All Apps button visual updates
- Moved to new position
- Using 3x3 icon
- New Colors

Checked with visd that this half is good to go,
will follow up with positioning of the 3x3 icon within
its container.

Bug: 259712417
Test: manual, LTR/RTL modes, transient/persisent models

Change-Id: I298b6dbca004cdb8920e6533fffc8ca83e0197f9
2022-12-13 15:16:01 -08:00
Brian Isganitis
85ccf120f2 Better support transient and persistent taskbar in taskbar's overlays.
- Transient taskbar nav threshold now works in overlays.
- Delay closing overlay to transient app-window threshold if necessary.
- Persistent taskbar no longer stashes for EDU overlay.
- EDU overlay provides enough bottom padding for transient and
  persistent taskbar.

Test: Manual
Bug: 217261955
Change-Id: I2ae5612ef70a6d09e22f83f8117cdbf2a0a053b8
Fix: 260769010
2022-12-09 11:24:27 -08:00
Brian Isganitis
77de0d5a28 Add EDU lottie animations for persistent and transient.
This CL introduces separate lottie assets for light and dark themes, as
well as each step. Each asset contains all of the steps currently but is
constrained to a min and max frame. In future CLs, we will optimize the
storage these take up by using the global assets and controlling min and
max frames programmatically, or trimming each individual asset.
Additionally, we should only be importing one theme variant and then
converting to the opposite programmatically, but the color mappings are
not ready yet.

Future polish to the EDU sheet, such as better handling the stashed
taskbar, will be introduced in future CLs.

Test: Manual in transient and persistent modes.
Bug: 217261955
Change-Id: I5b219ea02e25de0c5c887b5b5640f909e1219287
2022-12-08 14:06:09 +00:00
Brian Isganitis
deac0d529a Reduce top padding of Taskbar's All Apps tray.
The top padding looks too high because the code is assuming we have a
search bar at the top of the bottom sheet. Until we implement search, we
should temporarily reduce padding for the taskbar implementation.

Before:
  - No tabs: https://screenshot.googleplex.com/AAPdR5nbwepWQ82.png
  - Tabs: https://screenshot.googleplex.com/3DnQp6PKhqXyRag.png

After:
  - No tabs: https://screenshot.googleplex.com/A8enwnSs8r78ccj.png
  - Tabs: https://screenshot.googleplex.com/A3fAy2bXgmSPrG9.png

Test: Manual
Bug: 216683257
Change-Id: Ie0837acc3aed162b9428a209962be2a102c515c8
2022-12-01 00:21:28 +00:00
Brian Isganitis
61b01e2c2a Add a11y titles for taskbar windows.
Test: Manual with Talkback.
Fix: 228389333
Change-Id: If30311166fde155d04cf1c9a6865c98d380a93ea
2022-11-17 20:56:04 +00:00
Mady Mellor
9eed65de62 Merge "Remove floating task button from taskbar" into tm-qpr-dev 2022-11-01 16:16:37 +00:00
Mady Mellor
10856068bc Remove floating task button from taskbar
Not POR to have a button in taskbar for this so removing this bit
of the prototype.

Test: manual - enable floating tasks on tablet and check if there's
               a button in taskbar (there shouldn't be).
Bug: 237678727
Change-Id: Ifb57f6528946f89592649afda84101e4f9cbb198
2022-10-31 11:56:14 -07:00
Alex Chau
945c312eb7 Set autoSizeMaxTextSize for digital wellbeing toast
Fix: 253970740
Test: Enable app timer with normal display size and font size
Test: Enable app timer with largest display size and font size
Change-Id: I9a795dcf709a15c6e2c0eb24e31f09c84ea8eb2e
2022-10-28 16:03:24 +01:00
Jon Miranda
661f38cdb8 Merge "Add transient taskbar UI" into tm-qpr-dev 2022-10-26 14:56:15 +00:00
Alex Chau
f7abb69d0b Merge "Auto resize digital wellbeing toast" into tm-qpr-dev 2022-10-26 13:52:58 +00:00
Alex Chau
a2ad627607 Merge "Improve All Set page UI for large screens" into tm-qpr-dev 2022-10-26 13:10:45 +00:00
Jon Miranda
184a04266d Add transient taskbar UI
This change is only for the visual appearance of the
transient taskbar.

Bug: 252905206
Test: manual
Change-Id: I4990b20b39089a0c27ec2a72dd3010cf64ddba1d
2022-10-25 13:46:19 -07:00
Alex Chau
1faa68c8a0 Auto resize digital wellbeing toast
Fix: 253970740
Test: Enable app timer with largest display size and font size
Change-Id: I6c920b6bf7bb2801711b215ae461c64d2c7b898d
2022-10-25 17:46:37 +01:00
Andras Kloczl
fb65436fae Improve All Set page UI for large screens
Test: manual
Screenrecordings: https://drive.google.com/drive/folders/1S6kjenZn0kP-W2tPpUemre2x0368ACyr?usp=sharing
Bug: 233610579
Change-Id: I9a33efe193a96e752766feb1e91cf0ac9b30246f
2022-10-25 13:16:47 +00:00
Sunny Goyal
fc1928e324 Optimizing some icon generation code:
1) Fixing missing shadow from shortcut icons
2) Chaning all-apps icon rendering to draw background/foreground separately
   This allows us to reuse the bitmap generated for themed icons, instead of
   creating a new everytime

Bug: 248308987
Test: Verified on device
Change-Id: Ia3cbefb21a2ce676d6bb2df3d9375d61b5bed61b
2022-10-20 10:40:54 -07:00
Ats Jenk
3c59d9b345 Desktop tile that is a snapshot of desktop
Create a desktop recents tile that shows a snapshot of the freeform
tasks running on desktop.
Scales them down and positions them in the same location as they would
be on the desktop.

Bug: 244348395
Test: manual
Change-Id: Ieb5830a331691844769003189f557c4b7e4cd35c
2022-10-10 15:50:31 -07:00
Tony Wickham
bb76b99c56 Have All Set aniamted background extend edge-to-edge am: 96431570d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19429240

Change-Id: Ideffeaa3d083feaa0a3d8e110d25c0b1eb5c3153
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 19:19:24 +00:00
Tony Wickham
96431570d4 Have All Set aniamted background extend edge-to-edge
There's already a separate ConstraintLayout for the content that needs
to have fitsSystemWindows="true", but the drawing can extend past system
insets.

Test: Run AllSetActivity, manually inspect layout/drawing
Fixes: 237052706
Change-Id: I8ff1e3a036fb5c6bfa8586b041c9e5eae55c321d
2022-07-26 16:03:04 +00:00
Vinit Nayak
c7293179d0 Space out 3 button nav on taskbar
* Add additional margin on nav buttons if
there's overlap w/ contextual button
* End spacing is dependent on grid layout

Bug: 223724516
Test: Tested on unfolded with different
grid sizes.

Change-Id: Ie814f35cd1f35629744050ee3f7242c5a8599883
2022-07-25 13:15:11 -07:00
Andy Wickham
a1ec03bdfe [conflict] Merge "Moves Search results into a separate RV (take 2)." into tm-dev am: 4ca247a6bb am: 15dc59f8b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18420827

Change-Id: Ic7e380e21342011afcbd1ada0eb453dc83eff4be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 23:31:31 +00:00
Andy Wickham
2ba7797edb Moves Search results into a separate RV (take 2).
Bug: 206905515
Test: Manually verified b/230648542 did not resurface. Tested
on phone and tablet with and without work profile.

Change-Id: If724f635286b9dff2c64255f9ece3568a5cb4ea9
2022-05-24 17:10:24 -07:00
Jeremy Sim
b0cce86385 Implement non-disappearing View for split staging instructions
The instructions for how to perform a splitscreen operation, previously conveyed through a disappearing Toast, are now conveyed through a custom View object.

Fixes: 219987907
Test: Manual
Change-Id: Iff2bb6e334e0325e8a091d76a5f9b8767071365f
2022-05-23 21:23:22 +00:00
Anushree Ganjam
5cc7ff0990 Revert "Refactors Search results into separate RV for Toast."
This reverts commit 6729f0b950.

Reason for revert: This change caused b/230648542.

Please see https://b.corp.google.com/issues/230648542#comment5 for the video after reverting this change.

Bug: 206905515
Bug: 230648542

Change-Id: I85f063c56cad137c05b810204244bba7e8f94ee7
2022-04-28 01:37:49 +00:00
Andy Wickham
6729f0b950 Refactors Search results into separate RV for Toast.
This will help enable transitions between A-Z apps lists and
search results because both can be seen simultaneously and
manipulated independently.

Some high level items of the refactor:
 - SearchRecyclerView is added; logic that populated the main
   (personal) tab with search results was simply redirected to
   this RV instead.
 - BaseAllAppsContainerView added isSearching() method. Returns
   false, and ActivityAllAppsContainerView overrides (as search
   is handled there).
 - Renamed BaseRecyclerView to FastScrollRecyclerView to better
   describe what it does. SearchRecyclerView extends this, but
   returns false for supportsFastScrolling().
 - AlphabeticalAppsList#mAllAppsStore is now optional, so the
   Search RV doesn't need to store/listen to apps. Note this
   doesn't affect the predicted app row which is still updated
   if one of the predicted apps is uninstalled (I tested this).

Future work:
 - Determine why dispatchRestoreInstanceState is not called for
   BaseAllAppsContainerView. Save is called, e.g. on rotation.
   Effect of restore not called: rotating while searching goes
   back to A-Z list.
 - Keep suggested apps in Header while searching. Currently they
   are rendered in the SearchRV above search results, as before.
 - Potentially extract Personal/Work tabs to move independently of
   header.
 - AlphabeticalAppsList is a misleading name because it can also
   contains search results. However, things are pretty intertwined
   between that and BaseAllAppsAdapter (effectively a circular
   dependency), so I figured cleaning all that up was out of the
   immediate scope of this refactor, which is mainly meant to
   unblock transition work.

Bug: 206905515
Test: Manually checked for regressions, ran tests.
Change-Id: I4d3757c8a8f9b774956ca6be541dd4fcdad1de13
2022-04-24 17:36:48 -07:00
Schneider Victor-tulias
054faba0a1 Add public constructors to gesture tutorial fragments.
The lack of public, no-arg constructors was causing the tutorial to crash on re-creation (eg. rotating the screen.) Added public constructors and refactored event logging.

Also added an update to the All Set page to allow the subtitle to display in one line.

Fixes: 226321558
Fixes: 226550217
Test: manual
Change-Id: I00a6135e658a66313df5e07833e6c6a20a618672
2022-03-30 23:51:18 +00:00
Stefan Andonian
234889c81c Update text in "get app suggestions" bottom sheet to use Google Sans
font family.

Bug: b/211375020
Test: Verified that the font was different after setting it in the xml.
Screenshot: screenshot.googleplex.com/AEvdCXTufBnbQC5.png
Change-Id: Ie5447344b9e917648b50945414cf58562a1d0ca8
(cherry picked from commit 4f15b6cafb)
2022-03-25 19:37:22 +00:00
Brian Isganitis
d478f555cb Have taskbar all apps extend ActivityAllAppsContainerView.
This step is necessary to have taskbar support search in all apps.
Search is not ready yet, so a fallback search manager is included.

Test: Manual
Bug: 216683257
Change-Id: Id118388bc4baae4b63ef205295caf46cbd541bc8
2022-03-18 15:39:54 -07:00
Schneider Victor-tulias
38c59cfe4a Update gesture nav tutorial with updated phone landscape layouts
- Updated layout files to support landscape mode on phones
- Updated All Set page to say "tablet" rather than "phone" on tablets
- Hiding feedback view during gestures for better visibility
- Renamed files and resources to say "tablet" rather than "foldable"
- Added custom layout logic for the mock hotseat on foldables
- Updated feedback view margins

Test: manual
Fixes: 215063763
Fixes: 206895841
Fixes: 219251891
Change-Id: I56f7f33dd0617bdeeca4863f7d5de0143376c8bf
2022-03-08 13:57:42 -08:00
Brian Isganitis
a1370bfc5f Put taskbar all apps in separate overlay window and stash taskbar.
All apps should display below system UI components such as the
notification tray and power menu, so an overlay window is more
appropriate. As a result, all apps has a separate window activity
context, but some properties are delegated to the taskbar activity
context. Taskbar should also be stashed while all apps is open.

Change-Id: I593457708779d84a0ab8b949a966d247d0a2e1b7
Test: Manual
Bug: 216843189
Fix: 217383817
(cherry picked from commit 473b980bf9)
2022-02-23 15:06:56 +00:00
Brian Isganitis
099945b075 Add predictions row to taskbar all apps.
- We need to listen to DeviceProfile changes in case the number of
  columns changes in the grid. I made an interface/mixin separate from
  ActivityContext to avoid polutting the latter with too many things. I
  also applied this change to existing taskbar A-Z grid.
- Added all apps visited count to onboarding preferences for only
  showing "All Apps" label in place of divider 20 times. Label is also
  tracked on taskbar side and should be kept in sync.

Test: Manual
Fix: 216843395
Bug: 174174514
Change-Id: I97aa91397c334123626caf18251f19e17c7104fb
2022-02-14 11:24:16 -08:00
Alex Chau
fb54cf54e3 Avoid AllApps bottom sheet from being and add collapse handle
- Instead of using top margin, use top padding instead
- Add a separate LinearView for the bottom sheet background
- Added a handle to bottom sheet background that handle touches

Bug: 208599118
Test: phone, tablet and taskbar
Change-Id: Id8d3cb5ee6c58193926e2cf5ea7b0cb2280098be
2022-02-10 20:03:56 +00: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
Brian Isganitis
4edf1da6e2 Introduce initial A-Z app drawer to taskbar.
Invoking the drawer is currently hooked up to tapping empty space on the
taskbar. Apps can be launched, and drag-n-drop split screen works. The
drawer can only be dismissed by acting on an app icon or tapping the
taskbar again.

Test: Manual
Bug: 204696617
Change-Id: I7c5fdbc7d54d8209f6f15ef80bfeb5e9b80cf647
2022-01-28 15:20:00 -05:00
Vinit Nayak
2a93bc5b30 Add split support for 3P launcher
* Copied logic mostly from
Base/RecentsViewStateController
* There's one KI crash specific to 3P
(b/209694087)
* Swipe to home animation is TODO, but
then again it also seems incorrect for
full-screen app. 3P has many cosmetic issues
throughout.

Bug: 195607777
Test: Tested w/ Nova launcher with grid
and non-grid, able to invoke split screen with
same animations as 1P launcher

Change-Id: I35a1bc92a51caccac4214289e614000cd47bb503
2021-12-09 12:52:04 -08:00
Alex Chau
1bf0fe1b70 Add back screenshot button to Launcher3
- Also make spacing between buttons always 36dp
- Updated screenshot button image for Launcher3

Fix: 208384949
Test: Start overview in Launcher3WithQuickStep, test screenshot button is working
Change-Id: Ieb60ce134813202c1d14137fff0a131e1f5f8c96
2021-12-03 12:32:29 +00:00
Vinit Nayak
455197bf41 Add icons for staged split
Fixes: 208649953
Change-Id: I8b7bb3a650e836608ebe6aa50631026f5f6a7c63
2021-12-01 14:58:53 -08:00
Tony Wickham
426b021e22 Merge "Add support for dark tint on taskbar nav buttons" into sc-v2-dev 2021-11-22 22:05:35 +00:00
Tony Wickham
9ceae57095 Add support for dark tint on taskbar nav buttons
Tint the buttons when taskbar isn't drawing a background (either due to alpha or offset).

Test: Dark icons on a light wallpaper on home screen, dark icons when light IME is showing
Bug: 204256643
Change-Id: Iae634a1b604f50edc102905abd0d812a43c5346e
2021-11-17 16:28:21 -08:00
Schneider Victor-tulias
d0865f8219 Add animated background to the suw all set page.
Test: Ran all set page in landscape/portrait, dark/light mode
Fixes: 190828563
Change-Id: Ie7fbc6ce6777e9cec8d4dcb5dff3090dc167a161
2021-11-10 14:15:55 -08:00
Thales Lima
c335ad28a2 launcher: use a different task menu for foldables
Foldables use a different menu from phones, positioned either to the
right or left of the app icon, and display an arrow. Since TaskMenuView
is very specific for handhelds, it was cleaner to create another class
to handle foldables case extending from ArrowPopup.

This creates a working menu, the correct style will come in later CLs.

Bug: 193432925
Test: open Overview and tap the app icon

Fixes: 205298731
Test: atest NexusLauncherTests

Change-Id: I7a5c1fb4800a309f40fadb2df0f6c3a4c3f42679
2021-11-10 17:30:13 +00:00
Greg Kaiser
24898d3be0 Revert "launcher: use a different task menu for foldables"
This reverts commit 10eb3cd98b.

Reason for revert: Root cause of P0 b/205278434
Bug: 205278434
Bug: 193432925
Test: Local reverted and now launcher works on wembley

Change-Id: I3605c01066a3ce383d45e0a938f1e00b3c7f7bb9
Merged-In: I5ee18d3ee1b671fcaedda633e7a268addd5c5c15
2021-11-05 16:19:05 +00:00
Thales Lima
10eb3cd98b launcher: use a different task menu for foldables
Foldables use a different menu from phones, positioned either to the
right or left of the app icon, and display an arrow. Since TaskMenuView
is very specific for handhelds, it was cleaner to create another class
to handle foldables case extending from ArrowPopup.

This creates a working menu, the correct style will come in later CLs.

Bug: 193432925
Test: open Overview and tap the app icon
Change-Id: Icb068954e1e20a52d80c16c52d8e38ce9a181a8b
Merged-In: Icb068954e1e20a52d80c16c52d8e38ce9a181a8b
2021-11-04 16:40:37 +00:00
Nick Chameyev
5f11bf60a8 Do not use shared lib resources
Temporary removes usages of SysUI shared
resources as it leads to crashes in Launcher
tests.

Bug: 204727471
Test: install launcher, try autorotate suggestion
Change-Id: I1e3c1f5b331a22a753acc3fe0ee544d50fba5c18
2021-11-01 15:49:54 +00:00
Schneider Victor-tulias
9188b6b993 Update the hotseat edu layout for foldable devices.
Test: ran the hotseat edu on folded and unfolded foldable device in portrait and landscape mode and in three-button and gesture nav mode. ran hotseat edu on regular phone
Fixes: 203734732
Change-Id: Iea2140c8241cdea60cb5db37fbfb7f7701d63bd6
2021-10-27 17:48:46 +00:00