Commit Graph

1141 Commits

Author SHA1 Message Date
MrSluffy
eeb7416bfe Merge branch 'android15-release' into merge-aosp15 2024-09-14 17:29:57 +08:00
Brandon Dayauon
736527a127 Make PrivateSpaceSettingsButton instead of having just the imageView.
This way we can keep the click listener in this PrivateSpaceSettingsButton.java class.
- Moved itemInfo creation to PrivateSpaceSettingsButton and created a test class

bug: 341053089
Test: manually - presubmit video: https://drive.google.com/file/d/1_TCGrILvwmMpxbgIcbOcpB2AxeBJbyNf/view?usp=sharing
Flag: Aconfig com.android.launcher3.enable_private_space Nextfood
Change-Id: I79cd319274f4445dd00bc257be81728360d09684
2024-05-31 17:05:13 -07:00
Brandon Dayauon
ae0e957eea Update private space divider thickness and padding per spec.
Thickness (height) is 2dp.
Padding above and below the divider is 32dp.

bug: 340307977
test manually:
before: https://drive.google.com/file/d/1H364XUILz3gTLOENQL5zQBOELcza7YBk/view?usp=sharing
after: https://drive.google.com/file/d/1HCsnj2s9TwlzIjKL1aHbBqO15nkPoOLj/view?usp=sharing
after vertical padding: https://drive.google.com/file/d/1HS1SFVj9RfvuxHPGyk0PH5dGQum3spqe/view?usp=sharing
Flag: None

Change-Id: I64e9a228e9095449c4ef5f7680d92d234ab96f9f
2024-05-20 16:24:14 -07:00
Oli Thompson
9305badf5a Merge "Show edu card when managed profile removed" into main 2024-05-20 10:38:19 +00:00
Oli Thompson
3ea1acb8ca Show edu card when managed profile removed
Reset the work edu card bit so the edu card shows if the managed profile is removed

Also remove padding from the close button so it doesn't clip. screenshot https://screenshot.googleplex.com/96Yc6yExZ57btxG

Bug: 315449027
Bug: 293642345
Test: manual
Flag: NONE
Change-Id: I60cfc0c258d28a6674aec41862c1770550a14955
2024-05-15 14:19:03 +00:00
Brandon Dayauon
1d3ddb877d Add floatingMaskView when animating to mimic bottom container.
- On expand, we add the floating mask view and translate it out at the end.
- On collapse, we translate off the mask view in the beginning once the floating mask view is added
so that we can translate it in before the actual collapsing part of the animation

bug:339850589
Test manually:
https://drive.google.com/file/d/1YNc3vq9Cb5BcbcPOHp8H3lhe6KmYBdLI/view?usp=sharing
Flag:ACONFIG com.android.launcher3.private_space_floating_mask_view STAGING

Change-Id: I7c303e6629d83408bd314886fe10113246e44dcb
2024-05-13 11:08:05 -07:00
Willie Koomson
49e364cd0b Remove shadow on Add button
Set android:stateListAnimator to @null to remove default shadow on Add
button.

Bug: 333736273
Test: manual, check shadow on device
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: Ifa66801963e69582935806eb8a39dcfe624ffdc7
2024-05-06 22:26:24 +00:00
Willie Koomson
1156e8419a Hide add button text if cell is too narrow
If the WidgetCell is not wide enough, hide the add button text and show
an icon-only plus button.

Bug: 333735974
Test: manual
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: Ieb0b2e679bd4a5785a0f7f01e177ad412a355ce7
2024-05-02 19:55:41 +00:00
Willie Koomson
61dc97ecb2 Update font settings to match POR
Updates font color, size, weight, and line height for text in the widget
picker to match POR and pass a11y test.

Bug: 317948371
Flag: NONE
Test: Accessibility Scanner contrast test
Change-Id: I3c7676c507b81a616876206681972ebb9fefd0c3
2024-05-02 19:55:33 +00:00
SuperDragonXD
4b4d678e85 Fix errors 2024-04-29 16:44:38 +08:00
Willie Koomson
21379bfbbc Merge "Remove widget education tip dialog" into main 2024-04-26 20:23:21 +00:00
Willie Koomson
d731ba2ff1 Remove widget education tip dialog
This change removes the widget education tip dialog, and the arrow
tip view. These are no longer needed now that taps are handled by
showing an add button.

Bug: 335318980
Test: `pm clear com.google.android.apps.nexuslauncher` and open widget
 picker
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: I9b24a41604880f5f94939c02b94f1a9f6a6c83d5
2024-04-25 22:56:36 +00:00
Himanshu Gupta
578f1a474e Merge "Fix Accessbility bugs for PS." into main 2024-04-25 17:03:54 +00:00
Himanshu Gupta
42e3196011 Fix Accessbility bugs for PS.
This Cl contains:
1. Alt text for Lock/Unlock button as per state.
2. Alt text for Header when Locked.
3. Removing Header from accessibility target when unlocked.

Bug: 328024119
Test: Manual
Flag: NA
Change-Id: I791176afdae4fc6eb9387080aa036c1aed2a03a9
2024-04-25 11:57:53 +01:00
Shamali Patwa
587c3ce049 Merge changes from topic "bottomsheet-with-insets" into main
* changes:
  Align the margins between handle, text, and container with main picker.
  Update the app-specific picker to have a container like the main picker
2024-04-24 21:16:28 +00:00
Shamali P
d4997cf063 Align the margins between handle, text, and container with main picker.
Also aligns style to match main picker which doesn't set header style.

Requested by Jane / UX.

Bug: 328812171
Flag: N/A
Test: Manual - need to build a SS test for this opened - 336284716
Change-Id: I15fb82e807fdaa55bbfaaf73872273d1d6e84f97
2024-04-24 19:15:11 +00:00
Shamali P
9478a40898 Update the app-specific picker to have a container like the main picker
This is to ensure widgets are displayed with same container across the
two pickers.

* http://screencast/cast/NDYxNjMzNDExNjY1MTAwOHwwMTBlYzkwZC0wNg
* http://screencast/cast/NjY1NzAyNzY5NzgwMzI2NHwyYTg3ZWIzNS0wNw
* http://screencast/cast/NTYyMzcwMTc4NDQ5NDA4MHw3Y2JlZDEwZS04Mw

Bug: 328812171
Flag: N/A
Test: Manual - need to build a SS test for this opened - 336284716
Change-Id: I42b743b99cf6f47b7bade57de01b130df78ac1e9
2024-04-24 19:14:50 +00:00
Shamali P
3132947812 Limit number of items grouped on a row to 3.
With shortcuts this allows for more space to display two word title
below without ellipsizing it. (screen/4pJvcFFKJhooqZU)

Also let widget description show upto 3 lines to more of it to show
when stacked (screen/7xv8ng4H7iRLU79)

Bug: N/A
Flag: N/A
Test: Screenshot
Change-Id: Ia4e30f943f602b811e607d9cb52152f78cdc20e5
2024-04-24 19:14:23 +00:00
Himanshu Gupta
faafb3a19a Fix horizontal spacing in PS Header
1. Removes padding between settings cog and lock button,
as the insets already provide the required padding.
2. Reduces the lock button margin from left to accomodate
the inbuilt inset in the button.

Fix: 336510036
Test: Verified on device.
Flag: NA
Change-Id: I077097c7beb2cc8fe14f4367c66ca4e1ad4270d0
2024-04-23 15:28:01 +01:00
Shamali Patwa
a80e199798 Merge "Keep rounded corners while scrolling in right pane & fix scrollbar size." into main 2024-04-19 22:43:39 +00:00
Brandon Dayauon
24db282ed4 Merge changes Ied2efcf6,I07579635 into main
* changes:
  Polish workFAB with updated spec.
  Fix workFAB alignment.
2024-04-19 00:59:19 +00:00
Shamali P
5f7eb1f2ee Keep rounded corners while scrolling in right pane & fix scrollbar size.
[demo](http://screencast/api/gif/NDU4MTQ5ODE3Mzc4NDA2NHxhYmUzMDcxNy04MA/image)

Bug: 333734241
Test: screencast
Flag: N/A
Change-Id: Ifb522ca2c0a1092bf41c630e336b19c81d504c26
2024-04-18 22:32:30 +00:00
Brandon Dayauon
baf5f6ec3d Polish workFAB with updated spec.
Updating the workFAB to the new spec: https://docs.google.com/presentation/d/1tTODboxGqJ3ypEyYnr0-bUpSXcvX1cl6Sj8y0Nut5hU/edit?resourcekey=0-9GT8EJG43kTT4aKPWVWRig#slide=id.g2c8f3ae8e02_0_0
Have the background endPadding to be 4 and icon have an endMargin of 12 and the text endMargin of 16.
So that when the text is disappeared, the space between the icon and the right bound is 16dp to spec.

bug:332761814
Test manually:
after LTR expanded:https://drive.google.com/file/d/1NZQW0CF9VFZBoM3673LFiUknqW2nf4r8/view?usp=sharing
after LTR collapsed: https://drive.google.com/file/d/1NRpdTuYQntSs5-yeRL1fJIJy2ETDOYLM/view?usp=sharing
after RTL collapsed: https://drive.google.com/file/d/1NE51MIsS5Fk0DwAuzCehEQzTa42OGj_o/view?usp=sharing
after RTL expanded: https://drive.google.com/file/d/1NPgiPfzw3DOa_xbB_TtlwK-G1Y5WCi53/view?usp=sharing
Flag:None

Change-Id: Ied2efcf6b1bd19c191d80e47bae4f8f6e3794803
2024-04-18 14:40:42 -07:00
Brandon Dayauon
cf0ae01a51 Private space header to support RTL
bug:335658774
Test manually:
before: https://drive.google.com/file/d/1N8kFl28OhCJ7kTTo8VK74x-Mvaqi8GJ4/view?usp=sharing
after:https://drive.google.com/file/d/1N6AyVXcOSA48NveklIeqypueu7WLfP0V/view?usp=sharing
Flag: ACONFIG com.android.launcher3.enable_private_space TRUNKFOOD

Change-Id: I1c80e33f84251d42cd5821735457548de41db40d
2024-04-18 09:50:39 -07:00
Sunny Goyal
4a22ed81ea Using resource overrides for PluginManager instead of code-swap
Bug: 330920490
Test: Presubmit
Flag: None
Change-Id: Ib1cd50f95873928b9ce104e8e95d21f1dca9c6e3
2024-04-12 11:38:32 -07:00
Sunny Goyal
8049369af8 Freezing legacy feature flags
Legacy feature flags will be locked to their current values in code.
All new feature development should use aconfig flags

Bug: 332588958
Flag: None
Test: Presubmit
Change-Id: Ie72dd8276b7135620de279835d6721a34f82ede4
2024-04-09 15:26:07 -07:00
Sunny Goyal
8ecbaa422f Merge "Moving various nav-bar configs out of feature flags" into main 2024-04-09 05:45:21 +00:00
Sunny Goyal
89931316a2 Moving various nav-bar configs out of feature flags
Bug: 332588958
Test: Presubmit
Flag: None
Change-Id: Ia4dc5b69bcf4d461e3444b9e37bb7334bb74aae4
2024-04-08 16:54:04 -07:00
Shamali P
11aa56e48f Add maxlines bounds to the category title.
- So far, none of the translations exceeded 1-line, but setting maxlines
to avoid it to happen in future.

* http://screen/35PYFHV5SCeBhqC (at max font size)

Bug: N/A
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_suggestions TEAMFOOD
Test: Manual - see videos.
Change-Id: I263706a5d85dd4a37a4150abd58222283d5e039a
2024-04-08 18:23:25 +00:00
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