Commit Graph

393 Commits

Author SHA1 Message Date
Sebastián Franco b11936e0f5 Merge "Moving AllApps device profile variables to their own class" into main 2025-06-02 13:34:10 -07:00
Treehugger Robot 2f9d81a9d7 Merge "Converting FastBitmapDrawable to kotlin" into main 2025-05-30 17:38:05 -07:00
Sebastian Franco 136295f62a Moving AllApps device profile variables to their own class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I6490422d04f9f0aeaadf8271d4d11172f344660a
2025-05-30 09:56:01 -07:00
Sunny Goyal e674891dfa Converting FastBitmapDrawable to kotlin
Will be adding more functionality in followup cl, and this will make it easier

Bug: 421146818
Flag: EXEMPT refactor
Test: atest FastBitmapDrawableTest
Change-Id: I7ce3ca0dc126efe410c8b7ebec6c601666b7cb54
2025-05-30 08:52:52 -07:00
Sebastian Franco 8244449a9f Moving taskbar variables in DeviceProfile to their own class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I05ec9e15ef02096326596af4835adb706473a736
2025-05-29 11:04:06 -07:00
Toni Barzic 83b8cc19ca Support workspace cells with two-line labels
Adds `maxLineCount` attribute to CellSpec. The attribute indicates the max
number of lines of text the cell was speced to support. It's used to:
*   enable two-line labels in `BubbleTextViews` for workspace (including
    folder children) items
*   Update cell dimension calculation to inform cell vertical padding

When calculating cell content size the icon text size will be included
`maxLineCount` times, so the cell content gets centered as if it
contains `maxLineCount` lines of text. That way the icon position will
be consistent between cells with text that fits into one line, and cells
that contain two lines of text.

Adds `maxLineCountMatchesWorkspace` attribute to specify that the cell
should inherit `maxLineCount` from workspace cell spec.

Bug: 30153091
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Test: Manual

Change-Id: I150a62f427a0ad755a4746a736d9846d3bea4d2e
2025-05-21 22:04:33 +00:00
Brandon Dayauon 424d5686e4 Change PS app behavior when clicking
It should show the shortcuts upon tap and not animate like if you were to longpress to shortcuts on a regular app.

bug: 406724060
Test: manually video: https://drive.google.com/file/d/1ldodFhr00lTJ5583VxMe7PasZ0jre6wd/view?usp=sharing
Flag: android.multiuser.enable_moving_content_into_private_space
Change-Id: I5762689290b4078f9b1b4fdfd09fb2cef482744a
2025-05-09 14:59:45 -07:00
Sunny Goyal 50884dadfe Lazily loading theme icons
Theme icons are generated and stored in cache, but only loaded if requested in lookup flags
This allows to keep the memory usage low, but not loading theme icons for all the apps

Bug: 381897614
Flag: com.android.launcher3.extendible_theme_manager
Test: Updated tests
Change-Id: I494eab9c4f70670e6f5aeb864ed5287f6b9f1b9e
2025-03-31 13:07:03 -07:00
Treehugger Robot b932dea54e Merge "Implement spring animations for running state changes." into main 2025-03-26 21:06:14 -07:00
Brian Isganitis c0a8f7ea99 Implement spring animations for running state changes.
Flag: com.android.window.flags.enable_taskbar_recents_layout_transition
Fix: 402683858
Test: go/testedequals
Change-Id: Icc4a3a61b6c0997564a4dcdd8eb7768459d5f2ef
2025-03-19 14:34:13 -04:00
Brian Isganitis e8b7cd7b2e Use up-to-date hover tooltip text for recents.
Flag: EXEMPT bugfix
Fix: 402776493
Test: go/testedequals
Change-Id: I6f438ce8b3cd51beaece0cf6734876f21719bf3d
2025-03-19 14:26:25 -04:00
Brandon Dayauon 91689e89e7 Merge "Update creationFlag state only on non PSApp" into main 2025-03-11 11:46:42 -07:00
Brandon Dayauon ea388ef77b Update creationFlag state only on non PSApp
Essentially reverting original change with the current test passing now.

bug: 401529887
Test: atest BubbleTextView
Flag: EXEMPT bug fix
Change-Id: Id12672cbdf66960915c4dcf75329f0c5df21ce4c
2025-03-11 16:03:52 +00:00
Brian Isganitis 26f9468db1 Animate changes in Taskbar recents indicators.
Flag: com.android.window.flags.enable_taskbar_recents_layout_transition
Fix: 356394053
Test: go/testedequals
Change-Id: Ic018695254bbfea11469c3579e242089b00b90f5
2025-03-07 15:47:48 -05:00
Brandon Dayauon 16020c58a9 Merge changes from topics "moveContentPrivateSpace", "privateProfileMoveContent" into main
* changes:
  Move privateSpace app location to after the header
  Include multiuser flag to launcher3 dependency
2025-03-06 20:02:49 -08:00
Brandon Dayauon 5a118cb57d Move privateSpace app location to after the header
Updated bubbleTextView that defaults creationFlag to 0 thus applying the
badge on the icon when there shouldn't be a badge. Tested this by
installing the privateSpace.apk and seeing that I've successfully
removed the original install icon.

bug: 360313403
Test: manually - https://hsv.googleplex.com/4736879982280704
Flag: android.multiuser.enable_moving_content_into_private_space
Change-Id: I50a277457c9c3f78214b53e4391535a2c45dca55
2025-03-06 19:20:11 +00:00
Ana Salazar Maldonado 0a128474db Merge "Fix tokens for App Contrast Pill" into main 2025-03-03 10:55:39 -08:00
Ana Salazar Maldonado d4cce41c27 Fix tokens for App Contrast Pill
Bug: 397101795
Test: update screenshots
Flag: com.android.launcher3.enable_contrast_tiles
Change-Id: Iffe86d8b1bdebbf8ddab9dcfd6197ad24edb684f
2025-02-28 11:23:44 -08:00
Jagrut Desai 536097dec2 Update Taskbar Icon content description to include state description
This cl inlcudes: while user is in desktop mode, we will add state description(active, minimized) of each app icon to it's content description.

Test: Manual
Bug: 397555157
Flag: EXEMPT bugfix
Change-Id: Iaec18e7099108e8b076b76c637a41e29ed837265
2025-02-27 09:58:31 -08:00
Sunny Goyal fe5101d8de Simplifying icon normalization for adaptive icons
Bug: 366237794
Flag: EXEMPT refactor
Test: PResubmit and screenshot tests
Change-Id: Id21e57c9d4ba83983f27aa7988a08db3fd618ce3
2025-02-14 09:09:33 -08:00
Sunny Goyal 29f9c3d231 Merging IconShape with ThemeManager
The order of initialization for IconShape is closely tied to ThemeManager
which makes it difficult for change listeners to work. Merging these keeps
all the theming information at one place

Bug: 381897614
Test: Updated tests
Flag: EXEMPT refactor
Change-Id: Ie29efa20c3308a24be3e284c1c93ed7444b68d58
2025-02-13 22:38:01 -08:00
Ana Salazar Maldonado 4ff68edea9 Fix contrast tile measurement calculation for folders
When creating a folder, the element name begins empty. Because of this,
while layout is happening, the paddings for the text and the bubble are
not considered. Fix the condition within onMeasure to add the respective
paddings when the bubble could be drawn.

Bug: 341217082
Flag: com.android.launcher3.enable_contrast_tiles
Test: Manual, visual change
Change-Id: Ie707102fa3d4827568a9db247ea5ebf5f8e1ae0d
2025-02-12 14:31:01 -08:00
Sunny Goyal 835461a148 Updating ThemeManager to be extendible
Moving the themeController inside the iconState object

Bug: 381897614
Test: atest ThemeManagerTest
Flag: EXEMPT refactor
Change-Id: I190be0af3202e97808f5dbda30ad0ca811581881
2025-02-10 11:49:32 -08:00
Sunny Goyal dfbbebc9e3 Revert^2 "Unifying various model update callbacks into one"
72f9943f64

Change-Id: I38901714947a2b7926723ea25df4a2b8216303e4
2025-01-30 13:19:32 -08:00
Pechetty Sravani (xWF) 72f9943f64 Revert "Unifying various model update callbacks into one"
Revert submission 31445615-model-callbacks

Reason for revert: <Droidmonitor crested revert due to b/393222548. Will be verified through ABTD for stanadard investigation.>

Reverted changes: /q/submissionid:31445615-model-callbacks

Change-Id: If6893a125756e5abfbb215af377576429bb1c91b
2025-01-29 22:46:55 -08:00
Sunny Goyal 36c3112abf Unifying various model update callbacks into one
Making the BubbleTextView.applyItem stateless so that it does not depend on the order of events

Bug: 390572144
Flag: EXEMPT refactor
Test: atest LauncherBindableItemsContainerTest
      atest BubbleTextViewTest
Change-Id: Ib9c0ac6c330d6f4e08c3db5772d35787fa056b65
2025-01-28 16:03:01 -08:00
Jagrut Desai 625b78ae13 Fix Taskbar icon Accessibilty Focus on hovering
The problem: ArrowTipView was TypeAccessible hence taking a focus away from taksbar icon. The hover event was getting consumer by onHover of the listener and not getting passed to view. Upon passing the hover event we see icon scale up. We don't want both icon to scale up and show
tootip when hovering.

The Solution: pass motion event to onHoverEvent for icon view and mark ArrowTipView to be not included as Accessible View. For disabling hove
ring for taskbar icon we introduced new field to track if hovering is enabled for display type for that icon.

Test: Manual, Presubmit
Bug: 284081291
Flag: EXEMPT bugfix
Change-Id: Ie02d17856b26f82887fd178ccf0a7351416cc43e
2025-01-17 09:57:38 -08:00
Sihua Ma 4a3aa354b8 Fix work badge theme issue
The work badges are being themed even though themed icon is disabled

Test: Manual
Bug: 390031380
Flag: EXEMPT bug fix
Change-Id: Ia25a58631d416face0bd1ca2e5f086324b579834
2025-01-16 16:39:56 -08:00
Sunny Goyal c369d1e4af Adding ThemeManager as a centralized place for controlling icon theming
Bug: 381897614
Flag: EXEMPT refactor
Test: atest ThemeManagerTest

Change-Id: Ib1dafdcc303f05f78cf586741c3d35243ab06e69
2025-01-06 21:53:22 -08:00
Sunny Goyal 6d6529cff9 Merge "Converting LauncherPrefs to dagger" into main 2025-01-03 14:18:19 -08:00
Sunny Goyal e79d453bc8 Converting LauncherPrefs to dagger
Fixing ENABLE_TWOLINE_ALLAPPS_TOGGLE not properly tied to IDP:
http://recall/-/ep7WJ8pKwCEklUN5J1mAkM

Bug: 361850561
Flag: EXEMPT dagger-migration
Test: atest LauncherPrefsTest FakeLauncherPrefsTest
Change-Id: Iba63d060f4a8c2e31033fca2a4638c559c161338
2025-01-03 13:49:53 -08:00
Sunny Goyal 04b50a08f6 Fixing low res folder icon when preview changes
Also removing legacy for drawable sharing between folder-content and folder-icon, since preview now always creates new drawables

Flag: EXEMPT bugfix
Bug: 386842651
Test: atest PreviewItemManagerTest
Change-Id: Ib8e4b4d5be4fb0c9601b9d8e3cef8a29d6c77651
2024-12-30 15:47:17 -08:00
Sunny Goyal 5bf0742fc5 Fixing prediction ring color not getting updated if the icon changes
while the slot animation is running

Slot animation is only trigerred through prediction update and it sets
final ring color at that point as part of the animation. If the icon
and the color change due to some other reason (like high-res icon or
a package-update), that color is overriden by the ongoing slot animation.

Bug: 381897614
Test: Verified manually by slowing down animation
Flag: EXEMPT bugfix
Change-Id: Ia3b86330afdb91ba6ff3366e3c8057bd7ec34e5d
2024-12-27 02:54:21 -08:00
Ana Salazar Maldonado e3f421211e Fix Title padding for the contrast tile
When drawing the pill, after the pill surrounds the text, add
horizontal_padding on each side instead of round_rect_padding. This is
the correct value since it is the space between the tile and the text.

Bug: 341217082
Flag: com.android.launcher3.enable_contrast_tiles
Test: Manual, visual change
Change-Id: I48521dc05c04b561b271aa589712ed493af63189
2024-12-17 14:45:42 -08:00
Sunny Goyal 18e480838a Replacing all int lookup flags and boolean overrides with an object to make it easier to extend options
Bug: 381897614
Bug: 366237794
Flag: EXEMPT refactor
Test: atest CacheLookupFlagTest
Change-Id: Ic89d48dd1c5dc8b0a89b1898cd7b00d9c61d6513
2024-12-12 18:32:55 -08:00
Ana Salazar Maldonado 1e392d6679 Fix condition for showing contraste tile
Merge error caused the condition to only draw contrast tiles for empty
labels.

Bug: 381062398
Flag: com.android.launcher3.enable_contrast_tiles
Test: Manual, visual change
Change-Id: Id2d55d3bc16e76613faca07b0fd28ef01921f016
2024-11-27 10:00:58 -08:00
Ana Salazar Maldonado 2161355885 Avoid drawing the contrast tile on empty text
Bug: 381062398
Flag: com.android.launcher3.enable_contrast_tiles
Test: Manual, visual change
Change-Id: Ic3199d6263ac3adfd7c270de14439b0095afed1c
2024-11-26 14:52:26 -08:00
Ana Salazar Maldonado f9884f20f3 Avoid drawing the launcher pill outside the view bounds
When drawing the launcher pill, the round rect corners may extend a little
beyond the view bounds.  Add a small padding for the round rect corners around
the text view to avoid drawing out of bounds for the view.

Bug: 341217082
Flag: com.android.launcher3.enable_contrast_tiles
Test: Manual, visual change
Change-Id: I41cd2ad9909081cb66751d7f03e52f03f8ae928b
2024-11-22 11:06:14 -08:00
Ana Salazar Maldonado 3c44a029be Draw contrast tile around the text
If the BubbletTextView should have an app contrast tile, account for
some padding between the tile and the text when measuring the view, so
that the text is guaranteed to be inside of the bubble.  In a similar
way, recalculate the bounds of the tile to only surround the app title
as needed.

Bug: 341217082
Flag: com.android.launcher3.enable_contrast_tiles
Test: Manual, visual change
Change-Id: I9e8b149ade3fa4522e62b89c2332195f648b190f
2024-11-15 10:14:13 -08:00
Ana Salazar Maldonado bdbad823ce Add contrast pill to workspace apps
When the flag is enabled, allow the BubbleTextView to draw a background
pill behind the app title. Also change the color of the text to properly
ensure contrast.  The contrast pill is only enabled for workpace apps,
so attempt draw the pill only for DoubleShadowBubbleTextView elements.

Bug: 341217082
Flag: com.android.launcher3.enable_contrast_tiles
Test: Manual, visual change
Change-Id: Idce27bd8dfca4b525c762fcd0873562f31b45b8f
2024-11-12 13:36:13 -08:00
Charlie Anderson eac269ac81 Add custom talkback action for unarchiving apps
Bug: 373746865
Test: manually with Talkback
Flag: EXEMPT bugfix
Change-Id: I8c9efc029c2172e0dacd644b34f4930f50a7f8aa
2024-10-30 14:44:08 -04:00
Brian Isganitis 8018dcad35 Merge "Update recent indicators to match spec." into main 2024-10-22 19:31:48 +00:00
Brandon Dayauon 9cd3aae49a Merge "Instead of checking for locale, check language specifically." into main 2024-10-22 15:28:31 +00:00
Brian Isganitis 27e05992f6 Update recent indicators to match spec.
Does not implement any animations.

Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Fix: 356394053
Test: go/testedequals
Change-Id: If8e319b605beedd0e9b14dc37da1b5ffa12f3c9f
2024-10-21 15:04:03 -04:00
Brandon Dayauon 13b964f91d Instead of checking for locale, check language specifically.
Should be checking for english language as seen here: https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:libcore/ojluni/src/main/java/java/util/Locale.java;l=1374?q=locale%20getLanguage&sq=repo:googleplex-android%2Fplatform%2Fsuperproject%2Fmain%20b:main

This gives the language code which is what we should be checking against according to https://yaqs.corp.google.com/eng/q/4542431059247104.

bug: 373670311
Test: Manually - tried with various other "ENGLISH" languages besides US. Including Bermuda/UK and non english languages
Flag: NONE locale checking
Change-Id: Ib2eff4c9a13b74ede8575ee8d5280bbf9b9b8729
2024-10-21 11:32:13 -07:00
Charlie Anderson 91a2aad67f Prevent archived apps content description from being overridden unexpectedly
Bug: 372035896
Test: manually tested archiving/unarchiving with Talkback
Flag: EXEMPT bugfix
Change-Id: Ief7f7d176c6ed23a8d7798cf31506e0a9c8921ed
2024-10-17 17:39:59 -04:00
Sunny Goyal b619d2c297 Removing dependency on PackageInfo in IconCache
Bug: 363324203
Flag: EXEMPT bugfix
Test: atest IconCacheTest
      atest IconCacheUpdateHandler

Change-Id: I85005ef1069960a17a0f3e7265749a8ef3004172
2024-10-08 04:09:54 +00:00
Jon Miranda 9bcdb1cbe9 Fix bug where PredictedIcon circle/dot flicker.
The issue is that the PredictedIcon in the Taskbar would draw
right before we swap to the matching icon in the Hotseat.

Fixes: 362677520
Test: launch predicted app icon from hotseat, swipe to go home
Flag: EXEMPT bugfix
Change-Id: Iab8b707edf846b257c7fb7cacc9008e5c66353a7
2024-08-28 08:35:14 -07:00
Charlie Anderson 4609d53ecf Merge "For archived apps, reset icon span as soon as BubbleTextView starts unarchiving" into main 2024-08-22 20:46:25 +00:00
Charlie Anderson 1a30d3ab8c For archived apps, reset icon span as soon as BubbleTextView starts unarchiving
Bug: 350758155
Test: locally verify
Flag: com.android.launcher3.use_new_icon_for_archived_apps
Change-Id: Icc76c1bf300b2aa7883e571333bef1d33698f899
2024-08-22 10:09:09 -04:00