Commit Graph

24 Commits

Author SHA1 Message Date
Holly Jiuyu Sun
5beb2498ac Merge "[PS] Do not use AppInfo and use PrivateSpaceInstallAppButtonInfo instead." into main 2024-03-13 03:48:37 +00: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
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
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
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
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
Sunny Goyal
bb903c9cb0 Using generated monochrome icon when actual icon is not available in the full drawable
Also simplifying the bitmap fetching path to return all relevant data in one-call

Bug: 299336510
Test: Verified that the icons are themed during drag and app launch
Flag: ENABLE_FORCED_MONO_ICON
Change-Id: Ib4c457e911e7b5616e8370d111cc68c5d6401fe6
2023-09-06 13:50:53 -07:00
Holly Sun
40df2fc8d8 [a11y] Add FLAG_NOT_PINNABLE and modify supportAddToWorkSpace.
// play uninstalled app
Bug: 286998395
Bug: 287156208
Bug: 287157282
// contact
Bug: 287362865
Bug: 287370843
Bug: 287372663
// clock
Bug: 287166186
Bug: 287166771
Bug: 287167527
Test: manual
Flag: N/A

Change-Id: I859deba6218e232a232f009793044ca4be2cab19
2023-06-22 16:39:05 -07: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
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
Sunny Goyal
d872a97bd0 Updating icon badging logic
Bug: 201682172
Test: Manual
Change-Id: I57421b0c77e12f1cd464e532d2a1383c2cf93981
2021-12-02 22:14:25 +00:00
Schneider Victor-tulias
fbf4178ab7 Add logging to help debug invalid icon state and UI.
PackageInstallStateChangedTask had some redundant state handling that could lead to invalid states. Removed state handling (potential fix to b/198924992) along with logging to help debug b/198924992.

Test: Started and canceled an app download
Bug: 198924992
Change-Id: I8b8202ceb62a3265186d8d46a0e1be6afc83c080
2021-09-14 16:17:04 -07:00
Sunny Goyal
b47172bc4e Linking various settings that control icon cache to icon state
Also separating icon provider for recents from Launcher as it used a fixed size

Bug: 183641907
Test: Verified on device
Change-Id: I6ea3caa0066d1483bfb8a81f0e8aaa472c813afe
2021-05-05 23:05:38 -07:00
Sunny Goyal
9ab43772ab Adding support for using themed icons on workspace
Bug: 183641907
Test: Manual

Change-Id: Ieda7e73b3ae4dfe3009e3f23754aff5f8826a967
2021-05-03 20:00:38 -07:00
Sunny Goyal
572aca4ce2 Moving some common functionality to IconLoaderLib
Bug: 183641907
Test: Manual
Change-Id: Icfc7ebb140e4e1678b0715beee2e0e513e707b9e
2021-03-25 10:06:53 -07:00
Schneider Victor-tulias
9918e94c03 Revert "Revert "Add UI updates for incremental app installs.""
This reverts commit 6e60380abb.

Reason for revert: revert was unnecesary

Change-Id: I021769e929d3026b23c5f644e2ee629cec21a301
2021-01-20 00:42:03 +00:00
Schneider Victor-tulias
6e60380abb Revert "Add UI updates for incremental app installs."
This reverts commit b803f7e2cb.

Reason for revert: causes b/177642572

Change-Id: I48b85e8495734a2d3a7b477dfb20929879465b6a
2021-01-19 19:50:18 +00:00
Schneider Victor-tulias
b803f7e2cb 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

Fixes: 176901235,176992421,176884453

Test: manual
Change-Id: Ie0575dc56c33c5d6ecd6c5cbf00666b96d6dcb16
2021-01-12 16:04:01 -08: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
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00