Commit Graph

68 Commits

Author SHA1 Message Date
Jeremy Sim
841e6c1e8e 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
(cherry picked from commit a5e838d61c)
Merged-In: I64ae3db28293fa0adc249d700e9e03c074b6854f
2024-04-12 00:13:39 +00:00
Jeremy Sim
d2f256f179 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
(cherry picked from commit 17db14b107)
Merged-In: Ieaf0120cced07b6ac0f3eb07c75b66666a8dcc85
2024-04-11 21:09:56 +00:00
Jeremy Sim
00bf2488d1 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
Merged-In: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
2024-04-10 18:44:12 +00:00
Song Chun Fan
ca79c70816 [Launcher/Archive] remove all checks for the archiving system property
No longer needed

Change-Id: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
Merged-In: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
BUG: 331165939
Test: builds
2024-04-09 22:05:26 +00: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
Tony Wickham
794fe4f58e Add Hotseat items to Taskbar
- Currently supports WorkspaceItemInfo (e.g. normal app icons
  including hotseat predictions and pinned deep shortcuts).
- Currently doesn't support Folders, Notification dots, or
  long press.

Some technical details:
- Always allow HotseatPredictionController updates given the
  Hotseat is always showing even when Launcher is stopped.
- Represent Taskbar Hotseat items as BubbleTextViews, to
  allow for normal click handling etc. When the hotseat is
  updated, we reuse the same BubbleTextViews that were
  initially inflated, and just reapply the new info.
- Add new BubbleTextView iconDisplay for Taskbar, to allow
  for different treatment such as icon size.

Bug: 171917176
Change-Id: I325eb39051f2dc69228b39b5c40ed0cbdad8e200
2021-02-01 18:29:06 -08:00
Hyunyoung Song
7575cca264 Support ACTION/THUMBNAIL/SUGGEST corpus for rendering rendering
Hookup notifyEvent for metrics, on device intelligence.


Bug: 178454668
Bug: 178455221

Test: manual (See attached screenshots in the bug)

Change-Id: I652b4f2b0644a4726ccc3e01ce4c945a719f96a8
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2021-01-27 19:13:09 +00:00
Samuel Fufa
c282018765 Consolidate Search result UIs
- Allow SearchAction to be represented by SearchResultIcon and SearchResultIconRow
- Fix tap enter to launch regression
- Remove Plugin Pipeline

Bug: 177223401
Test: Manual
Change-Id: Id1d445f6af3f80f840d567165051188c78230ed0
2021-01-25 12:46:05 -06:00
Schneider Victor-tulias
6a5f431a7b Revert "Revert "Add UI updates for incremental app installs.""
This reverts commit 229497d182.

Reason for revert: Patching bugs

Fixes: 176901235, 176992421, 176884453

Test: manual

Change-Id: I57e13a15e72284564a10761966732ee31d15fd08
2021-01-12 12:22:33 -08:00
Schneider Victor-tulias
229497d182 Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.

Reason for revert: causes b/176884453 and b/176992421

Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-07 19:44:44 +00:00
Schneider Victor-tulias
84269d349d Add UI updates for incremental app installs.
1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.

Progress bar color updates will follow in a separate CL.

Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing

Bug: 171008815

Test: manual

Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
2021-01-05 15:17:26 -05:00
Samuel Fufa
6e5efb0929 Consolidate Hero search result with SearchResultIconRow
With this, we can now show app title and support drag/drop for shortcut results.

Bug: 172245107
preview: https://drive.google.com/file/d/1A4eKKTDPht-MDbfA2VFI3OuAO36fc3AS/view?usp=sharing
Change-Id: Icf94a2d23b44bfe5527aea71e27178906e5deb3e
2020-11-05 11:57:35 -06:00
Samuel Fufa
02be2a43f5 Support Remote actions
Bug: 168846477
Test: Manual
Change-Id: I7b9dc96bc7a8ccb25ccb4b7135880768256f1ef3
2020-09-24 14:28:49 -07:00
Sunny Goyal
852537fd98 Using StatsLog for notifyingAppPredictor
> Adding a listener in StartsLogManager for listening to events.
  This allows events to be directored to the predictor only if
  it is already running, instead of creating it.
> Unifying the event format to be same as hotseat predictor

Bug: 160748731
Change-Id: Ib00e6249ff642c030f00bcad5b748255e704d16a
2020-07-16 14:12:15 -07:00
thiruram
c6a38ba5d8 Replaces StatsLogManager.log with StatsLogManager.logger()
Bug: 159170445
Change-Id: Ice6c8a9ae30d8e6b3843bfe42926053849bf9fe0
2020-06-17 17:32:54 +00:00