Commit Graph

540 Commits

Author SHA1 Message Date
fbaron fc6bbcfed2 Align workspace and hotseat icons in landscape
Fix: 311381639
Test: Verified on device
Flag: NONE
Change-Id: I4e2c74f59e8492042c3c7f8eccc98921d92d685f
2024-02-01 01:04:40 +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
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
fbaron 0f2ca91b8b Add PreviewItemManager unit test to check if icons are themed when they shoudl be in folder previews
Fix: 317417863
Test: PreviewItemManagerTest
Flag: NONE
Change-Id: I067a8d9d2ef4890e816d44ee62f7f5c1119cdd83
2024-01-05 16:01:58 -08:00
Thales Lima df643c4540 Merge changes from topic "numFolderRows" into main
* changes:
  Update dump tests
  Make numFolderRows/Columns accept more values
2023-12-11 10:54:04 +00:00
Jeremy Sim 2987d95ba4 App Pairs: Implement Taskbar functionality
[App Pairs 8/?]

This CL adds taskbar functionality for app pairs:
- Ability to drag an app pair icon to Taskbar
- App pair launch from Home Taskbar
- App pair launch from Overview Taskbar
- App pair launch from in-app Taskbar

KNOWN ISSUES:
- Bug (b/315190686): if user is inside a running split pair and attempts to launch the same pair from an app pair icon on taskbar, Overview tiles get temporarily messed up (recoverable by leaving Overview)
- User can attempt to split with an app pair icon on the Taskbar. This should result in a "can't split with this" bounce animation on the SplitInstructionsView (to be implemented). Currently does nothing.

Bug: 274835596
Flag: ACONFIG com.android.wm.shell.enable_app_pairs DEVELOPMENT
Test: Manual
Change-Id: I5256547af236fc2deeb192d60bfe1f2b7ddc5647
2023-12-08 15:07:45 -08: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
Saumya Prakash 86285d477d Ensure Taskbar stashes when launching an app from folder
We use the folder closing callback to trigger a call to stash the
taskbar if an app was launched. We can check whether an app was launched
from a folder based on whether a folder's view is open when
an app is launched. This ensures that the taskbar only stashes after the
folder is done animating.

Flag: NA
Fix: 295296529
Test: Launched an app in a folder on taskbar. Also ensured that other
taskbar behavior remains unchanged.

Change-Id: Ib5a797186978ee960e44b6b62c833eead03bccd0
2023-12-08 20:16:15 +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
Jordan Silva 2e1b287038 Merge "Use DeviceProfile numFolderRows and numFolderColumns" into main 2023-11-24 12:29:19 +00:00
Sebastian Franco 5f0af4f633 Moving classes inside of CellLayout to their own file
This is a no-op change ensure this we have ReorderAlgorithmUnitTest.

Flag: NA
Bug: 229292911
Test: ReorderAlgorithmUnitTest
Change-Id: I6ffe2a1260f869a4686a9f1e652dd1ab6d406269
2023-11-23 23:13:56 +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
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
Luca Zuccarini 6ab61069f3 Refine way to trigger the keyboard for a controlled insets animation.
Before we did it as normal just without requesting focus. However, we
also need to not log the new state, as this must happen only after the
controlled animation has completed (or been cancelled).

Bug: 309756056
Flag: NA
Test: manual
Change-Id: I7f1564d2b29d91c9fdb0afce586fe5cc1148bac0
2023-11-14 08:20:40 +00:00
fbaron 1e360c1a92 Folder preview work badge theming fix
Currently the preview apps in a folder icon have the work badge with theming even when themed icons is off

Fix: 306665193
Test: Verify that folder with work icons has non-themed work badge when themed icons is off
Flag: NONE
Change-Id: I78ca7cb2361f6e590742fa64c88397d1ea80be68
2023-11-08 12:30:58 -08:00
Pat Manning 4c27e8c6f0 Migrate cursor feature flag to trunk stable flag.
Fix: 300054410
Test: TaplTestsTransientTaskbar, TaplTestsQuickstep
Flag: enableCursorHoverStates
Change-Id: I5c320e0fd2bdd2ed39b00b62b1399e163c3384e7
2023-10-20 12:17:36 +01:00
Federico Baron 9c4132b31d Merge "Fix indexoutofbounds folder preview" into main 2023-09-21 19:25:04 +00:00
fbaron 7f4bbfa599 Fix indexoutofbounds folder preview
The indexoutofbounds issue came from the fact that folder was being animated open when there are no items in preview. It might be a race condition where we try to open the folder at a time where it's actually being emptied. This check should prevent folders from running animateOpen() if there's <= 1 items, avoiding the outofbounds error

Fix: 298740874
Flag: no flag
Test: no test
Change-Id: I31ed53fbdf22a7f19bc9ec414242312afe7c6cd2
2023-09-20 23:57:00 -07:00
Pat Manning 349f101411 Merge "Migrate ENABLE_CURSOR_HOVER_STATES to aconfig" into main 2023-09-19 16:56:45 +00:00
Pat Manning c49d60b946 Migrate ENABLE_CURSOR_HOVER_STATES to aconfig
- Keeping FeatureFlags.ENABLE_CURSOR_HOVER_STATES for local testing until aconfig is available in FlagFlipper
- Still reference ENABLE_CURSOR_HOVER_STATES in tests as aconfig still can't be mocked

Bug: 300054410
Test: manual
Change-Id: Id385e8ee32ccf8b920b9b7f9cc620af32def589f
2023-09-14 11:08:02 +01:00
Jagrut Desai 311d519292 Fix TaplTestsNexus#testSearchForApp
This cl is 1/2 part change

We are currently getting StaleObjectException when running this test.
We want to implment a synchoronized event beetween test and launcher,
so we know that search result adapter is done updating and page will
get no more updates of search results.

Test: Presubmit
Bug: 232008758
Flag: not needed
Change-Id: I40cf9b83d231a2487220aabc8f8e8c3ca71f255c
2023-09-13 11:09:05 -07:00
Pat Manning cc0d8919ee Scale Launcher folders on hover.
Bug: 243191650
Test: PreviewBackgroundTest
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: I8035501203af5c2d97b62cc79e576303e57f8b99
2023-08-25 20:02:23 +01:00
Luca Zuccarini 95bc2ce2cc Update usage of ExtendedEditText.showSoftInput().
Fix: 276637107
Flag: N/A
Test: manual

Change-Id: I61eeff5fb69d00b44e7987458a808f59998be676
2023-08-08 15:05:44 +00:00
Johannes Gallmann a82eebd286 Extract Launcher resource interpolators to Animation Library
Bug: 292080029
Test: atest InterpolatorResourcesTest
Change-Id: I65dba4eb3f96844d4f9a4d0af608c0bd8e77ccc2
2023-07-22 09:52:53 +02:00
Fengjiang Li 080f9326ab Handle nullable CellLayout when removing app icon from folder
If CellLayout is null, instead of early return that will lead app icon not clickable, we should fallback to use Launcher as activity

Fix: 290973455
Test: attached to video
Change-Id: I10b03f3f41dd672116133af83ae8a5b066824d71
2023-07-13 10:30:19 -07:00
fbaron 5a7ea3069b Fix inability to remove or interact with folder when removing 2nd item from folder
Fix: 289960317
Test: Verify in unfolded felix that going from 2 icon folder and dragging 2nd icon out of folder lets you open the app that remains where the folder was
Test: Verify in unfolded felix that going from 2 icon folder and dragging 2nd icon into remove droptarget removes the folder and turns it into a single clickable icon
flag: no flag
Change-Id: I26138ee9f8e7cdb45cafe2446dc4d1e3d6d8347f
2023-07-12 14:15:00 -07:00
Jordan Silva 637f4eb2f3 Update DeviceProfile to calculate responsive grid for folders
It uses the new responsive folder calculations and specs when responsive grid is enabled. The grid has to have folderSpecsId defined to use the new specifications, otherwise it will use the current scalable grid implementation.

Fix: 284155638
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenFolderImageTest
Test: HomeScreenFolderImageTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I535cff4bb00e969f782447a898230fe2b2c05cc9
2023-06-21 12:18:58 +01:00
Fengjiang Li 9c17c9f046 Merge "Fix NPE where CellLayout is null when removing item out of folder" into udc-dev am: 5d81dd2d77 am: d0642ee589
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23521759

Change-Id: I92674e401f3280237dba0551687ce81f3ff01bd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-08 19:51:07 +00:00
Fengjiang Li d29db8ea4d Fix NPE where CellLayout is null when removing item out of folder
Fix: 282249989
Test: create a folder of 2 app icons, remove one icon out of folder, no crash
Change-Id: I3c132ec8833c7cb14066cc403c0641d089bab8ab
2023-06-07 15:36:54 -07:00
Kateryna Ivanova 72fbdc7976 Merge "Migrate Interpolators from Launcher3 to the public animation library" into udc-qpr-dev 2023-05-31 15:25:40 +00:00
Fengjiang Li 4f8fc56598 Merge "Clip folder chidren during folder open/close animation" into udc-dev am: a640098439 am: c4ab06d77d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23355102

Change-Id: I237fe3df960b3a279cfee416380dd7f87c65b636
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 21:47:32 +00:00
Kateryna Ivanova 7120373bbc Migrate Interpolators from Launcher3 to the public animation library
Test: atest
Bug: 271850966
Change-Id: Iba999f2e753764a37d35e508e707df02388432e9
2023-05-30 07:20:38 +00:00
Fengjiang Li a72c216829 Clip folder chidren during folder open/close animation
Test: close folder and verify app icons are not clipped
Fix: 283527491
Change-Id: Ia2aed207d07fc210cd04f05fd2e319f393209396
2023-05-23 15:15:31 -07:00
Stefan Andonian 61e73989e2 Merge "Fix NPE in FolderPagedView" into udc-dev am: 6597d5ec3c am: 0308e2506c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23298096

Change-Id: I1f0586064956deb147ff2d30693a9adafed1d798
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 22:21:02 +00:00
Stefan Andonian 6597d5ec3c Merge "Fix NPE in FolderPagedView" into udc-dev 2023-05-19 20:45:31 +00:00
Fengjiang Li c7613ebf17 Merge "Fix NPE of FolderPagedView#setFocusOnFirstChild" into udc-dev am: 0d07a85299 am: 63144d9a29
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23254588

Change-Id: I6f203417d5699fc57149dcc81ce465594fca4782
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 23:14:46 +00:00
Fengjiang Li 0d07a85299 Merge "Fix NPE of FolderPagedView#setFocusOnFirstChild" into udc-dev 2023-05-18 22:42:47 +00:00
Stefan Andonian 324b6e0ff5 Fix NPE in FolderPagedView
Bug: 282945356
Test: Compilation worked properly.
Change-Id: Ice59274ec0979550388c5d8a8f17f6e912d7ccb3
2023-05-17 20:22:12 +00: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
Fengjiang Li 106d91d04c Merge changes I1136ede4,I5f0877fe into udc-dev
* changes:
  [Folder] Fix bug where folder name and page indicator is visible when cancelling folder open animation
  Fix bug where quickly ending folder animation with back swipe caused icons not clipped to folder
2023-05-16 21:20:09 +00:00
Charlie Anderson afb447ee0d Merge "Adding a new Edit Mode LauncherState" into udc-dev 2023-05-16 18:42:34 +00:00
Fengjiang Li 533275683b [Folder] Fix bug where folder name and page indicator is visible when cancelling folder open animation
We should resgiter all AnimatorListeners before starting folder open animation.

Fix: 282158620
Test: https://b.corp.google.com/issues/282822254#comment2
Change-Id: I1136ede464f37c174296921594ef887d90844eb5
2023-05-16 10:51:51 -07:00
Fengjiang Li c80d0221be Fix bug where quickly ending folder animation with back swipe caused icons not clipped to folder
1. Fix a race condition that the new animation is reading stale UI state which should have been reset in previous animation.
2. Don't set clipChildren=true on folder page view during open folder animation

Fix: 282158620
Test: open folder and quickly back swipe, verify app icons are still clipped
Change-Id: I5f0877fe4157533563df922ba50a6ad540c9ba6e
2023-05-16 10:51:31 -07:00
Fengjiang Li 47d72ffccb Fix NPE of FolderPagedView#setFocusOnFirstChild
Test: open and close folder with swipe back quickly
Fix: 282814528
Change-Id: I163c2f9d54b48684738f8104be8c085f26b52ceb
2023-05-15 21:52:19 -07:00
Treehugger Robot 21339533b1 Merge "Update notification dot color" into udc-dev 2023-05-15 20:21:45 +00:00
fbaron 1406a0f606 Update notification dot color
Bug: 268521231
Test: Verify that notification dot colors match the figma attached in the bug
Change-Id: Id0cbf9f2447819ae3e6e00e880eca1be3f189826
2023-05-15 11:06:46 -07:00
Charlie Anderson 438d405aab Adding a new Edit Mode LauncherState
- Edit Mode doesn't close after dragging / dropping an app
	- Edit Mode can be entered through options popup menu, Spring Loaded still entered by dragging items
	- Adds new onLeavingState call to launcher states to cleanup changes

Bug: 279590398
Flag: MULTI_SELECT_EDIT_MODE
Test: manually tested the new state with flag on/off

Change-Id: If4550037f9659dcb8cd8b1943388d1ec5d55fa29
2023-05-12 14:54:45 -04:00
Jagrut Desai 29fcd9a636 Taskbar All Apps Icon Shortcuts Popup Accesiiblity
Before we were only applying the icon.clearAccessibilityFocus() only on normal popup and not material u popups, since the flag is turned on for udc, we can move it outside.

There seems to be a bug associated with either nested abstract floating views or the accessibility service where upon opening a nested abstract floating view from another the icon get the focus. This change make the bug littl less visible to use but users will still see this bug if they open the shortcut pop agian withought closing taskbar all apps.

The accessibility delegate was always null when using the TaskbarOverlayContext, now we use TaskbarActivityContext Delegate when in TaskbarOverlayContext.

Test: Manual
Bug: 280657266
Flag: not needed
Change-Id: I631e3aa6e54748c4c8ea2ac7daf5473b198e47d6
2023-05-08 16:25:53 -07:00