Commit Graph

1813 Commits

Author SHA1 Message Date
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
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
Anushree Ganjam 87cb7ad06a Merge "Add UID in AppInfo." into udc-dev am: 9b4f62e681 am: eb9cd7e26e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23331302

Change-Id: I2bfbbf5fd5ec777baca79d89c13204857e600f8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 01:46:38 +00:00
Anushree Ganjam 9b4f62e681 Merge "Add UID in AppInfo." into udc-dev 2023-06-02 01:17:29 +00:00
Anushree Ganjam 97434eea53 Add UID in AppInfo.
Create a reverse hashmap of PackageUserKey to Uid in AllAppsStore for
faster lookup of uid based on packageName and userHandle.

Log Uid in Impression Logging.

Bug: 282849559
Test: Manual. See various usecases documented in http://shortn/_UcvAYOmLIP
Flag: NA

Change-Id: I416426214f6b6efc45f7d4c0433bbbfca9056adf
2023-06-01 22:45:19 +00:00
Sunny Goyal 50c9126cc3 Merge "Adding main thread binder tracing in development build." into udc-qpr-dev 2023-06-01 17:27:21 +00: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
Schneider Victor-tulias 807f6d1828 Merge "Fix flaky null pointer in LauncherWidgetHolder" into udc-dev am: 2b06cbc748 am: d9a7a143f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23454674

Change-Id: I12c4749ee9b9740796bf4380a728b678757ebdf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 23:43:51 +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
Schneider Victor-tulias fb2affac5f Fix flaky null pointer in LauncherWidgetHolder
- LauncherWidgetHolder.startListening is called before Launcher.setupView, so it's possible for getWorkspace() to be called as part of the appWidgetRemovedCallback. Reordered these calls to fix this null pointer

Flag: not needed
Fixes: 283850341
Test: Screenshot tests
Change-Id: Ied1f23647721fc4199eab2a5a79def1e306b00f3
2023-05-26 15:09:41 -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
Charlie Anderson afb447ee0d Merge "Adding a new Edit Mode LauncherState" into udc-dev 2023-05-16 18:42:34 +00:00
Sunny Goyal 4fdc9181dd Adding support for listening to end callbacks when launching an intent from Launcher
Also moving various state handling to these end callbacks enstead of relying on resume

Bug: 265134143
Test: Verified that the end callback is received
Change-Id: I326a99c80154d244c0e49f678717c476602b6240
2023-05-15 10:31:06 -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