Commit Graph

1169 Commits

Author SHA1 Message Date
Sunny Goyal
bf49baab09 Updating launcher preview generation
> Moving classes to a separate package
> Extracting PreviewContext outside of renderer
> Always loading the sandbox instead of loading real model followed by a sandbox
> Binding LoaderTask using params so that it can be customized

Bug: 420997234
Flag: EXEMPT refactor
Test: Presubmit

Change-Id: Idf45eaba9d8309cb55b47847d8e3686cbb6c0a8e
2025-05-30 16:44:49 -07:00
Shamali Patwa
021c13c172 Extract widget picker intent extras in WidgetPickerActivity
This change refactors activity to move base activity to launcher3

This is to prepare for using it for launching widget picker for
homescreen and use compose.

Bug: 408283627
Flag: EXEMPT independent module
Test: Manual
Change-Id: I271748fb73b3691ba4d046ac8aceb51c4c8aea55
2025-05-27 17:21:31 -07:00
Stefan Andonian
cffeb99122 Only Show Folder Arrows if Mouse or Trackpad is Connected to Device
Bug: 394355070
Test: Verified correct behavior locally. See screen recording on https://buganizer.corp.google.com/issues/394355070#comment28
Flag: com.android.launcher3.enable_launcher_visual_refresh
Change-Id: I7132b892b3bd8ee3af2cdca58b6e70f3a219c8f4
2025-04-24 13:59:21 -07:00
Anushree Ganjam
87603a10e8 Introduce "qsb_container_hotseat" layout to override the existing search_container_hotseat.
This layout is no-op in AOSP.

Bug: 405166827
Test: Manual
Flag: com.android.launcher3.enable_qsb_on_hotseat
Change-Id: Ief142c3c141a672c5a4c53814b7901ff322ed053
2025-04-16 22:21:50 +00:00
Andy Wickham
16a024df71 Adds Blur and BlurFallback styles for All Apps.
Technically these styles can be used throughout Launcher, e.g.
Widget Picker and Folders, but this CL only applies it to All Apps.

At a high level, views wishing to apply transparency to show blur
should use these new attr values rather than colors directly.

When blur changes, e.g. starting or stopping battery saver, the
style is re-applied and revelant views are invalidated. For
Launcher, this is handled by DepthController, and for Taskbar it's
handled by a CrossWindowBlurListener.

Also updated the Private Space animation slightly to account for
the translucent decorators (specifically, we can't use the mask
view to cover them when blur is enabled).

Screenshots: https://drive.google.com/drive/folders/1tU472KHotgEBpT-Ec9VOBWPBf_YdVqv2?resourcekey=0-ebf7W8O6iDJ4UVMtRzTABg&usp=sharing
Private Space animations: https://drive.google.com/file/d/1h5pn8Xb17TPcbujr7uSAJNTq8kwNZoIp/view?usp=drive_link&resourcekey=0-TzpaJ16Gg8_QJctBx4oiIg
Private Space QS Tile animations: https://drive.google.com/file/d/1dCuqnqd5z2kSBEakGobMlEkMwFDBWRbJ/view?usp=drive_link&resourcekey=0-qRVFPb-a6OzaZQOf4x86Jw

Bug: 371343636
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: Ia9f581f50d1adc0830569656bdeb751deb710a9c
2025-04-15 16:42:56 -07:00
Stefan Andonian
c547affdc9 Moved PageIndicatorDots to their own ImageViews.
Previously, they were simply included in PageIndicatorDots via Canvas
drawing. This worked well to keep behavior encapsulated within
PageIndicatorDots class. But it didn't work for Accessibility Services
which require an actual view in order to focus properly.

Bug: 409629978
Test: Verified manually. See video on bug comment: https://b.corp.google.com/issues/394355070#comment23
Flag: com.android.launcher3.enable_launcher_visual_refresh
Change-Id: I212bf3dbee82e449088536fa841b02a3644df7d3
2025-04-11 16:00:12 -07:00
Shamali P
14e8c650d5 Update title font for single-app & pin widget pickers
Similar to ag/32643952 (that applied it to main picker)

Bug: 393610557
Fix: 393610557
Flag: com.android.launcher3.gsf_res
Test: on device
Change-Id: Id46985652d16a5572907d051d7a4b47fa2763809
2025-04-03 07:05:28 -07:00
Shamali Patwa
2b8a8bad0a Merge "Update fonts for widget picker" into main 2025-03-27 14:17:54 -07:00
Brandon Dayauon
5cba691b34 Merge changes from topics "fontUpdateGoogleSansFlex", "workToastFontChange" into main
* changes:
  Update personalWork tabs and work related fonts
  Change A-Z font to GSF for app icons and PS header
2025-03-25 07:55:28 -07:00
Shamali P
ab0ddca48d Update fonts for widget picker
Screenshot test will be updated when build flag is moved to staging

Bug: 393610557
Flag: com.android.launcher3.gsf_res
Test: on device
Change-Id: Ide96093555b7f4592952a2c111cc14062c8d41e7
2025-03-25 00:20:38 +00:00
Brandon Dayauon
8161b7c9ef Update personalWork tabs and work related fonts
Bug:393609630
Test - manually:
AA tab work enabled flag off: https://hsv.googleplex.com/5718615755063296
AA tab work enabled flag on: https://hsv.googleplex.com/6373838181892096
AA tab work disabled flag off: https://hsv.googleplex.com/5020660391739392
AA tab work disabled flag on: https://hsv.googleplex.com/5242306297856000
Flag: com.android.launcher3.gsf_res

Change-Id: Ic1069bc636429f63ab6d583940c14fa7f0211f61
2025-03-24 23:04:57 +00:00
Shamali Patwa
1065e89e6e Update font weights for the text in widget list header's selected states
Bug: 398765355
Flag: EXEMPT a11y bug
Test: Screenshot test
Change-Id: Idf20650b8cca70af8d9025197452d457f5dc66ae
2025-03-21 15:33:10 -07:00
Brandon Dayauon
8af853ab60 Change A-Z font to GSF for app icons and PS header
Used com.android.launcher3.gsf_res flag to control font changes in
launcher. Tested font changes manually only to App icons, PS header, and
PS lock text.

bug:393609630
Test: manually:
AA and flag Off: https://hsv.googleplex.com/6005345892696064
AA and flag On: https://hsv.googleplex.com/5713302612082688
AA and flag Off w/ TwoLine: https://hsv.googleplex.com/6604407931142144
AA and flag On w/ TwoLine: https://hsv.googleplex.com/5006326877913088
PS and flag off: https://hsv.googleplex.com/6253491923189760
PS and flag on: https://hsv.googleplex.com/4909373317971968
Flag: com.android.launcher3.gsf_res

Change-Id: Icae71ae648340ac566a908648eae14985b6aa4d3
2025-03-18 22:24:48 +00:00
Brandon Dayauon
3c68091e0f Merge "Apply shadow treatment on scheduler like the FAB" into main 2025-03-12 07:44:24 -07:00
Brandon Dayauon
8940dd84f8 Apply shadow treatment on scheduler like the FAB
bug: 401624167
Test: manually -
before: https://drive.google.com/file/d/1wArpgXEk3yr6kBWs-ImFaTtWHnspvhIj/view?usp=sharing
after: https://drive.google.com/file/d/1E1Z-R2noq51qwrSSj-EDXK9PnSPI4ruQ/view?usp=sharing
Flag: EXEMPT bug fix
Change-Id: I5cf3b391e4afa4443a1b3716b140bb789bb3b321
2025-03-11 17:38:09 +00:00
Brandon Dayauon
2a699effce Update personal/work tab content description
Bug: 392685322
Test: manually
Flag: EXEMPT update content description
Change-Id: I7642e5f1c8484c18561958455e676e7f24b262ab
2025-03-03 19:19:45 +00:00
Brandon Dayauon
302f75ce69 Log work scheduler animation jank
bug: 392726070
Test: manual - see bug comment that shows capture perfetto
Flag: com.android.launcher3.work_scheduler_in_work_profile
Change-Id: Iebf873229a86b53062a91a58bec173c46c964ed5
2025-02-03 23:58:42 +00:00
Sihua Ma
2bad402275 Change home screen state description to manifest page change
Bug: 383247157
Test: Manual
Flag: EXEMPT bug fix
Change-Id: I1c2d3aa90d2b4ee9a1beaa4fbe7db57e79ae49dc
2025-01-03 00:00:48 +00:00
Brandon Dayauon
4973c18fe4 Make work edu close button not say "Close, Image" in a11y.
Moved content description to the bigger container since that's what takes the touch input anyways.
Now says "Close, double click to activate"

bug: 383945600
Test: manually
Flag: EXEMPT bug fix
Change-Id: Ic35602022f057db59f683c5bd07a3d16fa4983f2
2024-12-23 14:02:14 -08:00
Brandon Dayauon
9f1b9d1b13 Fix close button in workEDU card not 48dp.
Can use insets to make it appear the same small visual but have a 48dp tap target. Since delegating the touch to the 48dp,
we can make the imageButton clickable to false as it's instead being used by the 48dp frame.

- since there's no rtl catering for insets insets must have equal left and right values.
   * this means to reduce the end margin of the text to be given to the LEFT inset of the inset_rounded_action_button
   * reduce end margin of the linearlayout to be given to the right inset of the drawable.

bug:379794419
Test manually photos:
beforeRTL:https://drive.google.com/file/d/1-DzcjOTywgk6SFjfCX7AVnmfqsIfa1lh/view?usp=sharing
afterRTL:https://drive.google.com/file/d/1UERlZ7XdoF0NhFuQE-oMulqgW9sDq9cy/view?usp=sharing
before:https://drive.google.com/file/d/1h5_Ljsx1rLyKum1PK7IRwD14ps2SPKC3/view?usp=sharing
after:https://drive.google.com/file/d/1b_8rgrC8WlDIdQuO7gOXS0MDNCISfxWr/view?usp=sharing
Flag: EXEMPT bug fix

Change-Id: I017d4d34ef6e42fa49543c5f787063b061c382dc
2024-11-27 14:02:31 -08:00
Marcelo Arteiro
bc02103a6a Migrate materialColor* attributes into colors
TLDR:
* This change should not break anything or change any color.
* Simplifies theming and styling while improving developer experience.
* With this  developers can often skip styling for color entirely, while ensuring consistency and preventing accidental overrides.

Bug: 374273611
Test: presubmit
Flag: EXEMPT bugfix
Change-Id: Id19038078e83c73847b1a7c686c3a3df1ecccac2
2024-11-21 13:08:11 +00:00
Brandon Dayauon
74842f0c16 Merge "Fix work tab accessbility issues." into main 2024-11-19 18:44:14 +00:00
Shamali Patwa
797b636491 Merge "Add container around the previews in the pin widget sheet." into main 2024-11-19 00:02:47 +00:00
Brandon Dayauon
df5e51ce34 Fix work tab accessbility issues.
The issue is that the accessibility scanner says tap target is 46dp rather than 48dp because of the 1dp padding that is added
to the viewgroup. Rather, we should delegate that 1dp to the insets of the drawable instead.

bug: 379222957
Test manually, photos:
beforeAccessibilityscanner: https://drive.google.com/file/d/1-XssMfXstpKQk5Ve7l5UCPFORtCkYluH/view?usp=sharing
before:https://drive.google.com/file/d/1rip4gIKpoOw-cCNroEjrpcJ9TMSthHhB/view?usp=sharing
after: https://drive.google.com/file/d/1dOh4yxEAPBG_pGn92yUGizTCLTTW1w2K/view?usp=sharing
Flag: NONE bug fix changing dp

Change-Id: I5ac69e5d92bbbbc3617e30801316eb04d65ace7a
2024-11-18 15:16:41 -08:00
Shamali P
9f80ecfc83 Add container around the previews in the pin widget sheet.
We did it in past for app-specific picker. Updating the same for the
pin sheet - verified change with Jane Park.

Bug: 379675391
Flag: EXEMPT BUGFIX
Test: Verified with pin sheet and wallpaper colors
Change-Id: I37e7ac93757e95e1940567e800a376256e0b8ed8
2024-11-18 20:41:12 +00:00
Shamali P
1ce33c8537 Make overscroll in recommendation section limit within its bounds.
Previously, it stretched the parent container, which on close
 observation looked odd.

Bug: 360061549
Flag: EXEMPT BUGFIX
Test: Opened picker and tested that stretch doesn't overflow.
Change-Id: I531b91131f7f86f37df21ab0f67a778c4ae7843f
2024-11-15 23:34:34 +00:00
Brandon Dayauon
7a609d8f1b Merge "Add elevation to workFAB to create a shadow" into main 2024-11-13 17:50:28 +00:00
Brandon Dayauon
df14fffa54 Add elevation to workFAB to create a shadow
Unable to use md.sys.elevation.level3 but codesearched and
looked it up that this is equivalent to 6dp.

bug: 375597648
Test:
before: https://drive.google.com/file/d/1fp2l5p4wW2Gf3duC2qQ_brQ-xY0bTnOF/view?usp=sharing
after: https://drive.google.com/file/d/19xSAnWJURuwrjhMiywfjNT2vD0G2GoFP/view?usp=sharing
Flag: NONE adding elevation
Change-Id: I484609b4dc817b6d76701f60da51c3ec89bc8755
2024-11-12 15:33:10 -08:00
Shamali P
697dcf44ac Maintain selected or last header on clicking "Show all" button
Bug: 356127021
Test: Manual and tapl test
Flag: com.android.launcher3.enable_tiered_widgets_by_default_in_picker
Change-Id: I762695f9999e5ea4c722dbedde6d7efabd3ab0cb
2024-11-12 22:31:14 +00:00
Shamali P
d39c31da74 Adjust the bottom padding padding on the left pane in picker
Right now, with 24dp bottom padding, the last item is partially visible
behind that padding. And makes the touch target for last item small.
This is more visible when show all button ends up there.

Bug: 356127021
Flag: com.android.launcher3.enable_tiered_widgets_by_default_in_picker
Test: Unit tests
Change-Id: If2743f73bec0ea244fef7eb1fa3efc903876914b
2024-11-07 14:02:02 +00:00
Shamali P
1c173e96be Define the list entry and view holder for the view all button
Child cl updates the adapter & picker to use this list entry type.

Bug: 356127021
Flag: com.android.launcher3.enable_tiered_widgets_by_default_in_picker
Test: Manual
Change-Id: I69e82fb7df24270dac4cc0afd003e98247280552
2024-11-07 14:01:29 +00:00
Shamali P
8694df5f59 Move search widgets list view besides the personal/work lists
With the sticky header removed from two pane, the search results list
should to be aligned similar to the work / personal lists relative
to the search bar container.

Bug: N/A
Test: Manual
Flag: EXEMPT cleanup
Change-Id: I5cca57ca1861d3135d3b72fe84f75607555ea5ed
2024-11-07 14:01:17 +00:00
Brandon Dayauon
bfd02bb36a Implement the work scheduler view and update colors of FAB
Update colors of the FAB to spec: https://www.figma.com/design/uMzPkNMZpb7EyfHDo8usIa/V-%E2%80%A2-Toast-Butter?node-id=3784-112229&node-type=instance&m=dev
Exported the brief case icon from figma since it is not available on go/icons.
Color of the brief case icon is onPrimary.
Have place holder string in launcher but implement the actual string in NL.

bug:361589193
Test - manual: video: https://drive.google.com/file/d/1CIs8qdtV1jUvbq57CcgAXDBPPHHX5CKJ/view?usp=sharing
Flag: com.android.launcher3.work_scheduler_in_work_profile

Change-Id: Ia98e9c4394f6ddfa7009653034929f9afbfeac8c
2024-11-06 09:48:26 -08:00
Brandon Dayauon
0b2acd6516 Merge changes from topic "AddWorkSchedulerInWorkProfileFlag" into main
* changes:
  Add work_scheduler_in_work_profile flag.
  Remove layoutTransitions for current FAB and use custom animation.
2024-10-29 20:17:02 +00:00
Brandon Dayauon
a7123472ce Remove layoutTransitions for current FAB and use custom animation.
Have background contain left and right padding of 16dp.
That way upon collapse, its easier to animate so that every other view's space but the icon is removed.
Spec when expanded/collapsed: https://www.figma.com/design/uMzPkNMZpb7EyfHDo8usIa/V-%E2%80%A2-Toast-Butter?node-id=2839-365095&node-type=text&m=dev

bug: 361589193
Test: manually - video:https://drive.google.com/file/d/1K7HCpayZBa_oo9p3XV10QQX4miTy_d3q/view?usp=sharing
withRTL: https://drive.google.com/file/d/1NfUEyEvzjfQamujv4EqLNBqB47mPNG1Y/view?usp=sharing
Flag: NONE just changing expandedFAB to use custom animations from layoutTransition

Change-Id: I7948633850a1010175eb4f0248daff22cf2f2c87
2024-10-29 09:50:13 -07:00
Shamali P
be18ff2b7d Fix issue that items were invisible in 2-pane picker with talkback.
Bug: 371508727
Test: With talkback & screenshot tests
Flag: EXEMPT BUGFIX
Change-Id: Id8419e51bf20a38f203ce2422bae6290babcd63e
2024-10-25 23:00:36 +00:00
Treehugger Robot
1160d080f4 Merge "Fix cropped folder name text in arabic" into main 2024-10-09 19:35:13 +00:00
Liam Lee Pong Lam
644aad280b Merge "Implement focus state on personal/work tab button" into main 2024-10-04 20:33:00 +00:00
Shamali P
adc171b313 Move padding from parent to WidgetPagedView and siblings in 2-pane pkr
WidgetPagedView seems to rely on padding to position it such that
 talkback doesn't focus on it before sticky header.

Bug: 348107507
Test: With talkback
Flag: EXEMPT bugfix

Change-Id: I2fcdc0cbf027a7a8c1bee104f85a61f700faf776
2024-10-02 16:55:59 +00:00
Toni Barzic
2c72b9bd1a Fix cropped folder name text in arabic
Centralize the folder name within folder footer using gravity property
instead of adding padding to the folder name view. Padding as calculated
was cropping the folder name to the text line height, which was
insuficient in some cases, as eveidenced by the linked bug.

Bug: b/358006967
Test: Open a folder on home screen with arabic system language.
      Verify that the folder name displays correctly.
Flag: EXEMPT bugfix

Change-Id: I4436c224f7f6541f447e3a5354ff870cf4d50698
2024-09-26 04:57:45 +00:00
Liam, Lee Pong Lam
d4488bfd72 Implement focus state on personal/work tab button
figma: https://www.figma.com/design/ccBEWEnusF6lE4edgCw7bG/Android-Interactions-Library?node-id=6315-109525&node-type=frame&t=SBKtwrMnJ0ppeUxa-0
result: https://photos.app.goo.gl/LEWF6tsKz3BXXWuv5
hsv: https://hsv.googleplex.com/4794951907934208

Bug: 327430110
Flag: EXEMPT bugfix
Test: Manual
Change-Id: Ia953c92f30cbd65a83f8e60e8bb2d4b17073b369
2024-09-25 20:34:49 +00:00
Toni Barzic
667fe050ff Make widget sheet layout container not focusable
SpringRelativeLayout views in widgets sheets UI are non-actionable
containers, and as such they would ideally not receive focus. They were
made focusable as a workaround for an issue where back action was no-op
when widget search text box was focused, and there were no other
focusable elements in the UI b/197129170.
WidgetSearchBarController handles back action by clearing
focus, which ends up refocusing the search text box. This CL, removes
this back action override, and let's back action through - it will end
up being handled by `WidgetsFullSheet.onBackInvoked` which resets the
search.

Bug: 365120544
Test: Manual - verified back action with widget search active (and in
      case with no results) in emulator
Flag: EXEMPT bugfix

Change-Id: I1fed37372521947b7d4644047807dc451b0119a4
2024-09-11 18:50:56 +00:00
Sunny Goyal
42becd041b Cleanup unused workspacePageIndicator
Fix: 270395278
Flag: NONE removing dead code
Test: verify everything still works the same
Change-Id: Id0eda5c5994c3323a8d16900678fbd7b39911b62
2024-08-27 12:23:21 -07:00
Brandon Dayauon
412821fadf Merge "Create an alpha letter scroller" into main 2024-08-26 20:21:17 +00:00
Brandon Dayauon
1f8f88696b Create an alpha letter scroller
- The function used is a raised cosine function to determine the sections to animate.

Tested flag: adb shell device_config put launcher com.android.launcher3.letter_fast_scroller true
Based on recent figmaspec, size of selected letter is 28dp and regular is 20dp. That means scaling should be 28/20.
Colors are:
onSurface for letter
surfaceContainer for background.
Figma shows selected colors are materialColorOnSecondary

bug:358673724
Test manually: https://drive.google.com/file/d/1gvJd5KoK8X_Sv8jXg1cZ65R4AuqHuvcd/view?usp=sharing
Flag: com.android.launcher3.letter_fast_scroller

Change-Id: Ia86eb0e8c41bc043fda3c44aeaf59e204429f337
2024-08-26 11:21:26 -07:00
Shamali P
8c965c67dc Adjust tap target of the profile tabs in picker
Uses insets on background drawable to maintain visual size.

Bug: 360245807
Test: Accessibility scanner
Flag: EXEMPT bugfix
Change-Id: I1fbc7c2c782a1e331dd1ba77b0a3bf8aad277792
2024-08-20 00:42:32 +00:00
Brandon Dayauon
4f7d4c2975 Set maxLines for private space header to 1.
This is an issue for large font/display that in the arabic language will clip the Private text.

bug: 357942579
Test manually: https://drive.google.com/file/d/1FFZpXmfwKlRG7mvmSCtc1dtjwUjuXjfW/view?usp=sharing
Flag: NONE bugix

Change-Id: I22943237e10b502edb6aae6845fbe6027fda1323
2024-08-14 13:47:37 -07:00
Brandon Dayauon
085ee66233 Remove padding on background and icon.
This padding causes the x to look pointy.

bug:342246204
Test:
before padding:https://screenshot.googleplex.com/GU8ZKEcGPH7DaAD
after padding: https://screenshot.googleplex.com/aRGtiKMQ8jyMWsw
Flag: NONE Padding change

Change-Id: I910914b742bfbb5bf0122ebb1b950ce95c43e9ed
2024-07-22 11:26:11 -07:00
Marcelo Arteiro
f38d98d1a6 Align color resources in launcher projects.
This is an effort to align/unify color usage across all launcher projects and the system itself.
This fix recreates all dynamic color attributes present in the OS since many launcher areas cannot access private attributes.
It is recomemnded to use these new local attributes in all launcher areas and avoid creating new color resources when these can be used directly.

Bug: 352690172
Test: Presubmits
Flag: EXEMPT bugfix
Change-Id: Ic36b8bf70ee37f2fdd32e459e66f0e2d001d6ba2
2024-07-19 14:22:21 +00:00
Shamali Patwa
1407aeca8d Merge changes from topic "ls-picker-filter" into main
* changes:
  Consider the widget option menu choice in search results
  Show only filtered / default widgets in standalone activity by default
  Add a 3 dot vertical menu and styles (child cl makes it functional)
  Set default widgets and all widgets separately from standalone activity
  Update the widget picker activity theme for popup menus styling
2024-07-18 14:14:42 +00:00