Commit Graph

1898 Commits

Author SHA1 Message Date
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
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
Sebastián Franco
5f14285de1 Merge "Moving bindSmartspaceWidget to ModelCallbacks" into main 2023-11-17 22:50:07 +00:00
Fengjiang Li
e5f91a4c7a Only log COLD_DEVICE_REBOOTING startup latency logs
Fix: 305391017
Test: Unit test
Flag: NA
Change-Id: I976add25ea14d49e2ea84e395985edb9f559370c
2023-11-17 14:00:51 -08:00
Sebastian Franco
50b74c341a Moving bindSmartspaceWidget 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: I960cb767e3c4db4a952e019ee489ec1611e2dbd2
2023-11-16 17:18:06 -06:00
Sebastián Franco
da18b9e435 Merge "Use the number of shown hotseat icons instead of database items to store into the DB" into main 2023-11-16 15:33:51 +00:00
Sebastian Franco
2d023e26c6 Use the number of shown hotseat icons instead of database items to store into the DB
It seems this issue was originated from ag/14129534 and we should no
longer use numDatabaseHotseatIcons form IDP and use numShownHotseatIcons
from the DP.

Fix: 305119735
Flag: NA
Test: manuall testing, we don't have this test for landscape
Change-Id: Ie530748f9b77d89ac3298c187ae767643d505cb3
2023-11-15 21:34:38 -06:00
Tracy Zhou
bf021974f4 Merge "[Trackpad] Do not reverse two-finger gestures on the homescreen when reverse scrolling is on" into main 2023-11-15 02:22:20 +00:00
Anushree Ganjam
af4f41b9dc Merge "Hide overlay if the overlay was shown when Meta key is tapped." into main 2023-11-09 22:14:41 +00:00
Anushree Ganjam
b736982bab Hide overlay if the overlay was shown when Meta key is tapped.
Before fix : https://b.corp.google.com/issues/300492676#comment13
When Meta key is tapped in -1 screen, the toggleAllAppsFromIntent is called and
AllApps Drawer is shown in home screen. But the user is still in -1 screen.

After fix: https://b.corp.google.com/issues/300492676#comment15
When meta key is tapped in -1 screen, we hide -1 screen and transition
to 0 screen and then show AllAppsDrawer.

Bug: 300492676
Test: Manual, https://b.corp.google.com/issues/300492676#comment15
Flag: NA

Change-Id: I1234e4defdd0b53be35271b9f7567b0719eec7ac
2023-11-08 17:08:57 -08:00
Sebastián Franco
5054899552 Merge "Moving some constants in Launcher.java to a separate file for ease of readability" into main 2023-11-07 21:22:11 +00: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
Tracy Zhou
de8e25cf11 [Trackpad] Do not reverse two-finger gestures on the homescreen when reverse scrolling is on
- Swipe up to pull up all apps
- Swipe down to pull down notifications
- Same gesture to close in reverse scrolling mode

Bug: 301966246
Bug: 301966690
Test: manual
Change-Id: Ia3770ce8b279d24b2de4844f441f14e0feaf57c7
2023-11-02 12:30:50 -07:00
Federico Baron
0282c107fa Merge "Fix page indicator bugs for foldable" into main 2023-11-02 17:34:18 +00:00
fbaron
95ed863d96 Fix page indicator bugs for foldable
There are bugs when unfolding the felix device where the page indicator will appear in the wrong place, and have to animate all the way back to where it should go. This was originally fixed with ag/24399441 but it seems that the issue is still happening when flag FOLDABLE_SINGLE_PAGE is off. Here we fix that issue..

Fix: 294231977
Fix: 291822492
Flag: NONE
Test: n/a
Change-Id: I6ae97ebbb034f5b520a4f5ace729b44b89ea73a0
2023-11-01 14:19:07 -07:00
Ats Jenk
866e77101c Merge "Use aconfig flag for desktop mode" into main 2023-10-31 05:07:02 +00:00
Sunny Goyal
e82a20a44d Removing some dependencies on Activity
> Removing activtiy from overlay callbacks
> Removing usage on activtiyLifecycleCallbacks and managing the callbacks ourselves

Bug: 306225896
Test: Existing tests cover the lifecycle changes
Flag: N/A
Change-Id: I79941e364328eecdc8a72cac4d35b75d50a25319
2023-10-30 08:23:15 -07:00
Ats Jenk
5c25c3a19d Use aconfig flag for desktop mode
Refactors all flag access in Launcher to be from DesktopTaskView and using a method instead of a static field.
Also using static import for the method so if we need to move it, only imports needs to be updated.

Bug: 304778354
Flag: ACONFIG com.android.wm.shell.enable_desktop_windowing TEAMFOOD
Test: enable the aconfig flag, check that desktop windowing is available

Change-Id: Ia2bdfd865802a635878d72cfb5a90c21dad6ed08
2023-10-27 10:58:07 -07:00
Vinit Nayak
a1be4c1123 Use aconfig flag enable_split_contextual
Bug: 276361926
Test: Basic split contextual operations work
as expected

Change-Id: I7202654f8452a0c57e5e728c9baaadf85fa22a96
2023-10-25 01:37:17 +00:00
Luca Zuccarini
2bb6abadd7 Clean up ENABLE_KEYBOARD_TRANSITION_SYNC flag.
Fix: 297592348
Flag: NA
Test: manual
Change-Id: I995acd511a3c7ebc630aaac977f8c380ddfa445f
2023-10-24 13:12:38 +00:00