Commit Graph

78 Commits

Author SHA1 Message Date
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
Willie Koomson
ab3f44bc19 Clean up code related to the old widget preview toast
This code is no longer used now that widget cells show an add button.

Bug: 335367158
Test: N/A
Flag: com.android.launcher3.enable_widget_tap_to_add
Change-Id: I8040c75a89394f34885c24308f4e889b7263cc54
2024-06-26 20:06:34 +00:00
Charlie Anderson
5fa4f02c70 add more logging around package updates and widget click handling in Launcher
Bug: 336976070
Test: locally verified
Flag: N/A

Change-Id: I8a1204fb6d96eccbc20b0ddd3c1e6fb1ae75fc6c
2024-05-10 10:00:51 -04:00
Anushree Ganjam
c9eda41c31 Hardcode the className instead of class.getSimpleName().
class.getSimpleName() causes issues with obfuscation.

Bug: 332171918
Test: Manual
Flag: NA
Change-Id: I5119a7ba0e4e27d8745c94df67881934fed282a4
2024-05-08 12:31:24 -07:00
Jeremy Sim
130be57171 Merge "Set camera icon as gray when app is unlaunchable" into main 2024-04-11 21:41:21 +00:00
Jeremy Sim
a5e838d61c Set camera icon as gray when app is unlaunchable
This CL is a follow-up to ag/26825455. Now that we are changing app pairs' disabled appearance back to icon-only, the case where a camera icon should be grayed out on an app pair on a small screen needs to be reinstated.

Fixes: 333137187
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I64ae3db28293fa0adc249d700e9e03c074b6854f
2024-04-11 11:25:27 -04:00
Song Chun Fan
ab21ddb2da Merge "[Launcher/Archive] remove all checks for the archiving system property" into main 2024-04-09 22:05:08 +00:00
Sunny Goyal
11117d9b2a Using resource override instead of code-swap for ApiWrapper
Bug: 330920490
Flag: None
Test: Presubmit
Change-Id: Iac19f32e64d2c76ed5b4f8592943ee4ae7af51b5
2024-04-09 11:14:44 -07:00
Song Chun Fan
e5ad96ce10 [Launcher/Archive] remove all checks for the archiving system property
No longer needed

Change-Id: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
BUG: 331165939
Test: builds
2024-04-08 23:14:07 +00:00
Jeremy Sim
17db14b107 Fix launch flow when one app in an app pair is paused
This CL changes the error handling logic in ItemClickHandler to continue with app pair launch when only one app in an app pair is paused. It also changes AppPairIconGraphic so that the disabled state of the app pair is drawn modularly (if only one app is paused, only one app will appear visually paused).

Bug: 330795643
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: Ieaf0120cced07b6ac0f3eb07c75b66666a8dcc85
2024-04-05 11:24:33 -07: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
Holly Sun
20c30c9cdc [PS] Do not use AppInfo and use PrivateSpaceInstallAppButtonInfo instead.
BaseAllAppsAdapter.AdapterItem's itemInfo needs to be an AppInfo. Create PrivateSpaceInstallAppButtonInfo extending from AppInfo and use different itemType (AppInfo has default itemType ITEM_TYPE_APPLICATION). In this case, shortcuts is disabled in ShortcutUtil#supportsShortcuts because `isApp` is false (https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/util/ShortcutUtil.java;l=30?q=shortcututil&sq=repo:googleplex-android%2Fplatform%2Fsuperproject%2Fmain%20b:main).

After the fix, long click on Install button quits Toast, which is the same with drag action on the button.

Since we have a specific itemType for PS install button now, the previous `FLAG_PRIVATE_SPACE_INSTALL_APP` is no longer needed. Remove it.

Bug: 324211283
Test: manual
Flag: aconfig com.google.android.apps.nexuslauncher.private_space_app_installer_button trunkfood
Change-Id: Ic5d4284afb93cef77f2ad8f0c1588523e0ed3ae3
2024-03-05 17:13:35 -08:00
Jeremy Sim
3c1ee0dad4 Improve app pairs disabled state
This CL fixes 2 issues with app pairs:
- When an app pair is incompatible with the screen size due to a non-resizeable app (e.g. Camera), the app pair will now be properly disabled and display an error message. If the user is on a foldable, it will prompt the user to unfold their phone.
- The app pair icon will now properly redraw with lower opacity when it is disabled.

Fixes: 323088270
Test: Manually paused and unpaused apps, created Camera app pairs and tested with foldable
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I66514c96bc19f480c9788661e4dffaa5b1cdc2ca
2024-02-26 14:29:57 -08:00
Himanshu Gupta
ebc985850d Merge "Refreshin App Market Intent on Plus Icon Click" into main 2024-02-07 20:44:26 +00:00
Himanshu Gupta
19f7a8a5ed Refreshin App Market Intent on Plus Icon Click
Currently the App Market intent is loaded statically into
Launcher, once during start. Sometimes, this causes the app
market activity start to be blocked, resulting in no action
from button tap.

To fix this, we hot-reload the intent when the plus button is
clicked.

Bug: 323189130
Test: Launcher3 test.
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space TRUNKFOOD
Change-Id: I563d29838a43644ba8e0830b39d4f4ef8c60aeb6
2024-02-07 09:26:37 +00:00
Jakob Schneider
328c32235e Add the archiving sysprop check to launcher3.
This system property will be used to test the feature
in DVT. This is required because the new device is built on U QPR3, not V. See
https://docs.google.com/document/d/1h8sLlnnhwGP4uZssglBqTShMoQcEq5dvR7jsJmmp0Cw/edit?resourcekey=0-KTFHkPKTdtMN-5kQYBWJig&tab=t.0#heading=h.x9snb54sjlu9  for more details.

Test: tested manually
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving TEAMFOOD

Change-Id: Ie64a40ba799c81057258dd7de3872a0494cff2d8
2024-02-06 14:29:07 +00:00
Jeremy Sim
e96d30bddb Make app pairs respond properly to disabled state
1) App pair member icons are now always redrawn when app pair icon is redrawn, allowing greyed out icons to be updated immediately when an app is disabled.
2) App pairs now check for disabled status when clicked. If one or both of the apps is disabled, app pair will not be launched, and the appropriate error message or affordance will be displayed.

Fixes: 323088270
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I7f2af75db0d8579d5d04583c0d3ead32714768e4
2024-01-31 16:01:55 +00:00
Andy Wickham
af7ff56792 Merge changes from topics "awickham-api-cleanup", "keyboard-on-back" into main
* changes:
  Cleanup API checks for P, Q, and R.
  Add a WindowInsetsAnimationCallback to listen to IME changes.
  Update minSdk to 30.
2024-01-25 22:06:40 +00:00
Andy Wickham
b922dccbf5 Cleanup API checks for P, Q, and R.
Test: Build with gradle
Flag: NA
Change-Id: I3ef17090741d14bebd76cf09cf3dc5ac4f11e686
2024-01-24 14:58:08 -08:00
Holly Sun
70d8ecbcfe [PS] Log event for private space add button click.
Bug: 320702146
Test: manual
Flag: ACONFIG com.android.launcher3.private_space_app_installer_button teamfood
Change-Id: I2ea6b215d4bce93e682c260242a6c3a7cb31922f
2024-01-17 16:09:08 -08: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
Himanshu Gupta
6c25654e84 Adding methods to access LauncherApps APIs.
These methods are added to ApiWrapper class
so that Launcher can acess these APIs.

Bug: 308054233
Test: Presubmit
Flag: ACONFIG com.android.launcher3.Flags.private_space_sys_apps_separation DEVELOPMENT
Change-Id: Ic2e64b38cc8b0d262d3f6e9614e2b3fceb9d82a0
2023-12-18 19:47:13 +00: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
Sunny Goyal
464509b375 Merging widget item click listener to default click listener
> Also removing check for dragHandle, since dragHandle is already removed

Bug: 307306823
Test: atest Launcher3Tests
Flag: N/A
Change-Id: I0b452dd1fbccf15ed686370471e8866b179fd77e
2023-11-28 12:07:16 -08:00
Sebastian Franco
974cc94839 Moving some constants in Launcher.java to a separate file for ease of readability
Part of  go/launcher_SoR

Flag: N/A
Bug: 306465626
Test: compiling, no-op change
Change-Id: I5ea40acb2ba1ea5840021e297516a511b032a043
2023-11-07 10:12:26 -06:00
Jeremy Sim
94fd07e5da App Pairs: Implement save, inflate, launch, and delete
This is the third of several patches implementing the App Pairs feature behind a flag.

This patch includes:
- AppPairIcon and associated XML. Actual icon asset is placeholder for now
- Ability to launch split pair on click
- Icon can be moved around, incl. to Taskbar
- App pair can be deleted by dragging to "Remove" drop zone
- Icon persists on Launcher reload

Change-Id: I88aec6fbc814be98f9ef048bbc5af889d0797970
Flag: ENABLE_APP_PAIRS (set to false)
Bug: 274835596
Test: Not included in this CL, but will follow
2023-08-02 12:08:41 -07:00
Luca Zuccarini
2098381808 [Toast] Introduce SysUI's animation library to the transition manager.
Bug: 250588519
Test: manual, see videos in bug
Change-Id: Iccc440c95ecc14d39e35d911798e239b698b950a
2023-01-27 13:49:40 +00:00
Sunny Goyal
5fe99d560e Fetching the session info on the background thread when launching pening icon
Bug: 242669604
Test: Verified that the RPC is not made on UI thread
Change-Id: I4299628b8b3e9aa2844f5556c57f47d997dd85e1
2023-01-10 11:02:58 -08:00
Sunny Goyal
9a616213e1 Removing SearchActionItemInfo
> Instead introducing an interface for handling click events
> Linking this interface to other UI which handle clicks

Bug: 259733681
Test: Presubmit and verified manually
Change-Id: I9cbf2d009d64254f513deb909a151e46e860d039
2022-11-30 10:59:07 -08:00
Holly Sun
259723de32 Catch exception to prevent crash.
Bug: 258234624
Test: QA verify
Change-Id: I31df77b33f19426d136673d1ce9866fa6e60729c
2022-11-22 20:58:36 -08:00
Sihua Ma
8e66905618 Merge "Showing Toast message when the target package is null for the disabled shortcut" into tm-qpr-dev 2022-09-19 23:20:12 +00:00
Sihua Ma
1d8b7cba31 Showing Toast message when the target package is null for the disabled shortcut
The shortcut for a certain set of apps could have their component names set to null. In this case, if we still need the package name for the shortcut, we should use the package name from the intent, which is accomplished in getTargetPackage. Additionally, if the target package is still null, we are falling back to showing the Toast messages only.

Fix: 239685630
Test: Verified that the crash no longer happens after clicking on grayed out shortcuts
Change-Id: I4de68ea1a227032e16e5c00407f75159a7aba30f
2022-08-02 11:17:29 -07:00
vadimt
f6ef879cf4 Moving all sources that are shared between Launcher and TAPL in one directory
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.

Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
2022-07-27 20:18:46 +00:00
Pinyao Ting
6a41d56b50 Log the reason why a WorkspaceItemInfo was removed
In the past we've seen a WorkspaceItem disappeared from the workspace
but wasn't able to determine why it was removed. This CL includes the
reason why it was removed in the error log, which hopefully would help
us debugging similar issues in the future.

Bug: 231239260
Test: make
Change-Id: Iba3d57568c9b3e011a6b65b26f0d4170d42fe1a5
2022-05-16 20:17:47 +00:00
Sunny Goyal
f0ff70a2a5 Adding support for easily extending Launcher DragAndDrop support
Bug: 232165524
Test: Verified locally
Change-Id: I3b4f37bc9914de55330662edd678e6fdd0eafece
2022-05-11 21:34:08 +00:00
Sihua Ma
da8759ae29 Showing alert dialog when shortcut version higher than the App
Creating an AlertDialog when the disabled reason of the shortcut is DISABLED_REASON_VERSION_LOWER, which happens when the backed-up shortcut was created from an application that has a version higher than the one installed on the device. The AlertDialog will direct the user to the play store and update the application.

Test: Manual
Fix: 224796975
Change-Id: I0125fada60b48176775de6782ba03ee6790904aa
2022-04-14 01:34:44 -07:00
Becky Qiu
1fc202867e [AA+ Search] Add logging for header search icon tapping events.
Logging example for the search icon tapping event: https://paste.googleplex.com/4809431536631808

Bug: 198507048
Test: tested with AiAi apk with search icon sent as child of header.
Change-Id: Ibbaec61b93c30a99ea2ffef8d7342490ba37335d
2021-11-09 16:50:47 -08:00
sfufa@google.com
ca76de0e6e Support drag/drop on search results
Bug: 199341710
Test: manual
Change-Id: I9879c2a3769d4f930ab0289d2f26e4757971549d
2021-10-04 13:14:12 -07:00
Hyunyoung Song
5881b910e9 Revert "Don't use ProxyActivity when launching from SearchActionItemInfo intent"
This reverts commit 878dedfb84.

Reason for revert: b/192558017
Bug: 192558017

Change-Id: I41e64ab74c00d7b255be6f3ef1b783c01571d641
2021-07-02 21:18:10 +00:00
Hyunyoung Song
878dedfb84 Don't use ProxyActivity when launching from SearchActionItemInfo intent
Bug: 188490184
Test: Manual
Change-Id: I9b1b17dfb7e896025a01245414cdab11cf3125cb
2021-06-28 06:34:48 -07:00
Schneider Victor-tulias
b199e20acc Enable unpausing apps from the workspace.
Fixes: 188675002
Test: manual
Change-Id: I02715450016e9b91fff774525b5e32c337c74547
2021-05-24 21:44:29 +00:00
Sunny Goyal
d5500548dc Revert^2 "Moving taskbar lifecycle to TouchInteractionService"
430465a3d5
Bug: 187353581
Change-Id: I7b2280d16adfafd3e85ffc1d22e32d0c00d12b67
2021-05-21 07:05:02 +00:00
Kholoud Mohamed
430465a3d5 Revert "Moving taskbar lifecycle to TouchInteractionService"
This reverts commit e215fb730b.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I13700009003387451&testResultId=TR89423459137251402, bug https://buganizer.corp.google.com/issues/188755902

Bug: 188755902
Change-Id: I4650136975b60f311499ee6ff5b27ab9a32d23d6
2021-05-20 13:32:05 +01:00
Sunny Goyal
e215fb730b Moving taskbar lifecycle to TouchInteractionService
> Inflating taskbar views with a non-launcher window context
> Removing separate taskbar view in Launcher
> Handling taskbar icon clicks directly instead of going via launcher
> Fixing some relayouts during show/hide animation

Bug: 187353581
Test: Manual
Change-Id: Ia7d44acbb770bf0345922234b3daa5cc040a5843
2021-05-17 21:47:08 -07:00
Winson Chung
2b093941e1 Add support for swiping back to the shortcut that launched the activity
Bug: 129067201
Test: Open a shortcut on the workspace, go home

Change-Id: If5d3c3e8e93f09af50aa4994094657347890ef45
Signed-off-by: Winson Chung <winsonc@google.com>
2021-04-22 17:00:47 -07:00
Sunny Goyal
b65d766d88 Adding support for listening for app launch animation completion
Bug: 181165935
Bug: 179065491
Test: Verified on device
Change-Id: Ifa6a91560cb31b4dfb72a0f582607e873d8a002d
2021-03-10 15:53:21 -08:00
Yogisha Dixit
741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +00:00
thiruram
f8f2a6ed0a [AA+] Log tap on SearchActionItem.
Bug: 178562918
Test: Presubmit
Change-Id: I42a44de4f3cc02ca331c4f99c107891c4658995d
2021-02-22 22:39:41 +00:00