Commit Graph

1916 Commits

Author SHA1 Message Date
Sunny Goyal 72a74669e7 Adding support for async view inflation
Bug: 318539160
Test: atest AsyncBindingTest; atest ItemInflaterTest
Flag: aconfig enable_workspace_inflation DEVELOPMENT
Change-Id: I77a373db7a5805f68f4b8cbfa9b586b5674252de
2024-02-22 10:58:48 -08:00
Vinit Nayak 2b031727f0 Merge "Log split metrics through individual sessions" into main 2024-02-21 00:20:44 +00:00
Fengjiang Li 73ece207a2 Merge "Avoid flicker to drop a widget that needs a config activity." into main 2024-02-17 03:16:40 +00:00
Fengjiang Li 8bd66ee82d Avoid flicker to drop a widget that needs a config activity.
When dropping a widget that requires an config activity, drop a
PendingAppWidgetHostView to workspace

Adb command to try the feature:

adb shell device_config put launcher com.android.launcher3.enable_add_app_widget_via_config_activity_v2 true

Fix: 284236964
Test: manual
Flag: aconfig launcher.enable_add_app_widget_via_config_activity_v2 DISABLED
Change-Id: Ifd0be5c607a388cf8a8f6d77b46c03112e3e599f
2024-02-16 17:05:40 -08:00
Sunny Goyal e337a80ef2 Cleaning up some no-op calls during workspace binding
Bug: 318539160
Flag: None
Test: Manual
Change-Id: Ida21d849a06ed9c0ebf5671214dd9ee8525288d3
2024-02-14 15:10:54 -08:00
Vinit Nayak 5a9d4af170 Log split metrics through individual sessions
* Now we log the original source of the first selected app
as soon as the user selects it (previously we only did when user
selected second app)
* We log the item info for the second app to determine second
surface.
* Added new metrics to log after user has started a split session
and ended a split session
* We log different cancellation reasons (cancel button,
home gesture, general other app interruptions, etc).
* One KI/Bug: When the second app is selected via taskbar in
overview, the container will say hotseat because we are using
Launcher's logger and not Taskbar's. Taskbar's logger manually
overwrites the container in TaskbarActivityContext, we may be
able to make something hacky that can allow us to overwrite, but
that'll have to be a separate change

Bug: 322551862
Test: Logged metrics manually with event and itemInfo
Change-Id: I177623fd00ce62acf2d4ee983b58561d8c946d59
2024-02-13 17:55:08 -08:00
Sunny Goyal dc7cdd8b0c Sending original motion events to launcher overlay along with inferred values
Bug: 273828110
Flag: aconfig use_activity_overlay disabled
Test: Manual
Change-Id: I23cd72a964a647a0fd830befa096f3328e12ff8a
2024-02-13 16:26:37 -08:00
Cliff Wang dd2222749b Merge "Revert "Make sure TAPL waits for Launcher activity to stop each time it stops"" into main 2024-02-05 08:21:54 +00:00
Cliff Wang ac82e995ca Revert "Make sure TAPL waits for Launcher activity to stop each time it stops"
This reverts commit dd33b64a64.

Reason for revert: “DroidMonitor: Potential culprit for Bug b/323619378 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.”.

Bug:323619378
Change-Id: Iadaa80f2cc51f39ae3ab73cdd49a98d05835506e
2024-02-05 04:46:17 +00:00
Vadim Tryshev f9eced5768 Merge "Make sure TAPL waits for Launcher activity to stop each time it stops" into main 2024-02-03 02:33:53 +00:00
Vadim Tryshev dd33b64a64 Make sure TAPL waits for Launcher activity to stop each time it stops
This helps to ensure that the test doesn't proceed while the activity is
still stopping and it's state hasn't settled.

We introduce a count of STOP events and make sure it's 0 except for
cases where stops are safe to ignore or we have waited for them.

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: I51c73c89854fcaa390d47a57389da18b2ce0ee6c
2024-02-02 15:21:20 -08:00
Sunny Goyal 558196ef87 Merge "Splitting bindItems method to also accept already inflated views which will eventually allow us to inflate icons on the background thread" into main 2024-01-30 18:49:20 +00:00
Sunny Goyal eb5684ce1e Splitting bindItems method to also accept already inflated views
which will eventually allow us to inflate icons on the background thread

Bug: 318539160
Test: Presubmit
Flag: None
Change-Id: I61e4981c1c3201e92102153d9558a0885637da3a
2024-01-30 00:44:26 -08:00
Sebastián Franco ea73bf5d77 Merge "Removing the Worskapce as a dependency of CellLayout" into main 2024-01-30 02:19:19 +00:00
Sebastian Franco 2986e0b4d1 Removing the Worskapce as a dependency of CellLayout
This will make it easier to test CellLayout, also we should avoid
circular dependencies as much as poisble.

This also allows the CellLayout to be created in other containers
that are not workspace.

Bug: 318417510
Test: creating HotseatReorderUnitTest in follow up cl
Test: TaplReorderWidgets
Test: ReorderAlgorithmUnitTest
Flag: NA
Change-Id: Ic45029a244cb11f8d6775c50b90af9c56f01eaa3
2024-01-26 09:28:57 -08: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
Sunny Goyal dff4231a67 Merge "Moving view inflation in Launcher to a separate class" into main 2024-01-25 01:13:12 +00:00
Sunny Goyal 4e0142328f Moving view inflation in Launcher to a separate class
Bug: 318539160
Test: Presubmit
Flag: None
Change-Id: Iacf9bec39c63cc7a31fae5628bb588ccb765663c
2024-01-24 15:06:31 -08: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
Andy Wickham a601341ff5 Add a WindowInsetsAnimationCallback to listen to IME changes.
This handles cases that were previously ignored, such as dismissing
the IME with the back key/gesture.

Removed extraneous manual state updates that were used for specific
cases previously. The only remaining state updates are from our
controlled IME animation in KeyboardInsetsHandler, as that correctly
handles the case where you start closing the IME but end up keeping
it open (or vice versa).

Bug: 277738379
Fix: 320659754
Test: Manually go through various IME transitions on Launcher,
open and close apps, lock/unlock, etc to verify keyboard state
is correctly updated. And verify b/320659754 steps do not repro.
Flag: NA

Change-Id: I4787afbb37eed815b909a0215d8afeb3894ab985
2024-01-23 15:56:37 -08:00
Vinit Nayak 7c7ece3efe Rename isSplitSelectionEnabled() to isSplitSelectionActive()
Bug: 295467097
Change-Id: I5c518c3e7227c034956fb92590b7472ba4a71d39
2024-01-23 15:41:14 -08:00
Sebastian Franco 9ae403298d Updating launcher settings so that they become split-screen
Following this guide:
https://developer.android.com/guide/topics/large-screens/activity-embedding#extract_an_activity_from_a_split_to_full_window

Bug: 204463748
Test: Open the settings app and open multiple settings, for now
only the options inside of the launcher3 package work
Flag: ACONFIG com.android.launcher3.Flags.enableTwoPaneLauncherSettings DEVELOPMENT

Change-Id: Ie6a9eb3760171da92d94cf06376127b02afff8df
2024-01-19 22:33:20 +00:00
Sunny Goyal 1d8ed798a8 Removing binder claas from main thread related to widget sizes
Widget size is deterministic based on device profile, so it can be
set during the loader itself. Any further changes are handled by
workspace

Bug: 318539160
Test: Verified inflated widgets have correct size
Flag: N/A
Change-Id: I84e803a5ccd49bcc6c2a19ab326f6bc1a3d9a5bd
2024-01-17 12:23:56 -08:00
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
Johannes Gallmann 4743cb3b87 Merge "Disable back gesture in Launcher after reboot" into main 2024-01-12 20:24:54 +00:00
Johannes Gallmann 9e91335473 Disable back gesture in Launcher after reboot
It needs to be ensured that `updateDisallowBack` is called at startup after views are created.

Bug: 318786031
Flag: NONE
Test: Manual, i.e. verifying that back gesture is disabled after rebooting the device
Change-Id: I32812101c0e159f5cba41ab419f86de760449906
2024-01-11 12:23:22 +00:00
Sunny Goyal 31e27ed934 Moving widget inflation logic to a separate class
This allows us to reuse this logic at other places

Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: I2e19aad207efb3a99bb3b70ba71c076699dba2bc
2024-01-10 10:41:44 -08:00
Sunny Goyal fdeb19e02c Simplifying pending widget inflation path
Instead of adding a PendingView in appWidgetHost, attaching a
listener in PendingView for widget-updates.

This moves the view inflation as the last stage of widget
binding. Eventually we can separate the model update and view
inflation to different threads

Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: I124edaa9622fa367302b80969036d128a978396e
2024-01-08 15:52:50 -08:00
Sunny Goyal 4df719a1e6 Removing ENABLE_CACHED_WIDGET since we now have always listenign widget
> Also using PendingWidgetView for deferred widget view

Bug: 270395008
Flag: LEGACY ENABLE_CACHED_WIDGET enabled
Test: Exising widgets tests pass.
      Verified UI by forcefully rendering deferred widget

Change-Id: Id34f89d778f9f993c1b7ad13f66e57fda9843417
2024-01-04 09:26:10 -08:00
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
Jon Miranda 20fdc7b508 Move taskbar clean up so that it only gets called when user swipes up to go home.
This fixes the bug where the flag gets set when user taps on nav handle, which
results in the taskbar animation playing.

Flag: N/A
Test: open app
      wait for taskbar to finish stashing*
      tap on nav handle
      nothing happens (desired affect)
      * I will address tapping on taskbar while its animating in a separate change
Bug: 292108880
Change-Id: I75870050225bdd951c69224d272d0bd5a3d6d4ea
2023-12-13 02:51:28 +00:00
Jeremy Sim 160225029d Merge "App Pairs: Launch animation" into main 2023-12-12 00:58:49 +00:00
Sebastián Franco f217079aea Merge "Move onInitialBindComplete to ModelCallbacks" into main 2023-12-11 19:31:15 +00:00
Sebastian Franco 0b461efeeb Move onInitialBindComplete to ModelCallbacks
Changes are part of go/launcher_SoR .

Flag: NA
Bug: 301108526
Test: TaplWorkspace
Change-Id: I1a12309897a04f3ae1642fcdc9f984f7f274ba13
2023-12-11 10:07:40 -06: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
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
Sebastián Franco c811263007 Merge "Moving finishBindingItems to ModelCallbacks" into main 2023-12-08 16:06:32 +00:00
Fengjiang Li 83a6a2cd42 Merge "Clear mOnInitialBindListener in Launcher#onDestroy()" into main 2023-12-08 04:05:28 +00:00
Fengjiang Li 17720f1699 Clear mOnInitialBindListener in Launcher#onDestroy()
Bug: 305643224
Test: manual
Flag: N/A
Change-Id: I8c5f670dc7d42eb03e0017a11a0beca2c5005cd3
2023-12-07 17:54:29 -08:00
Sebastian Franco 6196b9067f Moving finishBindingItems to ModelCallbacks
Changes are part of go/launcher_SoR .

Flag: NA
Bug: 301108526
Test: TaplWorkspace
Change-Id: I4c35b540511c9655de1aa1fd0a808a75e7295c1b
2023-12-07 10:58:02 -06:00
Sebastian Franco e4965124ad Moving startBinding and clearPendingBinds to ModelCallbacks
Changes are part of go/launcher_SoR .

Flag: NA
Bug: 301108526
Test: This is a no-op change, compiling should be the test
Change-Id: I49eb6f88bb680c289f4e73cc108671b37b18fae7
2023-12-05 13:04:42 -06:00
Sebastián Franco f601447877 Merge "Moving bindAppsAdded and setIsFirstPagePinnedItemEnabled to ModelCallbacks" into main 2023-12-01 17:58:11 +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
Vadim Tryshev 54dbd42cae Merge "Waiting for Launcher activity to stop when starting a Launchable" into main 2023-11-29 21:57:45 +00:00
Vadim Tryshev 1b058fd467 Waiting for Launcher activity to stop when starting a Launchable
This will help to ensure that Launcher state has settled before continuing the test.

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: I8bed0225617a225c2dc9587a75d004b98395fe1f
2023-11-29 13:55:46 -08:00
Sunny Goyal eb29313595 Updating WidgetSheets so that it can be displayed in any
activity and not just Launcher

Bug: 307306823
Test: atest Launcher3Tests
Flag: NA
Change-Id: I0e33323805c6e895e3a1639ecf5933e698212c65
2023-11-27 11:17:04 -08:00
Jordan Silva 2e1b287038 Merge "Use DeviceProfile numFolderRows and numFolderColumns" into main 2023-11-24 12:29:19 +00:00
Sebastian Franco 6dda7c770c Moving bindAppsAdded and setIsFirstPagePinnedItemEnabled to ModelCallbacks
Changes are part of go/launcher_SoR .

Flag: NA
Bug: 301108526
Test: This is a no-op change, compiling should be the test
Change-Id: I79a651c9d57e443037e330728540616b0d01434a
2023-11-22 11:19:20 -06: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
Fengjiang Li f05c0f5843 Merge "Only log COLD_DEVICE_REBOOTING startup latency logs" into main 2023-11-18 16:36:35 +00:00