Commit Graph

1825 Commits

Author SHA1 Message Date
Sebastian Franco
bd7919c97a Moving the simple methods related to binding to a delegate
Other more involved methods should require their own cl so that
we can do a more thurough analysis.

Changes are part of go/launcher_SoR .

Bug: 301108526
Test: This is a no-op change, compiling should be the test
Change-Id: I332a6b92cfd8dc6a9632c225da634bc4b57f01e2
2023-10-05 09:50:16 -07:00
Kevin Lim
07546b88e7 [AppInfo] Enable logs for debugging unexpected AppInfo changes.
Here's a sample log run through of AllAppsStore and PackageUpdatedTask
logs: http://gpaste/5250747917664256

Bug: b/290090023
Flag: None. Adding logging.
Test: None. Adding logging.
Change-Id: Ia1d620a50267d6a65fe719936d7e87e6dad13afa
2023-10-02 19:40:58 +00:00
Sebastián Franco
94f7b53a54 Merge "Adding a keyboard shortcut delegarte to move logic outside of the launcher" into main 2023-09-29 18:03:02 +00:00
Sebastián Franco
d37195dc35 Merge "Moving getters and setters to the end of the file" into main 2023-09-28 20:13:46 +00:00
Sebastian Franco
4080fddfe7 Adding a keyboard shortcut delegarte to move logic outside of the launcher
Bug: 301142423
Test: compiling, this change is a no-op change
Change-Id: I2f5ee35a9ab645c26cc97669f6a745490fdfdb61
2023-09-28 10:03:17 -07:00
Sebastian Franco
8a3de21fcd Moving getters and setters to the end of the file
Parto of go/launcher_SoR

Test: compiles, this doesn't move logic and if it compiles everything is still there
Fix: 301003366
Change-Id: I07b73a60e162001c3cecb7beb51efb5474b562df
2023-09-19 15:31:50 +00:00
Liran Binyamin
a833af316b Adjust the hotseat when the bubble bar becomes visible
When the bubble bar becomes visible the space between icons in the
hotseat is now adjusted. This change only does it when the QSB is
above the icons, but this will be changed in the future to be based
on the amount of space between the hotseat and the edge of the screen.

When the hotseat is adjusted, the new width is smaller by the size of
2 icons. The icons are then translated to be evenly spaced within the
boundaries of the new width.

Since the adjustment is only applied when the QSB is above the icons,
it is resized accordingly to the new width.

All visual updates currently snap to the new position, but will be animated
in a follow up.

Demo: https://recall.googleplex.com/projects/3391fc5c-599d-4827-b6f8-d2deb160aa99/sessions/fad1a5c5-e9cf-4586-92e4-1e92df3b002e

Bug: 280494203
Test: Manual (on tangor)
      - Set device to landscape
      - Make the bubble bar visible by adding a bubble
      - Rotate to portrait mode
      - Observe that the hotseat is adjusted
      - Rotate to landscape
      - Observe that the hotseat adjustment is removed
      - Rotate back to portrait
      - Observe that the hotseat is adjusted again
      - Dismiss the bubble to hide he bubble bar
      - Observe the hotseat adjustment is removed

Change-Id: I5b02a60b6cb301ffa2507a6d825c748a782cca18
2023-09-13 17:08:42 -04:00
Federico Baron
092064e1d0 Merge "Add smartspace custom widget" into main 2023-09-12 18:43:58 +00:00
Holly Jiuyu Sun
50fac00e96 Merge "Set focus to EditText after open Toast with Meta key." into udc-qpr-dev am: 997bc3e362 am: 2acdc942a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24667858

Change-Id: I34d858aca76915406722227d2c587433c650f07a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-12 04:43:44 +00:00
Holly Sun
d9d70eaca1 Set focus to EditText after open Toast with Meta key.
Meta key is an a11y action, which is set up in platform for action `GLOBAL_ACTION_ACCESSIBILITY_ALL_APPS`: https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java;l=3573-3591;drc=34be95719dafc554f5ffc9ebb025e011fc81c7e9. `TouchInteractionService` is the one that implements the action: https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/quickstep/src/com/android/quickstep/TouchInteractionService.java;l=573;drc=b2ac210120abc4620f81e41d7a737f5f0009e5e0. `createAllAppsAction()` (where we set `INTENT_ACTION_ALL_APPS_TOGGLE`) only has this one caller. So `Launcher#toggleAllAppsFromIntent` is the exclusive path to handle a11y action.

Current behavior: when "Swipe up to start search" toggle is ON, everything works fine (keyboard up and focus set); when toggle is OFF, keyboard is up but without focus set.
With this change, keyboard up with focus set regardless of the toggle value. From https://docs.google.com/presentation/d/19iTRDGL-GSMfkTIXY8q2qjHQu2Fiih6CVhLqlwtV1bc/edit#slide=id.g13b39c67f16_0_108, the focus should be set for Meta key no matter what. Also, with talk-back on, the focus is also set to the input box with this change.

Vide: https://drive.google.com/corp/drive/u/0/folders/1yFlq7ldP0u1i3tSVpk72FsMu7QRZaUGM

Bug: 289058571
Test: manual
Flag: N/A
Change-Id: Ie471641f13cf9bd7d38f0e330d4f6c8c564b07b8
2023-09-08 14:56:56 -07: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
Sukesh Ram
3f2338a8e8 Remove Windowing Prototype 1 from Codebase
Refactor codebase to remove Proto1 as it is no longer supported.

Test: aTest WMShellUnitTests
Bug: 297217817
Change-Id: Ifaf67754c048d913fe203f4b34efc3c9c611039c
2023-08-30 17:40:13 +00:00
Vinit Nayak
654604037a Add back gesture support when split selection active
* Currently this exits the current launcher state
back to homescreen whenever back is performed while
split selection is active.
* Open UX question if that needs to be changed.

Test: Did back gesture from workspace, overview, all apps
http://recall/-/cMb5xTTxhmZtFt04eYnmQj/g0kpGTsqlj0RSt4OfDBkpf
Bug: 295449659
Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE
Change-Id: I74fe51aaf4301fb723d2e69e6b1b39d127f492d8
2023-08-24 17:52:37 +00:00
Treehugger Robot
1d235fca54 Merge "Adding CannedAnimationCoordinator to enable running a predefined animation in Launcher" into udc-qpr-dev 2023-08-23 20:28:04 +00:00
Sebastián Franco
2c9a2f2353 Merge "Remove odd screen ids when isTwoPanels is true" into udc-qpr-dev 2023-08-22 20:02:29 +00:00
Sunny Goyal
0ee66478c6 Adding CannedAnimationCoordinator to enable running a predefined animation in Launcher
> The coordinator takes care of recreating animations on layout changes and
   linking it with state animation
> This also ensures that there is only one animation playing at a time

Bug: 293464892
Test: Verified that calling with multiple animations cancels previos call
Flag: None
Change-Id: Iab161720c94843b5834734da78167344c17539c8
2023-08-21 12:55:42 -07:00
Sebastian Franco
ddd0450f6b Remove odd screen ids when isTwoPanels is true
We where adding more CellLayouts but they where later
removed by removeExtraEmptyScreenDelayed but when rotated
the pagination animation is created before they are removed.

With this change the extra CellLayouts won't be added in the first
place.

Fix: 291822492
Test: RoerderWidgets
Test: FoldableItemsIntegrity
Change-Id: I561d2ce961a7ecc50f7a8c99c4acc44262b2e211
2023-08-18 12:51:00 -07:00
fbaron
c7a605ea82 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. Here we fix those issues.

Fix: 294229186
Fix: 294231977
Flag: no flag
Test: n/a
Change-Id: I962042efcee6fcea2e46acd585b7f1403078b548
2023-08-17 10:58:15 -07:00
Sunny Goyal
c1d1e68a82 Removing some unused overrides in Launcher
> Changing AddItemActivity to use RemoteAnimation directly
  to avoidTransitionManager override

Bug: 273828110
Test: Manual
Flag: N/A
Change-Id: I49777e7eeba00319476b0a239bc1cdac37833457
2023-08-11 12:31:49 -07:00
Sebastián Franco
1f4d56c01e Revert "Remove flags ENABLE_TWO_PANEL_HOME FOLDABLE_WORKSPACE_REORDE and FOLDABLE_SINGLE_PAGE"
This reverts commit 76a1ceb5f2.

Reason for revert: Add flag back to turn it off for further testing

Bug: 270395274
Merged-In: I10b9e99734b14cbbe8d1190300493099a1f28a24
Change-Id: I10b9e99734b14cbbe8d1190300493099a1f28a24
2023-08-09 20:43:47 +00:00
Jeremy Sim
6390654526 Merge "App Pairs: Implement save, inflate, launch, and delete" into udc-qpr-dev 2023-08-08 00:56:04 +00:00
Nicolo' Mazzucato
e120fcfa47 Add better logging around long launcher operations during unfold
This logging helps understanding what's going on in Launcher main thread
 during unfold from perfetto traces.

Test: Perfetto trace after unfolding
Bug: 292472402
Change-Id: I7a037d9a129deb4bfe4310fdba664b87164ef2ca
2023-08-07 12:18:10 +00: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
Schneider Victor-tulias
c73b653e1d Merge "Fix home animation jank when quickly pressing home button" into udc-qpr-dev 2023-07-25 21:01:47 +00:00
Schneider Victor-tulias
3913e297e9 Fix home animation jank when quickly pressing home button
Pressing the home button a second time while the app icon is animating cancels the animation. The listener view's AFV doesn't need to be explicitly closed since it will be cleaned up.

Flag: not needed
Fixes: 291807246
Test: manually pressed the home button twice quickly
Change-Id: Ia963e06da78742eade91a6174c3d5f5328368bc5
2023-07-24 10:44:41 -07:00
Sunny Goyal
cd5d3d0c31 Merge "Removing LauncherActivityRule as it can be flaky based on when the rule was initialized" into udc-qpr-dev 2023-07-17 16:58:20 +00:00
Sunny Goyal
f6b79f7caf Removing LauncherActivityRule as it can be flaky based on when
the rule was initialized

Bug: 289161193
Test: Presubmit and PostSubmit
Flag: N/A
Change-Id: I0e1e9c6f932d2a98a2f1e47bd1665e26f2db9eb4
2023-07-14 10:29:55 -07: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
Treehugger Robot
a5af8b4276 Merge "Fix inability to remove or interact with folder when removing 2nd item from folder" into udc-qpr-dev 2023-07-12 23:17:30 +00: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
Brian Isganitis
69ac9b8169 Merge "Cleanup raw usage of AllAppsStore." into udc-qpr-dev 2023-07-12 16:31:11 +00:00
Vinit Nayak
64f3766ba7 Merge "Dismiss split select when tapping on home button" into udc-qpr-dev 2023-07-11 23:06:47 +00:00
Brian Isganitis
e9eacb38fa Cleanup raw usage of AllAppsStore.
Test: Compiles
Bug: 287523421
Flag: No
Change-Id: I35cdb1b281f251b74305129b583f29cdb29e15a6
2023-07-11 18:41:45 -04:00
Schneider Victor-tulias
19c22c20b2 Merge "Add debug tracing Launcher's lifecycle callbacks" into udc-qpr-dev 2023-07-11 22:35:53 +00:00
Brian Isganitis
f54c6fa4b4 Revert "Revert "Provide AllApps item OnLongClickListener through ActivityContext.""
This reverts commit 853a5b9e0c.

Fixes SecondaryDisplayLauncher class by using lambda instead of method
reference for #getAllAppsItemLongClickListener. This change is necessary
because mDragLayer is late-init.

Test: Home Settings > Developer Options > Launch Secondary Display
Bug: 289261756
Flag: No
Change-Id: I7b83f81651dde360edea6ee7bea6cc82441e6bef
2023-07-11 13:21:47 -04:00
David Saff
853a5b9e0c Revert "Provide AllApps item OnLongClickListener through ActivityContext."
This reverts commit 0acab2532d.

Reason for revert: b/290403189

Change-Id: Ie3f67f78a8ffce8c2d5a92f65a7e74d788c82a81
2023-07-11 10:45:33 +00:00
Vinit Nayak
f6c2e87747 Dismiss split select when tapping on home button
Bug: 276361926
Test: Initate split, dismiss whenever home is pressed,
doesn't dismiss when all apps dragged down
Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE

Change-Id: Idc95123e27963c3913d04c6eb27f0e4c9b1eb401
2023-07-10 11:06:42 -07:00
Brian Isganitis
0acab2532d Provide AllApps item OnLongClickListener through ActivityContext.
This cleans up how alternative AllApps implementations such as Taskbar
and SecondaryDisplay override the default INSTANCE_ALL_APPS listener.
This change will also be helpful for Toast in Taskbar drag-n-drop.

Test: Manual
Bug: 289261756
Flag: n/a
Change-Id: I55eb881bcd1e210852d435a3ea2a6686ce0a9838
2023-07-06 22:12:20 +00:00
Schneider Victor-tulias
84c66b69ff Add debug tracing Launcher's lifecycle callbacks
It is possible that SimpleActivityRule is not being properly notified of Launcher's creation in Platinum tests.

Flag: not needed
Bug: 289161193
Test: AddWidgetTest
Change-Id: I09947e7202129d9335f737dcd626f706de6dbf00
2023-07-06 10:44:16 -07:00
Holly Sun
35b9960b63 [a11y] Fix crash when using talkback to add to home screen.
1. Fix a crash from http://cs/android-internal/packages/apps/Launcher3/src/com/android/launcher3/Launcher.java;l=1928;rcl=d677caa75de74f1c3a88367cad67ae405fd2903d. It can also be `ITEM_TYPE_SEARCH_ACTION`. Remove the `itemType` check and just use the `PendingAddItemInfo` class type.
2. Override `startConfigActivity` in `PinShortcutRequestActivityInfo`, so that `Launcher#onActivityResult` can be triggered properly from `Launcher#processShortcutFromDrop` (http://cs/android-internal/packages/apps/Launcher3/src/com/android/launcher3/Launcher.java;l=1939;rcl=d677caa75de74f1c3a88367cad67ae405fd2903d )
3. Then we call to `Launcher#completeAdd` -> `completeAddShortcut`. The original `info` passed to `processShortcutFromDrop` doesn’t have a `componentName` (new code), so remove the component non-null check from `completeAddShortcut`.

Bug: 287166186
Bug: 287167527
Bug: 287166771
Test: manual
Flag: N/A
Change-Id: Id3e1444de188f2d2af760f58e3d9814a2b7abd88
2023-06-30 08:42:31 -07:00
Winson Chung
6482c91676 Merge "Reset the static preloaded icon result once launcher is hidden" into udc-dev am: 7cd608594b am: f2433f39eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23697218

Change-Id: I63ea52de92f342eebac6e7b796e4aded305e0a16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-19 06:45:30 +00:00
Winson Chung
7c500166b2 Reset the static preloaded icon result once launcher is hidden
- In the case where the system does not play the requested animation
  we can still ensure that this doesn't result in a leak of the
  activity by resetting the result when launcher is hidden (which
  happens after the launch transition)

Bug: 285995223
Test: Presubmit
Test: Take heapdump after repro steps in b/285995223#comment6 and verify
      there are no lingering static icon load results

Change-Id: I1d169df158cfaab64fbe1f4ce597d8f73d86a1c1
2023-06-14 19:39:58 +00:00
Brandon Dayauon
383cc17a6f Merge "Fix custom buttons with translated string" into udc-qpr-dev 2023-06-14 16:13:48 +00:00
Sebastián Franco
29a13676f4 Merge "Remove flags ENABLE_TWO_PANEL_HOME FOLDABLE_WORKSPACE_REORDE and FOLDABLE_SINGLE_PAGE" into udc-qpr-dev 2023-06-13 23:08:40 +00:00
Sebastian Franco
76a1ceb5f2 Remove flags ENABLE_TWO_PANEL_HOME FOLDABLE_WORKSPACE_REORDE and FOLDABLE_SINGLE_PAGE
Fix: 270392643
Fix: 270395070
Fix: 270395274
Test: atest FoldableItemsIntegrity
Change-Id: I2d7af312da8aeb070588ca94a2a256d2def65eeb
2023-06-12 18:05:22 -07:00
Brandon Dayauon
076dcdfd54 Fix custom buttons with translated string
The reason why the buttons aren't being updated with the translated string is because the cache the views get the string from is not updated/loaded with the new language.
Rather, the update happens after the view has been inflated. With this change, when the string cache updates in bindStringCache(), we update the UI right then.

bug: 280958663
test: Manual
Change-Id: I7a49ee401d5a5f3268cfaef1abee8153e913a8ce
2023-06-12 14:33:08 -07:00
Sunny Goyal
c80e60dc7a Making UserCache the source of truth for all user events
Bug: 243688989
Test: Presubmit
Flag: N/A
Change-Id: I0e6b853d965eff1abaeb3b26dd6b94424e5212df
2023-06-07 20:43:36 -07: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
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