Commit Graph

1086 Commits

Author SHA1 Message Date
Zak Cohen
02f0c92ea8 Merge "Widget Picker - center text description vertically to align with add button" into main 2024-04-05 16:46:44 +00:00
Zak Cohen
106cd240de Widget Picker - center text description vertically to align with add button
Bug: 332287648
Test: Widget picker tests
Flag: NA bug fix
Change-Id: I4d600633c3cfdc40973134903f4ba7a04090ccfe
2024-04-04 15:59:00 -07:00
Zak Cohen
ea3fe15fa8 Merge "Widget Picker - Always center add widget button text vertically" into main 2024-04-04 22:19:21 +00:00
Vinit Nayak
247c6ac8ec Merge "Allow app pairs in folders" into main 2024-04-04 17:55:34 +00:00
Zak Cohen
d00650bec3 Widget Picker - Always center add widget button text vertically
https://screenshot.googleplex.com/6aLoQSeADh2Ds6V

Bug: 331493703
Test: screenshot tests
Flag: NA layout bug fix
Change-Id: I6399474c42d3cd8ee172bbbbc0789044aac8cbe0
2024-04-04 10:01:18 -07:00
Shamali P
8f44617191 Remove unused badge logic on WidgetCell now that we don't show badges.
See ag/26786552 that removed the usage.

Bug: 331838199
Test: Manual validation
Flag: N/A
Change-Id: I4393df1f8c6c7568925428bb3489081df17aa623
2024-04-04 13:10:00 +00:00
Jeremy Sim
a596f589c4 Allow app pairs in folders
This CL substantially refactors folders to be able to take contents of type AppPairInfo. App pairs can now be moved in and out of folders, and launch from folders.

This CL contains only logic and model changes; animation and style changes (for dropping items into folders, color changes to app pair surfaces, etc.) will be in a following CL. Another CL (hopefully) will contain tests. I'm planning to submit them together, but this patch should also be able to stand alone with no issues (except janky transitions).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, more to follow in another CL.
Change-Id: I73732fcaefbdc61bf6e02a5be365962b8bbc3e41
2024-04-03 16:47:42 -07:00
Brandon Dayauon
4958ecfadb Merge "Move adding views logic to privateProfileManager" into main 2024-03-29 04:03:42 +00:00
Brandon Dayauon
136f9d6f8a Move adding views logic to privateProfileManager
- Have the animation happen according to the state of private space.
- Have the transition happen only once by setting the current transition to null at the end of transition and by ensuring
where the transitions are allowed.
- Removing controller class.

- The onClick controls the enablement of the profile. On reset (when getting the transition) is what controls the animation
during expand.

tldr- In the collapse case:  execute() is called -> animation happens  -> addPsHeader
tldr- Expand case: post() is called -> addPsHeader -> animation happens.

Collapse:
onClick() -> AACV.onAppsUpdated() that resets & apply/RUNS runnable because EXECUTE
-> AAList.onAppsUpdated() (which is called at the same time animating happens which we should cancel and do at end callback)
-> AAList.onAppsUpdated() gets called again

Expand:
onCLick() -> AACV.onAppsUpdated() that resets & apply runnable
-> AAList.onAppsUpdated() (no animation running)
-> AAList.onAppsUpdated() (no animation running)
-> addPrivateSpaceHeader
-> then unlockAction() runnable because its posted at this point

bug: 326206132
bug: 330444548
bug: 299294792
Test: manually locally and presubmit: https://screenshot.googleplex.com/9wavvwKQ8hY6oUw & https://screenshot.googleplex.com/BiqmidLFjPwS28j
video: https://drive.google.com/file/d/1XGhmTncdUFtJj188_l7alGyyNz_fhXNw/view?usp=sharing

Scrolling fix before: https://drive.google.com/file/d/1XykDm4UELoCvcwZdj8ZlJ6TszptB8W0W/view?usp=sharing
scrolling fix after when not a lot of apps: https://drive.google.com/file/d/1Y4VY1eX7WE8ShSLXRrT56ieBdAuJo_zn/view?usp=sharing
scrolling fix after with a lot of apps: https://drive.google.com/file/d/1Y58c-Z9xnU1GILp0Ih-oLORXYkMB-jWn/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation

Change-Id: I8d03ae60e2c9fe0ec145c4b0a2e9604b9e6e9017
2024-03-28 17:39:42 -07:00
Stefan Andonian
f6867d48d9 Merge "Make "Undo" button not be long-clickable explicitly." into main 2024-03-28 20:00:11 +00:00
Stefan Andonian
462c80831c Merge "Explicitly set the Hotseat to not long or short clickable." into main 2024-03-28 19:59:27 +00:00
Sunny Goyal
bd7ec3335b Using xml override instead of code swap for predicted icon
Bug: 330920490
Flag: None
Test: Presubmit
Change-Id: I5ff52464b931630da003fb6aeff2a4fd9d2dd3b3
2024-03-25 15:18:48 -07:00
Stefan Andonian
83578d13fa Explicitly set the Hotseat to not long or short clickable.
Bug: 318316718
Test: Verified this is no longer selected by switch access.
Flag: NA
Change-Id: I45a815ab816f9835e297d06eb1f5d0edcb29d837
2024-03-21 17:54:41 +00:00
Stefan Andonian
e38a890b20 Make "Undo" button not be long-clickable explicitly.
This is causing accessibility bot issues for the switch access
feature.

Bug: 319369664
Flag: NA
Test: Verified via go/web-hv that this is no longer long-clickable.
Change-Id: I8a90d7093b60ddecdecc3374a34ce6828c1b7468
2024-03-21 17:46:55 +00:00
Helen Cheuk
8944afda32 Merge "Disable default focus highlight for Folder to fix the incorrect border issue" into main 2024-03-21 12:30:46 +00:00
Shamali P
b081314330 Retain recommendations (if possible) while picker is open
Picker rebinds recommendations when size constraints change or
fold/unfold, but recommendations from popup provider may have changed.
This is an attempt at trying to maintain currently shown items
as much possible.

Also, align the pagination and title to the top in two pane picker
 (confirmed with David that we prefer this version)

Additionally, we don't show the widgets count for suggestions.

Bug: 318410881
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Test: Manual

Change-Id: I60799f9ad38da913c3e084d758f5b82c79cd641c
2024-03-19 21:26:14 +00:00
helencheuk
51ec59dd1f Disable default focus highlight for Folder to fix the incorrect border issue
Agreed with UX that removing visible focus on first ESC keypress is the expected behaviour
So it is disabled in this CL to avoid the square corner focus state

Bug: 329892471
Test: Manual
Flag: N/A
Change-Id: I721bf0916374842c582b6b6523cc4cd5ce78fc02
2024-03-19 18:13:24 +00:00
Willie Koomson
078737f22b Merge "Add tap-to-add button to widget picker" into main 2024-03-15 23:26:05 +00:00
Willie Koomson
cdc26951ff Add tap-to-add button to widget picker
This change introduces an "Add" button that appears when a widget
preview is clicked in the widget picker. This button disappears when the
preview is clicked again, or another preview is clicked. When the button
is pressed, it adds that widget to the picker. The add button is
available in the app-specific widget sheet as well.

Bug: 323886237
Test: Manual
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add DEVELOPMENT

Change-Id: I86a8a4c22119960c54a885fd2efeb91916b4f9a0
2024-03-15 20:10:45 +00:00
Shamali P
02a75fc924 Distribute the padding between search&rec container and tabs/applist
When there are no recommendations (pre-V as well), the margins/paddings
between search container & apps list / tabs was 8dp extra.

Additionally, cleaning up -
1. requestLayout call on page switch is now not needed after limiting
the table space for recommendations in two pane picker.
2. After preview container sizes, TOP alignment actually looks a bit
better - and widget preview itself is automatically center aligned as
we club only same preview container sizes in a row now.

* http://screen/6e6YzjqXJrdZ7Bt
* http://screen/AVLpzoYSGpyr2rs
* http://screen/7xnmrtLvBMPX5iX
* http://screencast/cast/NjYyNzM4NDY3MjM4NzA3Mnw2NDY0MmU4ZC0xMw (phone)
* http://screencast/cast/NTYwMzE1NDI1ODI5NjgzMnw2NmM1MjRkZS0zNA (fold)
* http://screencast/cast/NTIzODk3NTM5MTMzNDQwMHxlYmE2NDEwNS0xZg (tablet)

Bug: 319152349
Flag: N/A
Test: Screenshot and manual
Change-Id: I164419624d02fb47e80ea844eea0ee2a869ad4df
2024-03-15 13:36:20 +00:00
Shamali P
927dd27ece Update the widget previews to use the container sizes
Additionally, adjusts the margins on sides, to make space for displaying
multiple previews side by side.

As a result of this change, previews aren't cropped anymore (indirectly
also fixing b/317366201).

There is one more follow up pending - to limit the height of
recommendations in two pane sheet to only visible area to keep the
suggestions quick to look and concise. It will also help with better
scroll experience when size is same across pages.

* http://screencast/cast/NTQ0Njc4ODgyNjc5MTkzNnxjYzZiYTU2Ny02Yw
* http://screencast/cast/NTk4ODMyMDkxOTE1ODc4NHw3NzdlNTgxZS1kMw
* http://screencast/cast/NTYxOTc5NjIxNjM4MTQ0MHxiMjQ2Njc3OC0zOQ
* http://screencast/cast/NDk4MjIxNjI0MDEzNjE5MnxjY2IwYmIxNi00Mw

Bug: 319152349
Flag: N/A
Test: Image test and table utils test
Change-Id: I07465bd4d84597b560a2b998ff1ccbf9867c0192
2024-03-12 23:47:07 +00:00
Himanshu Gupta
07ebb705d6 Fixing Layout height for Private Space container
Screenshot at max Font, max Display Size:
Before:  https://screenshot.googleplex.com/BwtrU5xE5h63RKZ.png
After: https://photos.app.goo.gl/RXTvE6rM6PUx9wRK7

Bug: 311343337
Change-Id: I565c0c430b56e14f0fb1863b37c835c59c032730
Test: Manual
2024-03-03 21:14:16 +00:00
Zak Cohen
26c26fe837 Widget Picker - show app icon next to recommended app label.
https://screenshot.googleplex.com/42gUGuSADdrW2CS

Bug: 323887132
Test: Manual, no test for widget cell yet.
Flag: NA
Change-Id: I95e7a645b3664361222d5045114224b17d8fdf34
2024-02-27 13:34:15 -08:00
Shamali Patwa
b7483c1d37 Merge changes from topic "categories" into main
* changes:
  Initial UI changes for displaying categorized suggestions.
  Use full-width two picker in both orientations in tablets
  Use derived padding instead of static 300dp for large portrait displays
  Align items in the center within each table row within suggestions.
2024-02-20 17:42:31 +00:00
Brandon Dayauon
08b06523a5 Collapse private space container and animate header.
- Just opposite of how it will expand.
- RecyclerView.SmoothScroller is needed to scroll the container.

- Need to separate the lock button because this way I can use animateLayout changes and it itself was its own drawable. Separated into icon and textView in a viewGroup.
- Give the background the 10padding on the left and right so that when in animation, the icon can adjust the padding/margins there.
- Using propertySetter to set animation
- Animates the alpha of the settings alpha

- updated test to account for the nested child views the test needs to inspect

bug: 299294792
test: manual:
Expand + Collapse Video: https://drive.google.com/file/d/1Og66eqmXv3THn0wO4_x6Tfp2AbwFWUwZ/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation TEAMFOOD

Change-Id: I96f1d172a481522d23b4cee996ddec65961fce78
2024-02-16 21:23:51 -08:00
Shamali P
b3a4d65bb7 Initial UI changes for displaying categorized suggestions.
Ordering changes and some more UI changes in follow-up.

Bug: 318410881
Test: See screenshots
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: I77e7f4dcdda32e2921ae56721cddbe261832f0d8
2024-02-16 18:43:20 +00:00
Shamali P
13c6727601 Set accessibility pane title for right pane on updating content.
This will let users know that content appeared on right when they
selected an option on left.

Note: This is announced _only_ when content changes.

Bug: 324073588
Test: Manual with talkback
Flag: N/A
Change-Id: Icec3242d8f250f6d19e082a39927165c7b8fc86a
2024-02-12 19:48:41 +00:00
Federico Baron
1bb90a78f6 Merge "Fix two pane widget picker bugs" into main 2024-02-08 16:58:40 +00:00
fbaron
88676ba7bb Fix two pane widget picker bugs
Here we:
-Move no widgets text outside of the right pane so that we can center it
-setInset and change the clipping of children in the views so that we can fix the padding at the bottom when we have 3 button nav
-create selectedHeader where we keep track of the currently selected header in order to refresh the widgets for the selected header on rotation
-when widgets are bound we check if there are no recommended widgets, and if there aren't we select the first visible header

Fix: 324002996
Fix: 324001940
Fix: 323417968
Fix: 323460545
Fix: 323409306
Test: WidgetPickerImageTest
Flag: NONE
Change-Id: Ibd85cb086bb6c2aede6cf79da0c688a1fdaec4e5
2024-02-07 22:36:59 +00:00
Shamali P
55fded376b Remove the "expand/collapse" actions on the apps list in 2 pane picker.
In a single pane picker, apps list is expandable / collapsable, but,
its not applicable for 2-pane variant. in 2-pane one, it should just
say "double tap to activate".

Also opened b/324073588 to make it clear from a11y perspective that it
is two pane and on click, right pane change should be announced.
(just like it does in settings with talkback).

see screencast/cast/NTQ1Mjk0MjIzOTg1ODY4OHw4OTc5ZjAzNS0wOQ

Bug: 319195592
Flag: None
Test: WidgetsListHeaderAccessibilityTest & manual.
Change-Id: I9ae3fbacc29364bd7459f6e6d85e0a1e919de3f8
2024-02-06 20:07:41 +00:00
Shamali P
1f5a8e6ee1 Fix crash in two pane paged view when work profile is used
Looks like ag/25865281 updated widgets_two_pane_sheet_recyclerview.xml
but not widgets_two_pane_sheet_paged_view So, with work profile where
 widgets_two_pane_sheet_paged_view is used, it's crashing.

See https://b.corp.google.com/issues/322681099#comment9 for recording

Fix: 322681099
Test: Verify picker loads & scrolls with / without work profile.
Flag: NONE
Change-Id: If7969a70e1079ffff58ffbd0a90cbec34c6da2de
2024-01-29 19:43:39 +00:00
Himanshu Gupta
0cc11dbcac Separating system and user-installed apps in PS container.
We add a horizontal line separator in PS container which demarcates
user-installed vs system installed apps in private space.
User-installed are shown above the separator, system ones below.

UX Mock: https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?node-id=11546%3A310574&mode=dev
Mock Image: https://photos.app.goo.gl/Wj8sJkS7P7bRbovg8
Demo video: https://photos.app.goo.gl/MBw6HpDnf6PJqUfs8

Bug: 308054233
Flag: ACONFIG com.android.launcher3.Flags.private_space_sys_apps_separation DEVELOPMENT
Test: AlphabeticalAppsListTest
Change-Id: Iad8e289c49a05ac7ef1978bd8e4ebe7aa0add0ca
2024-01-26 11:04:13 +05:30
Federico Baron
dc2f747213 Merge "Fix nested scrolling in two pane picker left pane" into main 2024-01-22 19:38:46 +00:00
fbaron
db1e3d53e3 Fix nested scrolling in two pane picker left pane
Fix: 319151078
Test: Verify there's no nested scrolling
Flag: NONE
Change-Id: Ic974c85e1845f45aa0646a1ebf29696f75c9ab90
2024-01-22 09:00:57 -08:00
Sunny Goyal
e0c1649d87 Cleaning up some unused notifications functionality
Bug: 321154530
Test: Presubmit
Flag: N/A
Change-Id: I1ff2a4f19595659d89e7d72ee1b29036bbd54d8f
2024-01-19 00:21:02 -08:00
Brandon Dayauon
6ac1d24876 Fix padding between text and (x) icon in work profile card.
- Simplified the .xml to just use linear layout and remove the extra relativelayout that was used for the button when it can just be a
Framelayout.

- Now according to spec https://www.figma.com/file/mf67dbMngw0a3aev2HTinD/Work-Profile-%26-Bluechip?type=design&node-id=2185-0&mode=design&t=n0pl6vP5rnSrTyyv-0
the additional padding is now included.

bug: 309120438
Test: Manual photos-
before: https://screenshot.googleplex.com/48kUpYCVQGYMwdm
after: https://screenshot.googleplex.com/AcisTmXQeZ3NT3C
Flag: None
Change-Id: I3c1850a20f49a2a4e809410b4aaef688ea9b3e2c
2023-12-18 13:37:16 -08:00
Helen Cheuk
9c0f738cdb Merge "Add focus outline to launcher" into main 2023-12-15 18:03:36 +00:00
helencheuk
b4626f4698 Add focus outline to launcher
Fix: 310953377
Test: TBC
Flag: ACONFIG com.android.launcher3.enable_focus_outline Development
Change-Id: Ie395ec74c8a4a13a68539ca7ec6496481d96b860
2023-12-15 16:56:31 +00:00
Federico Baron
4266fa49e2 Merge "Update two pane sheet widget picker to use RelativeLayout since ConstraintLayout was causing test failures" into main 2023-12-13 01:47:21 +00:00
fbaron
b3b0215cb1 Update two pane sheet widget picker to use RelativeLayout since ConstraintLayout was causing test failures
There are test failures when using ConstraintLayout without a known solution, see https://chat.google.com/room/AAAACwktJi8/2OogGWfbLvI. Switching back to a relativelayout to resolve those issues.

Bug: 301918659
Test: WidgetPickerImageTest
Flag: ACONFIG com.android.launcher3.enable_unfolded_two_pane_picker DEVELOPMENT
Change-Id: I004c2d77ca308d85b29217d4f1e548067126556f
2023-12-12 15:12:40 -08:00
Jeremy Sim
23fcbf2f73 App Pairs: Launch animation
[App Pairs 7/?]

This patch implements the app pair launch animation from icon. Adds a new function, composeFadeInSplitLaunchAnimator(), in SplitAnimationController, that builds the combined launcher + shell animation.

Bug: 309618233
Flag: ACONFIG com.android.wm.shell.enable_app_pairs DEVELOPMENT
Test: Manual
Change-Id: I8e95f629ae2a71f1bd6cbb356f5e33233e5c2906
2023-12-11 13:09:06 +09:00
William Leshner
5836cec7ec Merge "Show Launcher's widget picker in an activity." into main 2023-12-07 19:23:58 +00:00
fbaron
eee16c7ac5 Update widget picker two pane to support foldables
Bug: 301918659
Test: WidgetPickerImageTest
Flag: ACONFIG com.android.launcher3.enable_unfolded_two_pane_picker DEVELOPMENT
Change-Id: I5beecf4f8c46235f3e89c7bd8aed65fd292883ce
2023-12-06 12:48:24 -08:00
Will Leshner
9dce65e05a Show Launcher's widget picker in an activity.
Bug: 307306823
Test: atest Launcher3Tests
Flag: NA

Change-Id: I28ef731abcdf1bd44c66366d42a135912dbcc5be
2023-12-05 13:12:05 -08:00
Himanshu Gupta
08badb3f6f Adding Private Space views to Launcher.
This CL adds the following:
* Static View Elements to be added to AllApps recycler View
* View Controller to load the above elements dynamically
* Private Space Section Decorator
* PrivateProfile Manager containing the logic related to Private Space
* Abstract UserProfileManager as the super class of Work/Private
ProfileManager

Private Space Views Figma
[link](https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?type=design&node-id=14535-111985&mode=design&t=JLz9W0O551TpzQYH-0)

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I8aa4247c78064a551e5e0d0b46d3fc033873f99d
2023-11-14 11:58:16 +00:00
Sunny Goyal
6eb256d794 Simplifying settings activity
> Removing multiple fragments
> Exposing support to select preference root
> Adding support for recreating preferences
> Moving Developer options to same fragment

Bug: 305084752
Flag: N/A
Test: Manual
Change-Id: I499be1938ef8ed58cbc7f9b0f4ad3510d4b306c8
2023-10-24 11:40:12 -07:00
Pat Manning
5643e7c047 Increase pinned taskbar height to fit tooltips.
Fix: 305706286
Flag: ACONFIG com.android.launcher3.enable_cursor_hover_states TRUNKFOOD
Test: TaskbarHoverToolTipControllerTest

Change-Id: I767947a752eae7a928d59fe332bc62b9fd5b5f37
2023-10-23 15:52:48 +01:00
Brandon Dayauon
602c43e90b Add maxWidth to pause work app button and ellipsize at the end
Width of text given by UX is 214dp so we can set the maxWidth and ellipsize at the end.

Bug: 298447370
Test: Manual photo: https://screenshot.googleplex.com/98Jnuh3TmLCtd24
Flag: n/a
Change-Id: I750a1669f94f22f60f4fb22db7d6b0ed7678c506
2023-09-27 16:23:07 +00:00
Brandon Dayauon
8e24505d09 Merge "Fix big icon when dragging Toast by isolating the previous QL fix display to SEARCH_RESULT_APP_ROW" into udc-qpr-dev am: 28ae77df37 am: f9a203c586
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24724750

Change-Id: I4e955f635773b5084b315282d373b16cff6988e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 16:22:21 +00:00
Brandon Dayauon
47000ae6e6 Fix big icon when dragging Toast by isolating the previous QL fix display to SEARCH_RESULT_APP_ROW
- Create another icon, "all_apps_predicted_row_icon" that will be the mDisplay for the predicted app row
in AllAppsList

Bug:299171695
Test: video
Before: https://drive.google.com/file/d/1HxNW0015nQHCc7eQiySf-gwsHrLs_JjR/view?usp=sharing
after: https://drive.google.com/file/d/1HyEwKI-yumILTCjglKcqovhTlRVjNGxg/view?usp=sharing - making sure that QL is fine and dragging regular Toast results are normal
Flag: N/a
Change-Id: Ie002cacb168396dbea39f79679bd6a04b80e374b
2023-09-20 14:21:10 -07:00