Commit Graph

1120 Commits

Author SHA1 Message Date
Treehugger Robot
4997c14218 Merge "Adding screen record for the bug where com.google.android.apps.nexuslauncher:id/popup_container is not present" into main 2024-07-17 14:10:16 +00:00
Vadim Tryshev
be508f4aa1 Adding screen record for the bug where com.google.android.apps.nexuslauncher:id/popup_container is not present
Bug: 349439239
Test: presubmit
Flag: TEST_ONLY
Change-Id: I177080040244462c8d1ca36ec433d36a7fbd7897
2024-07-16 13:24:33 -07:00
Riddle Hsu
cbc84d96ef Avoid changing transform when touching in progress
After swiping from a landscape app to portrait home, the touch
orientation may be changed if there the touch event comes in a
short time (e.g. click app icon immediately):
 DOWN
 MOVE...
 SimpleOrientationTouchTransformer#onDisplayInfoChanged
 MOVE... (start to transform with inconsistent orientation)
 UP

That could disturb the gesture detection:
OverviewInputConsumer#onMotionEvent
 > BaseDragLayer#proxyTouchEvent
  onInterceptTouchEvent, findControllerToHandleTouch
  > PortraitStatesTouchController#onControllerInterceptTouchEvent
   > BaseSwipeDetector#onTouchEvent
which may show the app drawer unexpectedly.

http://recall/-/b2qm27pJZxFIWQccA9qE9Q/ggLXlE5kf7AWMOjUc0FCUU

Bug: 351755391
Flag: EXEMPT bugfix
Test: atest NexusLauncherTests: \
            com.android.quickstep.OrientationTouchTransformerTest# \
            testSimpleOrientationTouchTransformer
Change-Id: Ic0e9d8292606837feb4775663abb60229c90e9c5
2024-07-15 16:41:42 +08:00
Treehugger Robot
6f7be465c0 Merge "Taskbar running apps: show one icon per task + tap opens that task" into main 2024-07-09 19:01:02 +00:00
Gustav Sennton
f3108c59ed Taskbar running apps: show one icon per task + tap opens that task
Before this CL we would show only one Taskbar icon per app, making it
impossible (through the taskbar) to switch between several windows of
the same app.
With this CL we add one icon per task instead, making it possible to
bring each task to the front individually.

Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Bug: 351118893
Bug: 349790805
Bug: 351156858
Test: Started several Chrome windows -> taskbar has one icon per window

Change-Id: Ia692977effceb9ce339906bf6ca24d73e19d8769
2024-07-09 14:48:04 +00:00
Treehugger Robot
892d358394 Merge "Make DeskopTaskView use latest TTV" into main 2024-07-08 12:05:53 +00:00
Alina Zaidi
f9fc3cf180 Merge "[Dev option] Move DesktopModesStatus to wm/shell/shared/desktopmode from wm/shell/shared/" into main 2024-07-08 09:49:20 +00:00
Alex Chau
3fde467b41 Make DeskopTaskView use latest TTV
- Made TaskThumbnailViewDeprecated nullable in TaskContainer, with non-null getter that requires feature flag to be on/off
- Removed TaskThumbnailViewDeprecated.setTaskOverlay, as it'll now be null with feature flag on
- Removed TaskThumbnailViewDeprecated from DesktopTaskView xml
- Simplifed DesktopTaskView binding logic, to always get thumbnailViews from viewPool, removeView and recycle all thumbnailViews in onRecycle
- Didn't implement view pooling of TaskThumbnailView due to difficulty with TaskContainer not being recycled togetehr with TaskThumbnailView

Bug: 338360089
Test: TaskThumbnailViewModelTest
Test: manual testing for DesktopTaskView for both enable_refactor_task_thumbnail on and off
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I38a6dfc6bc561689578d1660794f91d30bad4a68
2024-07-05 18:39:56 +01:00
Alina Zaidi
05cc31a613 [Dev option] Move DesktopModesStatus to wm/shell/shared/desktopmode from
wm/shell/shared/

Test: not needed, just refactoring. mp droid builds
Bug: 348193756
Flag: EXEMPT just refactoring
Change-Id: I6dd19f4203a2336f50bc26ac5b292057bb79ce37
2024-07-05 11:12:35 +00:00
Pat Manning
fc1d2daa63 Prevent taskbar icon tooltip from showing on hotseat transition.
Fix: 350512938
Test: TaskbarHoverToolTipControllerTest
Flag: EXEMPT bugfix
Change-Id: Ifc1647834358366b2d98555138edd4ad6286c16e
2024-07-03 13:15:36 +01:00
Treehugger Robot
58f5d08d7a Merge "Show tooltip for AppPairs in taskbar on hover." into main 2024-07-03 12:09:40 +00:00
Pat Manning
0e89070e1a Show tooltip for AppPairs in taskbar on hover.
Fix: 350744397
Test: TaskbarHoverToolTipControllerTest
Flag: EXEMPT bugfix
Change-Id: Ic2273f17d01d1068ceaddca8a5c115b551b35856
2024-07-02 18:22:44 +01:00
Treehugger Robot
6bf444c3c9 Merge "Only commitRunningAppsToUI if shownTasks changed" into main 2024-07-02 09:07:41 +00:00
Tony Wickham
7829a1ced2 Only commitRunningAppsToUI if shownTasks changed
- Add GroupTask and DesktopTask equals() (with tests)
- Add tests to verify multiple onRecentTasksChanged
  doesn't commitRunningAppsToUI if there's no change
- Add tests to verify commitRunningAppsToUI is still
  called if minimized or running apps set changes

Bug: 348802109
Bug: 348787176
Test: TaskbarRecentAppsControllerTest
Test: GroupTaskTest
Test: log TaskbarView#onMeasure() locally, ensure it is called
much less despite noisy onRecentTasksChanged callbacks
Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps

Change-Id: I3efff7f4492272f88aa2bdbd7cc45bd2bf8156f6
2024-06-28 21:54:37 +00:00
Alex Chau
50293c5227 Merge "Extract TaskContainer to its own class" into main 2024-06-28 12:16:17 +00:00
Vinit Nayak
8c307e249c Promote testSplitAppFromHomeWithItself to presubmit
Flag: EXEMPT test promotion
Bug: 295225524
Change-Id: Ia8615f2380fc5aa27316ecc8a4ff567ac3facb42
2024-06-27 18:37:27 +00:00
Alex Chau
8474edcf13 Extract TaskContainer to its own class
Bug: 335606129
Test: Manual
Flag: EXEMPT refactor
Change-Id: I0ac924652079c69737cd37a9233080b432ecc16e
2024-06-27 14:26:14 +01:00
Vinit Nayak
09f06c29da Merge "Promote testSplitTaskTapBothIconMenus to presubmit" into main 2024-06-27 03:35:47 +00:00
Vinit Nayak
233ab23db3 Promote testSplitTaskTapBothIconMenus to presubmit
Bug: 288939273
Flag: EXEMPT test
Change-Id: I8aec88fbba33dd94afd348ebc4ebcb9b75ab3c04
2024-06-27 03:35:34 +00:00
Gustav Sennton
d06e8dc8a3 Ignore minimized Desktop apps in Overview.
For each desktop session, Overview shows a single tile with multiple
desktop tasks. With this CL avoid showing minimized tasks in that tile.

Bug: 333013317
Flag: com.android.window.flags.enable_desktop_windowing_mode
Test: manual: ensured minimized desktop tasks are not shown in Overview

Change-Id: I48cb6826849abf225c0fe4448ca7b0b13afea44e
2024-06-26 08:53:15 +00:00
Uwais Ashraf
c902df4e41 Enable currently functional multivalent tests
Flag: EXEMPT test-only
Bug: 325088619
Bug: 325088638
Bug: 325088328
Test: Presubmit
Test: Gradle robolectric run
Change-Id: I20e77a401ed98c97168bf9c752eacc93c3c545dd
2024-06-22 22:14:30 +00:00
Tony Wickham
74fc385999 Merge "Load and draw Recent/Running tasks that aren't in Hotseat" into main 2024-06-21 21:01:41 +00:00
Tony Wickham
a79bc15cd0 Merge changes from topic "taskbar-running-minimized" into main
* changes:
  Maintain Running Tasks order in Desktop mode
  Change running apps section to use GroupTask instead of AppInfo
2024-06-21 21:00:01 +00:00
Alex Chau
91602f658c Move testQuickSwitchFromHome to possubmit
Bug: 325659406
Test: presubmit
Flag: EXEMPT test
Change-Id: Iccc2c1f06da85a0df79b5f3e0881535ce226f953
2024-06-20 13:50:19 +01:00
Tony Wickham
c5995c8f6d Load and draw Recent/Running tasks that aren't in Hotseat
- Re-support GroupTask as a tag on TaskbarView BubbleTextViews
- Can tap to launch (startActivityFromRecents) or drag and drop
- Move divider when enable_recents_in_taskbar is true

Behavior:
- While in Desktop mode, all open tasks show up in TaskbarView,
  either in the Hotseat section or the Running apps section
  past the divider. Each one also has a running line indicator.
- While in Fullscreen mode, up to 2 Recent apps that are not
  part of Hotseat will be added to the right of the divider.

Flag: com.android.launcher3.enable_recents_in_taskbar
Test: TaskbarRecentAppsControllerTest
Bug: 315354060
Change-Id: I2e2870cca434b51f276a701860edb32069109159
2024-06-19 00:27:30 +00:00
Tony Wickham
7c7c90528d Maintain Running Tasks order in Desktop mode
Fixes: 345034545
Test: TaskbarRecentAppsControllerTest
Flag: com.android.launcher3.enable_recents_in_taskbar
Change-Id: I4ab856c5293625c5279d4713450e5ea2d3b0ed85
2024-06-19 00:27:30 +00:00
Tony Wickham
2021727f1e Change running apps section to use GroupTask instead of AppInfo
- No longer bind All Apps to TaskbarRecentsController, and register
  RecentsModel.RecentTasksChangedListener instead
- The source of truth for "running tasks" in Desktop mode is the
  DesktopTask#tasks list itself, instead of
  RecentsModel.RunningTasksListener (which is no longer used)
- Added TaskInfo.TaskKey#isVisible to distinguish minimized running apps
- Next CL will hook up the UI for Recent/Running tasks that are
  not part of the Hotseat.

Flag: com.android.launcher3.enable_recents_in_taskbar
Test: TaskbarRecentAppsControllerTest
Fixes: 335398876
Bug: 315354060
Change-Id: I1313f97a791c5c0c1db7443a5d4f1d5bc761981f
2024-06-19 00:27:30 +00:00
Riddle Hsu
d76b06359f Merge "Let sender permission allow background launch when starting recents" into main 2024-06-18 01:48:41 +00:00
Shamali Patwa
0fb4cce4a7 Merge "Consider WidgetSections for suggestions in standalone picker" into main 2024-06-17 23:55:16 +00:00
Shamali P
77e42868da Consider WidgetSections for suggestions in standalone picker
This cl address the problem for standalone picker (follow up to match
ag/27720721) to ensure widgets that aren't in section of their owning
package didn't appear in suggestions

Bug: 345520128
Test: Unit tests
Flag: EXEMPT bugfix
Change-Id: Ia0ef96c5be77db56b84c76ace498125d07f4be42
2024-06-17 20:02:18 +00:00
Jagrut Desai
67b8de56ce Add orientation logic to taskbar icon specs
Test: Presubmit
Bug: 341146605
Flag: NONE Taskbar Customization
Change-Id: Ia86d61fd6ac38d03e45b23ea2a424a5b0b33c12b
2024-06-17 11:43:04 -07:00
Riddle Hsu
a37161182e Let sender permission allow background launch when starting recents
Currently the recents activity is started by a pending intent created
by launcher. And the sender is system server.
(HIERARCHY_OP_TYPE_PENDING_INTENT in WindowOrganizerController)

If the intent creator doesn't have visible windows, e.g. launcher is
occluded by its another embedded of another package, then the background
launch policy will check whether the intent sender is allowed. But
system server also doesn't have visible windows, which causes
BackgroundActivityStartController#
checkBackgroundActivityStartAllowedBySender to return BalVerdict.BLOCK.
Which will set MOVE_TO_FRONT_AVOID_PI_ONLY_CREATOR_ALLOWS to disallow
moving the target task to front.
See I72a6c22a5fb27aeac52a4e5d46c6a16e28ee6757 for the block policy.

Although currently the recents activity can still move to front because
some places miss to check blocking the launch. Then it is like just
using a security hole.

By adding the background launch permission hint to ActivityOptions,
BackgroundActivityStartController#hasBalPermission will check if the
real caller has permission START_ACTIVITIES_FROM_BACKGROUND. Then
it will pass because the intent sender is system server.

Bug: 341618283
Flag: EXEMPT bugfix
Test: atest NexusLauncherTests: \
            com.android.quickstep.TaskAnimationManagerTest
Test: Swipe to minus one screen. Click a news item to Launch chrome.
      Swipe from bottom to return to home. There should not have an
      error log:
      "Without Android 15 BAL hardening this activity would be moved
       to the foreground ... only the creator of the PendingIntent
       allows BAL. realCallingPackage: android.uid.system:1000 ..."
       (from ActivityStarter#logPIOnlyCreatorAllowsBAL)
Change-Id: I19153f6553c09421bca248d4ff9110d168b34f98
2024-06-17 17:52:16 +08:00
Jagrut Desai
55d101d15f Merge "Util classes for the Taskbar Customization Framework" into main 2024-06-14 17:25:39 +00:00
Jagrut Desai
3cddb5817d Util classes for the Taskbar Customization Framework
Test: Presubmit
Bug: 341146605
Flag: NONE Taskbar Customization
Change-Id: Ice9d2e6db2754ba75a1253da45dd28aa63cad58f
2024-06-13 11:46:29 -07:00
randypfohl
4b40965346 Fixing tests related to abstraction
Flag: NONE - fixing tests

Test: built and ran locally, verified test pass in presubmit

Bug: 224595066

Change-Id: Ifefab1e1696853c5bd816a361314082073ba8a20
2024-06-13 10:26:12 -07:00
Michał Brzeziński
f24e6ad602 Merge "Disabling touchpad gestures in launcher for SYSUI_STATE_TOUCHPAD_GESTURES_DISABLED state" into main 2024-06-13 10:19:30 +00:00
Orhan Uysal
8f2a4e0854 Merge "Use RecentTasksListener to trigger TopTaskTracker" into main 2024-06-12 12:30:13 +00:00
Orhan Uysal
c948537a82 Use RecentTasksListener to trigger TopTaskTracker
Currently launcher gets task stack updates through WM core. Ideally we
would like to migrate into a model where launcher gets these updates
through shell instead.

Test: Manually check that the correct task info is delivered to launcher
from shell
Bug: 341932484
Bug: 344684650
Flag: NONE Just adding a listener, no logic added

Change-Id: Iaf534a4bfee968138d4a4ff282a66e62759af2c0
2024-06-11 21:00:22 +00:00
Treehugger Robot
0f83d92ae4 Merge "Scrolling down to locate PS after lock/unlock event." into main 2024-06-11 20:24:17 +00:00
Himanshu Gupta
3a4b79bf7b Scrolling down to locate PS after lock/unlock event.
This change fixes TAPL tests by:
1. Scrolling down to locate PS, in case the scrollbar moves after lock/unlock.
2. Retrying lock/unlock, as sometimes, the request is cancelled by UserManager (if the profile is already in that state)

Bug: 345556016
Test: atest TaplPrivateSpaceTest
Flag: NONE Tapl fix tweak.
Change-Id: Ic0cc3259a2f92065a699d694c47f65c5f68934b8
2024-06-11 18:15:51 +00:00
Michal Brzezinski
2eff95ef6d Disabling touchpad gestures in launcher for SYSUI_STATE_TOUCHPAD_GESTURES_DISABLED state
As gestures start with checking of canStartTrackpadGesture() method, disabling it there disables all touchpad gestures.

Test: RecentsAnimationDeviceStateTest
Flag: NONE these changes are not directly flagged but usage of SYSUI_STATE_TOUCHPAD_GESTURES_DISABLED state is guarded by flag: com.android.systemui.new_touchpad_gestures_tutorial
Bug: 345207568
Change-Id: I0409475a3e006609c6b722cd3b17d75e1ebed939
2024-06-11 15:28:31 +01:00
Jeremy Sim
dafbaa5f1b Merge "Fix flaky test" into main 2024-06-11 04:12:58 +00:00
Treehugger Robot
9aafa6bd76 Merge changes I8411fb83,I5b757558 into main
* changes:
  Move Desktop running apps support into TaskbarRecentAppsController
  Add flag for Recents in Taskbar
2024-06-11 02:16:56 +00:00
Tony Wickham
a2b510dc23 Move Desktop running apps support into TaskbarRecentAppsController
- Merged DesktopTaskbarRunningAppsController up into
  TaskbarRecentAppsController, which is now initialized directly
- The old TaskbarRecentAppsController was effectively a no-op
  that was always overridden, so merging the one subclass up makes
  things simpler (especially for the follow up CLs which will add
  support for switching between Running and Recent tasks using
  the same underlying data).

Flag: com.android.launcher3.enable_recents_in_taskbar
Test: TaskbarRecentAppsControllerTest
Bug: 315354060
Change-Id: I8411fb832e5dd3d76201d2694dec0b11bd70bbf9
2024-06-11 00:18:23 +00:00
Jeremy Sim
c1470021c8 Fix flaky test
Attempts to fix a flaky test by ensuring that recents is always cleared before creating a split pair (so the split pair under test is always the same).

Bug: 340935208
Test: testSaveAppPairMenuItemOrActionExistsOnSplitPair(), testSplitTaskTapBothIconMenus()
Flag: TEST_ONLY
Change-Id: Ibc81b90fac531f0e78e93a494ff59073ab5e52cf
2024-06-10 14:51:53 -07:00
Vadim Tryshev
d37d4d8b7d Merge "Removing test class TaplViewInflationDuringSwipeUp" into main 2024-06-07 21:19:04 +00:00
Vadim Tryshev
e7d59d06c4 Removing test class TaplViewInflationDuringSwipeUp
The bugs for fixing the removed tests are obsolete, and it was decided to not allocate resources for fixing the tests.

Bug: 190618549, 190729479
Test: presubmit
Flag: NONE it's a test
Change-Id: I1ca3c2c054e4b598c65c86913f0ddbbc711d7f6c
2024-06-07 12:16:37 -07:00
Shamali P
d69e21f8fe Ensure widgets from WidgetSections.xml are included in suggestions
Additionally, let only prediction system provide suggestions, since the
UI surface has been there for a while, adding locally filtered widgets
from app package isn't required.

Bug: 345520128
Test: Unit tests
Flag: EXEMPT bugfix
Change-Id: Ia97f0743fefeae750e07a694bb19d24a5cc11ffe
2024-06-06 22:23:35 +00:00
Himanshu Gupta
91988caf99 Merge "Re-enabling a failing Tapl test for Private Space." into main 2024-06-06 17:08:41 +00:00
Himanshu Gupta
72297b7b81 Re-enabling a failing Tapl test for Private Space.
The test seemed to be failing due to animation issues
(settings cog and Lock text not visible)- b//339179262
Re-enabling the test as those issues are now fixed.

Bug: 322882655
Test: TaplPrivateSpaceTest
Flag: None TaplTest
Change-Id: I4053b9759cd97c721ea576965f57ef309fffaab3
2024-06-05 15:42:46 +01:00