Commit Graph

221 Commits

Author SHA1 Message Date
Winson Chung
21cf4439d2 Use shared method for updating the runtime status flags for an item info
- The method AppInfo#updateRuntimeFlagsForActivityTarget should also
  both add and remove runtime flags to match the current state

Bug: 323112914
Test: atest NexusLauncherTests
Change-Id: If87acf1e2324f98cf1d96d194eac13a93fa432c1
2024-04-14 06:19:49 +00: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
a596f589c4 Allow app pairs in folders
This CL substantially refactors folders to be able to take contents of type AppPairInfo. App pairs can now be moved in and out of folders, and launch from folders.

This CL contains only logic and model changes; animation and style changes (for dropping items into folders, color changes to app pair surfaces, etc.) will be in a following CL. Another CL (hopefully) will contain tests. I'm planning to submit them together, but this patch should also be able to stand alone with no issues (except janky transitions).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, more to follow in another CL.
Change-Id: I73732fcaefbdc61bf6e02a5be365962b8bbc3e41
2024-04-03 16:47:42 -07: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
Sunny Goyal
77954bae4e Cleaning up some build configurations
> Removing Launcher3Go-without-quickstep
> Removing src_ui_overrides to src_no_quickstep
> Removing unnecessary code swpa for GO builds

Bug: 330920490
Flag: None
Test: Presubmit, everything builds
Change-Id: I5746dbc7c5a37c1d99d78b55bf2a6adce1a711c9
2024-03-26 17:16:52 +00:00
Vinit Nayak
ef5159e8df Request high res icons for app pairs after all workspace items processed
* TL;DR Loading workspace icons only requests high res icons for apps
on workspace or in hotseat, not for folders or app pairs. They need to
request that separately
* See notes on bug for root cause

Test: Created many app pairs, empty icons does not repro.
If I remove my change issue consistently repros, not a race condition
Fixes: 323106492

Change-Id: I05ba5e8e8b0eddd4041642f89d06deff85511e40
2024-02-23 16:47:50 -08: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
Himanshu Gupta
f591ce5f17 Restricting Accessibility flows for Private Profile.
Adding PS apps to the home screen is restricted.
This CL prevents the same from accessibility drags.

Bug: 289223923
Flag: ACONFIG com.android.launcher3.Flags.private_space_restrict_accessibility_drag DEVELOPEMENT
Test: Ran Launcher3 Tests.
Change-Id: I3e2b7b196b96a4d2ba34d8ece5fd6e0463f17253
2024-01-25 04:19:20 +00:00
Rohit Goyal
d16a574524 Merge "Add support for progress bar for archived apps in AllApps view." into main 2024-01-18 17:56:04 +00: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
Sunny Goyal
d24d33925a Using WidgetInflater in loader task
This removes duplicate logic for widget inflation.
Since the widget inflation can now happen during loader,
the restore logging can also be moved completely to the loader

Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: If9f336e7bf49ee7df121d7d9852b674d98124895
2024-01-14 00:56:51 -08:00
Stefan Andonian
22c4399105 Merge "Split LoaderTask.processWorkspaceItem into separate methods." into main 2024-01-13 00:25:13 +00:00
Sunny Goyal
39f235154e Merge "Fixing some launcher model tests" into main 2024-01-12 23:04:39 +00:00
Stefan Andonian
808e4f32f0 Split LoaderTask.processWorkspaceItem into separate methods.
Right now, processWorkspaceItem is almost impossible to fully
understand. It is a behemoth of a method that handles everything
possibily related to processing a workspace item.

In order to make life easier for developers, it is being split into
smaller methods that deal with limited functionality each, and are
commented / named well. These can also be individually unit tested, so
developers don't have to use mock data anymore to test even the smallest
bit of functionality.

Bug: 318398886
Test: Manually verified that the workspace loading behavior still works
on device.
Flag: None, this is just a copy/paste refactor.

Change-Id: I040bce708cada5b29cf3488ddf37ccc8d7af8282
2024-01-12 22:22:01 +00:00
Sunny Goyal
6449a21062 Fixing some launcher model tests
> Removing static mocks and using Sandbox context instead
> Removing inheritence in LauncherModel and converting LauncherApps.Callbacks
  to a separate class. decMaker sometimes fails because of API changes in
  LauncherApps.Callbacks

Bug: 319877828
Test: atest LoaderTaskTest
Flag: N/A
Change-Id: If78b5d83595627a355b284f52d887d75fef53014
2024-01-12 12:30:52 -08:00
Charlie Anderson
da3138cd91 Replace ENABLE_LAUNCHER_BR_METRICS flags with fixed aconfig flag.
This is necessary because the value of the read-write flag will not be updated in time for backup/restore.

Bug: 307527314
Test: compiles
Flag: ACONFIG ENABLE_LAUNCHER_BR_METRICS_FIXED TEAMFOOD
Change-Id: I67a1a820734d8881b3ed5be4a1f2f1556e6e4704
2024-01-12 14:33:29 -05:00
Charlie Anderson
67636269dd add metrics for when db grid migration fails
Flag: ACONFIG enable_launcher_br_metrics TEAMFOOD
Test: locally verified
Bug: 307527314

Change-Id: Iab84a337d76d63bb3bc2ed81fdf4b6fd50dc5661
2024-01-05 10:48:40 -05: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
Charlie Anderson
511421c12f Adds logging for Launcher restore metrics in Launcher and LoaderTask
- Adds flag for indicating when we are loading after a restore, separate from the pending restore flag
- Adds many success/failure scenario metrics when loading and binding items

Flag: ACONFIG enable_launcher_br_metrics DEVELOPMENT
Test: locally verified
Bug: 307527314
Change-Id: I9d2660f6d9d7cd5813072201e96b1a64aec4ea4b
2023-12-18 19:32:02 +00:00
Charlie Anderson
861c2eed78 Merge "Adds more in depth logging of Launcher restore functionality" into main 2023-12-12 20:30:19 +00:00
Charlie Anderson
c61288e271 Adds more in depth logging of Launcher restore functionality
Test: locally
Flag: N/A
Bug: 294386159
Change-Id: I810239047480090911c54dbe65a4aad8515f640c
2023-12-12 11:04:52 -05:00
Thales Lima
1faa4edc42 Make numFolderRows/Columns accept more values
InvariantDeviceProfile hold values that are not related to current DP in use. Now other classes get the value correctly from DeviceProfile, and each posture can hold different values, making it akin to iconSize.

Fix: 309800141
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I32295738585de67205dcd6c8942d08a3d07d169a
2023-12-08 22:00:48 +00:00
Thales Lima
09d42d5340 Revert "Make numFolderRows/numFolderColumns accept more values"
Revert submission 25438456-5x5_folder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25438456-5x5_folder

Revert "Use DeviceProfile numFolderRows and numFolderColumns"
Revert submission 25313018-numFolder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25313018-numFolder

Change-Id: I4890016e310c0a2122861f36fcdbf33e98e727c0
2023-11-30 11:47:37 +00:00
Thales Lima
07c6b8d96d Use DeviceProfile numFolderRows and numFolderColumns
Invariant hold values that are not related to current DP in use. This is a change needed for IDP to hold more values in the future akin to iconSize.

Bug: 309800141
Change-Id: Iefb388a5f6590d7da3452d2c388c02bd5e9d32bb
Flag: N/A
Test: NexusLauncherTests
2023-11-21 11:47:21 +00:00
Himanshu Gupta
9aab4d4603 Adding Prework for Private Space integration in Launcher
This Cl adds the following:
1. Fixes for Quite Mode check maintained by Launcher
2. Addition of new Quite Mode broadcasts
3. Fixes for determining work profile user correctly.

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I5f6158b213723339e70ff99e66c5f439f5879e12
2023-11-05 12:31:10 +00:00
Jeremy Sim
5ff90cd057 Prevent app pairs rank from resetting on Launcher model reload
This fixes a bug where app pairs rank was mistakenly reset upon Launcher reload, causing app pairs to launch with the wrong ratio.

Bug: 274835596
Test: App pairs restore properly even after Launcher restart
Flag: ENABLE_APP_PAIRS
Change-Id: I5d37190cd994628886f77e089c71fc5e5dddc03e
2023-10-24 00:37:52 +00:00
Federico Baron
0bd2c4ea75 Merge "Add smartspace removal option as a toggle" into main 2023-10-06 20:35:14 +00:00
fbaron
c0e687bad8 Add smartspace removal option as a toggle
Bug: 303471576
Test: try removing smartspace by going to home settings and turning it off
Flag: ENABLE_SMARTSPACE_REMOVAL
Change-Id: Idd95da1b302927885a8c469e38db6d3c5130f8c1
2023-10-05 17:26:03 +00:00
Stefan Andonian
54495f3018 Permanently provide functionality for LauncherPref items that don't need
to be migrated, but are boot aware.

Bug: 251502424
Test: Tested that Migration works as expected, as well as shared
preference information that doesn't need to be migrated. Also sanity
tested phone in general.

Change-Id: Ie8460e360856cbe20a7770b1747f75c7154759ab
2023-10-04 23:32:58 +00:00
fbaron
22a9c3cb7f Add flag check for SMARTSPACE_AS_A_WIDGET to loadertask.java
Missing a flag check that is necessary in LoaderTask.java to prevent the code from running when the flag is off.

Bug: 300140279
Flag: SMARTSPACE_AS_A_WIDGET
Test: no test
Change-Id: Iaa89e8542475eb01f679f70734a61c13a3cde89f
2023-10-04 10:19:46 -07:00
fbaron
e58aaf1802 Add smartspace as a widget to first page (implementation 2)
Flag: SMARTSPACE_AS_A_WIDGET
Test: verify that the smartspace gets replaced with a smartspace widget
Bug: 300140279
Change-Id: I42c170de5e2a9fd3d24d99bb8b09cf412c55e3a5
2023-09-29 18:16:09 +00:00
fbaron
30d9e3fb06 Add smartspace custom widget
Flag: SMARTSPACE_AS_A_WIDGET
Test: no test
Bug: 200721106
Change-Id: I4ae4ff72ff7267bab0b5a928f3f78b47f7cfbc1f
2023-09-07 20:27:59 +00:00
Charlie Anderson
c9d11e8208 add logging for Launcher backup and restore events
Test: Manually verify logs
Bug: 294386159
Change-Id: Ic3a77f4a09556e0d769837129e0bd094f1e91b6b
2023-08-16 13:24:22 -04: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
Vinit Nayak
f6f192853d Cleanup WorkProfileTest logs
Fixes: 243688989
Change-Id: Ic3f143062c1a1383d1e79959dae59c45743547e9
2023-07-05 16:27:11 -07:00
Sunny Goyal
7b9e28f152 Removing all usage of LauncherProvider
Also fixing a race condition in model when an item update/delete task
gets queued and executed after the model has reloaded (making the old
data obsolete)

Bug: 277345535
Bug: 263079498
Test: Presubmit
Flag: N/A
Change-Id: Ibd4bdbb3eece05b38b73a22a4be5f368df3754f0
2023-06-07 12:57:13 -07:00
TreeHugger Robot
859d0d87e2 Merge "Simplifying some test utility methods" into udc-qpr-dev 2023-06-05 23:10:06 +00:00
Sunny Goyal
6773667e34 Revert "Revert "Adding main thread binder tracing in development..."
Revert submission 23522417-revert-23482347-launcher-binder-tracing-RBUMTFPXQG

Reason for revert: Fixed broken build
Reverted changes: /q/submissionid:23522417-revert-23482347-launcher-binder-tracing-RBUMTFPXQG

Change-Id: I3e130a780b8641c4a17a5cdf799513f2ba08b16e
2023-06-02 18:14:35 -07:00
Sunny Goyal
ee9740462e Simplifying some test utility methods
Bug: 283821111
Test: Presubmit
Flag: N/A
Change-Id: I7b9690bc0cc53d097d26cd4f0ab2dd36ba88e1cb
2023-06-02 13:30:55 +00:00
Santiago Aboy Solanes
0edac04688 Merge "Revert "Adding main thread binder tracing in development build."" into udc-qpr-dev 2023-06-02 09:06:26 +00:00
Santiago Aboy Solanes
ee846feb80 Revert "Adding main thread binder tracing in development build."
Revert submission 23482347-launcher-binder-tracing

Reason for revert: Broken Build 10242119 on git_master on errorprone b/285434612

Reverted changes: /q/submissionid:23482347-launcher-binder-tracing

Change-Id: Id9726474265e839a59d6eb34822e7a86d40f0fc9
2023-06-02 08:59:28 +00:00
Vinit Nayak
c2545b82cc Merge "Add logs for launcher user cache" into udc-dev am: 43c79d23b3 am: d7037d07e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23523872

Change-Id: I5a512981f5776174f079dca8b81fc3e3fe069a83
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 04:24:56 +00:00
Vinit Nayak
134e429189 Add logs for launcher user cache
Bug: 243688989
Flag: None
Change-Id: I6f6ea3f3326c1814c2a50863e9bfbcb7e4323ae8
2023-06-01 17:11:42 -07:00
Sunny Goyal
3db98b1152 Adding main thread binder tracing in development build.
> Unifying multiple binder tracing implementations
> Removing wallpaper customization check as it has been rolled out
  few years ago, this avoids additional RPC to check for wallpaper
> Removing RaceConditionReproducer as it is not used anywhere and
  is not integrated with this tracing anymore

Bug: 273718665
Test: Presubmit
Flag: N/A
Change-Id: I801af5d039a9d38d5d39e803723ec6da50a9d59f
2023-06-01 09:39:50 -07:00
Sunny Goyal
e274d97fe5 Removing support for lagacy shortcuts
> Addition/removal of  shortcus is already removed. This just
  cleans up the unused code path

Bug: 275875209
Test: Updated tests
Flag: N/A
Change-Id: I8ab7f57b693f996920e50e8beecafcffab5167e9
2023-05-17 09:20:45 -07:00
Stefan Andonian
9d7bffe37b Fix NPE in LauncherPreviewRenderer.
The LauncherBinder is null in LauncherPreviewRenderer, which was
causing an NPE in LoaderTask.

Bug: 279347305
Test: Used logs to verify that the LauncherPreviewRenderer was actually
loading using the LoaderTask. Most of the time, it does not, so that is
why I didn't catch this before pushing it.

Change-Id: Ic5b45abfdeb73a4bbe1f521ae4d627b6cfcfec54
2023-05-15 22:41:04 +00:00
Sunny Goyal
7bc6cdee56 Revert "Revert "Revert "Revert "Revert "Revert "Changing GridMigrationTask to use ModelDbController directly""""""
This reverts commit 09905cfa90.

Reason for revert: Fixed the crashing issue

Change-Id: Ibcfc28a89356d262e67e8842d6bae37e230a70f5
2023-05-13 01:59:19 -07:00
Sunny Goyal
09905cfa90 Revert "Revert "Revert "Revert "Revert "Changing GridMigrationTask to use ModelDbController directly"""""
This reverts commit bca4e694f0.

Reason for revert: post submit broken

Change-Id: I8afc63b5aa67ee14127f79e2245ef543bff8cf31
2023-05-11 22:22:16 +00:00
Sunny Goyal
bca4e694f0 Revert "Revert "Revert "Revert "Changing GridMigrationTask to use ModelDbController directly""""
This reverts commit 3772b246c2.

Reason for revert: Fixed the test failure

Change-Id: Ibdc9e184fcb32c7caa4ab25d8753a46fa322b703
2023-05-10 17:49:16 +00:00