Commit Graph

1134 Commits

Author SHA1 Message Date
Alex Chau
194768420d Mark TaplTestsOverviewDesktop.enterDesktopViaOverviewMenu as postsubmit only
Fix: 358364342
Bug: 320313527
Test: TaplTestsOverviewDesktop
Flag: EXEMPT TEST_ONLY
Change-Id: I52f2db342ca75f66d5159a669cb8493caea0e88a
2024-08-09 10:39:03 +00:00
Treehugger Robot
3307f87b82 Merge "Implement e2e test for desktop windowing" into main 2024-08-08 11:32:10 +00:00
Alex Chau
1ceac5ddfe Implement e2e test for desktop windowing
Code changes:
- TaskView, GroupedTaskView and DesktopTaskView now uses different resId, so it can be differentiated by TAPL
- Extracted result handling of icon loading, so we can override in DesktopTaskView
- DesktopTaskView now load icons, so titleDescription can be loaded. When icons are loaded, contentDescription are applied to respective snapshotViews; icon unloading is ignored
- Track launchDesktopFromRecents and composeRecentsLaunchAnimator in TAPL events so we can test if the TaskView launch path is correct

Test changes:
- Added TaplTestsOverviewDesktop that move 2 TestActivities into Desktop, and launch the DesktopTaskView as static and live tile
- TaplTestsOverviewDesktop is limited to Tangor/cf_tablet only, and added LimitDeviceRule to AbstractLauncherUiTest to enable @AllowedDevices and @IgnoreLimit

TAPL changes (2 APIs added/modified):
- Changed TaskView matcher to use id/task_view_* to match all TaskView types
- When Overview is launcehd from Background, mark the currentTask after the launch as liveTile. When an OverviewTask has the same accessibility node as the liveTile, it'll expect different event when launching.
- [API change] BaseOverview.getTestActivityTask can now matches mutiple test activiites, useful for matching GroupedTaskView and DesktopTaskView; Fix a bug that getTestActivityTask wrongly use `getParent()` which is RecentsView to match activityName.
- In OverviewTask.open, we'll expect different events based on TaskView types and whether it's a live tile. Launching DesktopTaskView will in additional verify Desktop header is present on screen.
- [API change] In OverviewTaskMenu, support tapping Desktop menu and verify Desktop header is present on screen.
- Removed unused OverviewTaskMenuItem

Fix: 320313527
Test: TaplTestsOverviewDesktop
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I89261c787364901320f3acb18f01ddad5f62d17c
2024-08-08 10:37:40 +01:00
Treehugger Robot
be48abdacf Merge "Separate TaplStartLauncherViaGestureTests test cases to prevent timeouts" into main 2024-08-07 17:49:51 +00:00
Schneider Victor-tulias
aa01b2e755 Separate TaplStartLauncherViaGestureTests test cases to prevent timeouts
Flag: EXEMPT test fix
Fixes: 348476703
Test: TaplStartLauncherViaGestureTests
Change-Id: I083bbf67b3079fce8fed3a3d6b4ea477e4fef300
2024-08-07 12:01:55 -04:00
Sam Cackett
5c2d50d901 Add hover states to IconView and TaskThumbnailView in Overview
- Hover over IconView passes to FastBitmapDrawable
- Hover over TaskThumbnailView bounds highlights the border
- Hover over TaskView outside of IconView or Thumbnail does nothing
(previously highlighted a border incorrectly)

Bug: 342594235
Test: OverviewTaskViewHoverImageTest, OverviewDesktopTaskImageTest
Flag: com.android.launcher3.enable_hover_of_child_elements_in_taskview
Change-Id: I5b0753bdec609a4a6658a35422e2823c4ed109fc
2024-08-07 08:22:44 +00:00
Achim Thesmann
f7961d5f0d Merge "Replace get/setPendingIntentBackgroundActivityLaunchAllowedByPermission" into main 2024-08-01 16:53:29 +00:00
Achim Thesmann
6ae0fc94f4 Replace get/setPendingIntentBackgroundActivityLaunchAllowedByPermission
Replace usages of the old get/setPendingIntentBackgroundActivityLaunchAllowedByPermission
API with the new replacement (passing in mode = ALWAYS).

Test: atest TaskAnimationManagerTest
Flag: EXEMPT refactor
Bug: 352182359
Change-Id: I76998b2bfa9d76ab3659ddd4d4c42d74872f5b2f
2024-07-31 23:00:14 +00:00
Alina Zaidi
00614eae0e Use DesktopModeStatus#canEnterDesktopMode instead of just Flag check.
Test: Existing tests pass
Bug: 349544589
Flag: EXEMPT minor refactoring
Change-Id: Idf572d48d35b8eeedd7fd1b8c608834d27a818e7
2024-07-31 10:47:16 +00:00
Treehugger Robot
5ace16c7b8 Merge "Only register RecentTasksChangedListener if flag is enabled" into main 2024-07-24 01:17:35 +00:00
Tony Wickham
bbfa9fc181 Only register RecentTasksChangedListener if flag is enabled
Also unregister it if the feature becomes disabled (currently
this is only done in tests but in the future there will be a
user setting as well).

Added tests to verify getTasks() is not called while both
canShowRunningApps and canShowRecentApps are false.

Bug: 354087794
Test: TaskbarRecentAppsControllerTest
Flag: com.android.launcher3.enable_recents_in_taskbar
Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Change-Id: I3123501e7584ad7f877e13294454556501d2dbc8
2024-07-23 23:24:10 +00:00
Anushree Ganjam
7c32ae9acf Move more tests to deviceless
Bug: 353339741
Test: Manual
Flag: TEST_ONLY
Change-Id: Ib43d5a17feb812b08d9749b1bf6dcacabf205d47
2024-07-23 13:57:28 -07:00
Alina Zaidi
3835f93237 [Dev options][DW flag] Update all usage of enable_desktop_windowing_mode flag to use DesktopModeFlags
Test: Current tests pass
Bug: 348193756
Flag: com.android.window.flags.show_desktop_windowing_dev_option
Change-Id: I96107f7c2964ee8261ad0a161163491d6f7d4d39
2024-07-22 20:33:02 +00:00
Alex Chau
3210f73125 Throw exception from SystemUiProxy.getRecentTasks for invalid result
- The reason Recents is empty after a force-stop is when RecentsTasksList.getTasks is called first time after restart, the result is always invalid but we cached the invalid result with a chagneId(=1). The next time we call getTasks again, we think the cached result is valid, and returend an empty list.
- The fix is to mark such result as invalid to avoid caching the wrong result

Fix: 353926204
Test: RecentTasksListTest
Flag: EXEMPT bugfix
Change-Id: If15ab8fd7454db8a08c22b17eaac73f0c78aa75f
2024-07-19 09:21:40 +00:00
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