Commit Graph

358 Commits

Author SHA1 Message Date
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
Jon Miranda 7d783ff70f Add animation for the predicted icon ring
Animation is modeled after the notification dot animation.

- This avoids the ring jumping in after swiping up to home to
  a predicted app.
- Also decreased the amount of time the icon has to fade out so
  that it shows up less during the animation.

Fixes: 360115794
Test: open predicted app from hotseat, swipe up to return home
Flag: EXEMPT bugfix
Change-Id: I59659610eb2e9f375a408d553bb4aa80947a28c4
2024-08-21 17:30:19 +00:00
Charlie Anderson 99147f53e0 Use DoubleShadowIconDrawable to draw shadow behind archived cloud icon
- Refactor Launcher3 ShadowInfo out of DoubleShadowBubbleTextView

Bug: 350758155
Test: locally verified + screenshot test
Flag: com.android.launcher3.use_new_icon_for_archived_apps
Change-Id: I8e5e5936296fafbfbf3caf80a936ca1038c125e3
2024-08-07 11:56:33 -04:00
Charlie Anderson 6b8e362247 Adds new bugfix flag for using new app archiving icon
Flag: com.android.launcher3.use_new_icon_for_archived_apps
Bug: 350758155
Test: locally
Change-Id: I7bacbacd85a8216e7975665e6d3c1ab98ed23235
2024-08-05 00:37:28 -04:00
Charlie Anderson fe23e711fd Reapply "Handles Bold Text setting for inline icon by providing bolded cloud icon"
This reverts commit 00fb1adab4.
Also fixes test applyIconAndLabel_setsImageSpan_whenInactiveArchivedApp.

Bug: 350758155
Fixes: 356166053
Test: unit test
Flag: com.android.launcher3.enable_new_archiving_icon

Change-Id: I93f2ac47dc3a8fa81d59e0f089385d2b3fe93306
2024-08-02 17:26:02 +00:00
Charlie Anderson 00fb1adab4 Revert "Handles Bold Text setting for inline icon by providing bolded cloud icon"
This reverts commit 114e84908f.

Reason for revert: b/356166053

Change-Id: I30dfbc5da1caecd89b4b23aafe4de8e9efede6a0
2024-07-31 14:08:16 +00:00
Charlie Anderson 114e84908f Handles Bold Text setting for inline icon by providing bolded cloud icon
Bug: 350758155
Test: locally tested + unit tests
Flag: com.android.launcher3.enable_new_archiving_icon

Change-Id: I6e1fccbb7c8cb87a7e2675a60b05bf0cb402acf2
2024-07-26 11:17:39 -04:00
Charlie Anderson d5acd6a016 Add new Cloud archived app icon and support for inline icons for BubbleTextView
- Can now set start drawable for BubbleTextView title with setTextWithStartIcon()
 - App Archiving cloud overlay icon will be disabled when flag on

Bug: 350758155
Test: locally tested B&R with pre-archiving
Flag: com.android.launcher3.enable_new_archiving_icon

Change-Id: I4d395a7ea7dc5ee11259f897d45b83eabdabb766
2024-07-16 19:39:03 -04:00
Tony Wickham c5995c8f6d Load and draw Recent/Running tasks that aren't in Hotseat
- Re-support GroupTask as a tag on TaskbarView BubbleTextViews
- Can tap to launch (startActivityFromRecents) or drag and drop
- Move divider when enable_recents_in_taskbar is true

Behavior:
- While in Desktop mode, all open tasks show up in TaskbarView,
  either in the Hotseat section or the Running apps section
  past the divider. Each one also has a running line indicator.
- While in Fullscreen mode, up to 2 Recent apps that are not
  part of Hotseat will be added to the right of the divider.

Flag: com.android.launcher3.enable_recents_in_taskbar
Test: TaskbarRecentAppsControllerTest
Bug: 315354060
Change-Id: I2e2870cca434b51f276a701860edb32069109159
2024-06-19 00:27:30 +00:00
Pierre Barbier de Reuille f60dd5471c Update desktop mode to identify minimized tasks
When a task is minimised, it becomes invisible but is still running.
WMShell now signals to the launcher when a task's visibility changes.
The task bar takes the visibility into account to know if a running task
is, in fact, minimised.

Test: atest NexusLauncherTests:DesktopTaskbarRunningAppsControllerTest
Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Bug: 333872717
Change-Id: Iaff6b1240d354bb3c4de8e4884948acf9bf40112
2024-05-23 20:59:16 +01:00
Gustav Sennton 56f9df0620 Merge "[Desktop Mode] Show indicators under Taskbar app icons for running apps" into main 2024-04-29 08:28:28 +00:00
Gustav Sennton 52a8b7e24b [Desktop Mode] Show indicators under Taskbar app icons for running apps
In Desktop Mode we show running Desktop apps in the Taskbar. With this
change we also show an indicator under the app icon for each such
running app.

Bug: 332504528
Test: manual
Test: DesktopTaskbarRunningAppsControllerTest
Flag: ACONFIG com.android.window.flags.Flags.enableDesktopWindowingTaskbarRunningApps DEVELOPMENT
Change-Id: If0906dab8ad0bd8a78d93a4e99db47550e763bed
2024-04-26 15:29:00 +00:00
Sunny Goyal 638a687fc8 Converting IconShape to mainThreadInitializedObject instead of
keeping it a process static

Bug: 297950111
Flag: None
Test: Presubmit
Change-Id: Id66100e0cb300659c6017c287eb38ab04290477b
2024-04-25 15:56:30 -07:00
Jakob Schneider 476be7bcd4 Fix issue where progress around icons is not shown
Bug: 332777576
Change-Id: Id53d0e35c38311e6ef65146321c6aa523c8820da
2024-04-04 10:55:30 +00:00
Jeremy Sim da4ba9336e Merge "Reparent folders and app pairs" into main 2024-03-30 03:06:44 +00:00
Jeremy Sim 742630c2f8 Reparent folders and app pairs
Previously, app pairs and folders shared a common data model, FolderInfo. Now we need to separate them, so a new type, CollectionInfo, will serve as the parent of both types.

Bug: 315731527
Fixes: 326664798
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, unit tests to follow
Change-Id: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
2024-03-29 15:39:28 -07:00
Jagrut Desai 112691f2f0 Merge "Customize BubbleTextView for Taskbar Icon Size" into main 2024-03-27 16:46:16 +00:00
Jagrut Desai 8fbdf51d18 Customize BubbleTextView for Taskbar Icon Size
Test: Presubmit, manual
Flag: NONE
Bug: 322734668
Change-Id: I50503a45cdf43abed942a846c2517f49124c75e5
2024-03-26 11:31:36 -07:00
Jeremy Sim b37faec287 Refactor how app pair icons draw
This changes (and cleans up) the way app pair icons are composed. Previously, the background and 2 icons were drawn individually and separately onto the canvas. Now, they are composed into a combined drawable first. This also allows the full icon drawable to be requested by external functions (which will be needed for display app pairs in folder previews).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Visually confirmed that app pairs loooks the same in all scenarios: rotation, disabled, themed, taskbar, pinned taskbar. Screenshot test to follow.
Change-Id: I7242e0c525ef578a54a06fb9137fcfc42c6f0e86
2024-03-25 16:43:40 -07:00
Brandon Dayauon 69aa9a07ee Merge "Disable two line text legacy flag." into main 2024-03-14 15:11:13 +00:00
Jakob Schneider 57edffece5 Merge "Improve "isActiveArchive" check by moving it a bit earlier into the method." into main 2024-03-11 16:43:50 +00:00
Brandon Dayauon 68c18236ad Disable two line text legacy flag.
Will now repurpose the twolinetoggle flag to be the flag that will
make twoline text enabled/disabled.

bug: 316027081
Test: presubmit
manually: https://screenshot.googleplex.com/BsZGCm7DrTZLwG4
Flag: com.android.launcher3.enable_twoline_toggle Staging
Change-Id: Idef427bad6551ae56b13e35393e076b8e000af5a
2024-03-08 21:32:22 -08:00
Jakob Schneider 343d99781f Improve "isActiveArchive" check by moving it a bit earlier into the
method.

Apply progress level doesn't need to be called unless the app is
actively being unarchived.

Previously this was fixed by adding a check directly in
"setIsDisabled()" which is not quite the right place (we can exit
earlier).

Bug: 326218355
Test: manual
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving TRUNKFOOD
Change-Id: Ia12013dbcec2d40413a6cf819f8d1787b815adc1
2024-03-06 18:12:53 +00:00
Jakob Schneider d1c4c1c182 Add dedicated a11y label for archived apps.
Bug: 326862963
Test: N/A
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving TRUNKFOOD
Change-Id: I2614df570bcd4e731d56088b5ef2db4a6874fb71
2024-02-26 18:23:30 +00:00
Treehugger Robot a5e8751f0d Merge "Merging multiple implementations of CancellableTask" into main 2024-02-22 02:54:30 +00:00
Andrew Cole ee8d92a943 Merge "Folder Previews Show Grey Pending Icon" into main 2024-02-21 20:37:17 +00:00
Brandon Dayauon 0fa9113028 Merge "Add home settings toggle featureflag for enablingTwoLineText" into main 2024-02-21 18:14:21 +00:00
Andrew Cole d462190ef2 Folder Previews Show Grey Pending Icon
When downloading an app previously the pending icon would show the full color icon when it was in a folder preview. To fix, we consolidated the logic for pending icons in PreloadIconDrawable and moved the logic of the pending state to the ItemInfoWithIcon model to represent the state of a pending application inside the model instead of in views.

Bug: b/324629535
Test: ItemInfoWithIconTest.kt
Flag: None
Change-Id: I4ffab44ddead046adcc84911039c87ea7c304e63
2024-02-20 21:15:21 +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
Sunny Goyal cc1dad0cae Merging multiple implementations of CancellableTask
Bug: 318539160
Flag: None
Test: Manual
Change-Id: Ie855427c2676e0ce76655e4dd67472c0b5e435d8
2024-02-15 13:01:10 -08:00
Brandon Dayauon 5787a2710c Add home settings toggle featureflag for enablingTwoLineText
- Have shouldUseTwoLine() be decided with the home settings toggle value

bug:316027081
spec: https://www.figma.com/file/uMzPkNMZpb7EyfHDo8usIa/V-%E2%80%A2-Toast-Butter?type=design&node-id=405-384593&mode=design&t=UBkdeuNlAdRh2FGU-0
Test:
Video: https://drive.google.com/file/d/15VUhNVro2fiwv3SzMda1StiPb3PV1eMT/view?usp=sharing
before searchPreferenceScreen: https://screenshot.googleplex.com/3uqdMsZoGSBYb6c
after searchPreferenceScreen: https://drive.google.com/file/d/15dswiHRTnafyhgQA_tL2tRc7vHFWdHbZ/view?usp=sharing
before homeSettingsPage: https://screenshot.googleplex.com/7wsNevxGun2KCCB
after homeSettingsPage: https://drive.google.com/file/d/15m5bjEyewlNHI_h26aygHa7zrgZ5qDF6/view?usp=sharing
AppListSettingsPage: https://drive.google.com/file/d/15hl4ScHBOLgKv3M38HtatMxQw85pgl7t/view?usp=sharing
Flag: enableTwolineToggle DEVELOPMENT

Change-Id: I3ad133dd51dcb97e14ccded730e7737c5049261a
2024-02-12 09:24:48 -08:00
fbaron fc6bbcfed2 Align workspace and hotseat icons in landscape
Fix: 311381639
Test: Verified on device
Flag: NONE
Change-Id: I4e2c74f59e8492042c3c7f8eccc98921d92d685f
2024-02-01 01:04:40 +00:00
Sunny Goyal 7891425109 Cleaning up release flag: ENABLE_ICON_LABEL_AUTO_SCALING
Bug: 270393294
Flag: N/A
Test: N/A
Change-Id: Ied7e21150e8176f044615959d20e75bb1cad7dfa
2024-01-29 11:18:29 -08:00
Rohit Goyal 04fe042e83 Add support for progress bar for archived apps in AllApps view.
Working Video: https://drive.google.com/file/d/1-cSD63FQLmqyeTkUuXqcSsjb03m31ULO/view?usp=sharing

Test: TaplPromiseIconUiTest
Bug: 302115555
Bug: 317108448
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: Iebaa338789430c5e0a004bd8b05bdbda87cd986e
2024-01-17 22:49:08 +05:30
Brandon Dayauon 6ea6ffa94a Merge "Revert "Revert "Fix the badge in badge (triple badging), by simp..."" into main 2024-01-12 15:47:38 +00:00
Rohit Goyal 2e6010c421 Add support for progress bar during unarchival of app.
* With this change, progress bar should appear whenever app update for archived app reaches non-zero progress.
* Once the update is cancelled, the progress bar should also disappear.

Test: PromiseIconUiTest and manually tested the progress bar using Play Store
Bug: 302115555
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: Iacf7a0fd865dba34915fa09f59c63a1da6e47315
2024-01-03 23:44:52 +05:30