Commit Graph

321 Commits

Author SHA1 Message Date
Sunny Goyal
10fa016352 Fixing MainThreadInitializedObject
> Making SafeCloseable implementation mandatory, to prevent leaks during test and preview
> Removing getNoCreate method and defining executeIfCreated to avoid null pointer exceptions
> Fixing sandbox value leaking into main, by Checking sandbox against App context
> Converting sanbox to an interface instead a class

Bug: 335280439
Test: Presubmit
Flag: None
Change-Id: I951dcde871898e745ff6490a1c4f8fd1512888f5
2024-04-22 17:04:33 -07:00
Priyanka Advani
4e97c94559 Revert^3 "Wait for LauncherModel loaded in waitForLauncherInitialized"
This reverts commit 503ce966ef.

Reason for revert: Culprit for test breakages in b/334995023. Will be verifying through ABTD for confirmation and before submitting the revert.

Change-Id: Id8707cb2074b4f00ec332ebb14deb7d143ff1bbb
2024-04-15 22:18:31 +00:00
Schneider Victor-tulias
503ce966ef Revert^2 "Wait for LauncherModel loaded in waitForLauncherInitialized"
This reverts commit b80c6c347a.

Reason for revert: The original change was not the cause for the test failures

Change-Id: Icfe0da43a96f5471076554c4dd25eae649bee81e
2024-04-15 15:58:19 +00:00
Liana Kazanova
b80c6c347a Revert "Wait for LauncherModel loaded in waitForLauncherInitialized"
This reverts commit f8f00f4233.

Reason for revert: DroidMonitor: Potential culprit for http://b/334162623.  verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Id165df41a87af4757abd3266b8643949ce012a08
2024-04-12 21:30:50 +00:00
Schneider Victor-tulias
f8f00f4233 Wait for LauncherModel loaded in waitForLauncherInitialized
Flag: N/A
Fixes: 326737440
Test: Launcher TAPL tests
Change-Id: I631b370198c393ad84419930c026b6a0ce63ec2b
2024-04-12 12:48:48 -04:00
Sunny Goyal
9d2ece156d Removing ext_test directory
Except for a few methods, most of the testing code was already in the main
codebase. Maintaining the additional source directory adds unnecessary overhead

Bug: 330920490
Test: Presubmit
Flag: None
Change-Id: I56c43ab7a4869b26858d622d0b8b14f286d50e90
2024-03-22 15:45:32 -07:00
Fengjiang Li
e90f098d4f Enable predictive back in TAPL tests
With ag/26349940 we have fixed the bug where back swipe is not working

Fix: 326118348
Test: this is the test
Flag: NONE
Change-Id: I7e826f6ba3022a04d016d4a0a2134e287d85e8be
2024-03-15 00:00:37 -07:00
Anushree Ganjam
461038d5d5 Remove expecting DOWN events in TAPL tests.
ACTION_UP is always preceded by ACTION_DOWN which means when launcher
receives an UP events, down event is obviously sent.

In b/325377690 , we started seeing only in P9 devices the DOWN events didn't reach TAPL. I added InputDispatcher logs which shows both DOWN and UP events are sent by system_server to NexusLauncher.
However TAPL doesn't receive it. After spending lot of time debugging this, I think we are safe to remove DOWN event expectation in TAPL.

Bug: 325377690
Test: Manual, TAPL presubmits
Flag: NA
Change-Id: I6d3587c488d45e3dc53d2c1c4f3b6b49285eae94
2024-03-07 12:31:38 -08:00
Vinit Nayak
91b06fb4ac Revert "Revert "Implements the "Save App Pair" button in Overvie..."
Revert submission 26420318-revert-26391074-save-app-pair-button-ZKCRCDSCSN

Reason for revert: Test failure in question wasn't related to this topic b/328016248

Reverted changes: /q/submissionid:26420318-revert-26391074-save-app-pair-button-ZKCRCDSCSN

Change-Id: I2a4dbb83720768a9d29a4371c77e3b9410ab2fea
2024-03-04 12:26:23 -08:00
Vinit Nayak
5c8978c4db Revert "Implements the "Save App Pair" button in Overview Actions"
Revert submission 26391074-save-app-pair-button

Reason for revert: breaks image comparison tests b/327665771
Reverted changes: /q/submissionid:26391074-save-app-pair-button

Change-Id: Ic4580fc39d8394771551f100932157e6ef35c4b7
2024-03-01 01:02:35 +00:00
Jeremy Sim
41d8ae8a7a Implements the "Save App Pair" button in Overview Actions
Second attempt at enabling this feature. See ag/25143701, linked bugs, and revert history for details. This patch is tested with mokey devices and does not crash!

This patch includes:
- Ability to "save app pair" from Overview Actions.
- Internally the actions bar is not longer hidden for GroupedTasks; instead the individual buttons for "Select", "Screenshot", and "Split screen" are toggled off and "Save app pair" is toggled on.
- "Save app pair" option does not appear in icon menu when it is visible in the Actions Bar.
- Addition to go/quickstep/res/layout/overview_actions_container.xml to support addition of the new button.

Note: This patch introduces a slight regression where users are now able to long-press to select text on task 1 of a paired GroupedTaskView (previously we did not let them select text on either task for consistency.) Will follow up with a fix -- see bug for details.

Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Fixes: 315545418
Fixes: 315292030
Test: Manual, all action buttons still work and "Save app pair" appears and disappears correctly
Change-Id: I4b4ac525cfd5eb9cfcd757d0bffc7215b04f9a3d
2024-02-28 19:39:04 -08:00
Tracy Zhou
89f72882ce Guard taskbar / navbar unification logic with whether the device is a phone on top of the flag
Test: Rerun the tapl tests
Bug: 325162802
Change-Id: Iffeeb0a60b634e66bc80e4ba45db816cdc8ba564
2024-02-15 22:06:33 -08:00
Vinit Nayak
44911450c6 Merge "Update test infra to allow split placeholder view in all apps" into main 2024-02-07 14:57:19 +00:00
Vinit Nayak
fad0709510 Update test infra to allow split placeholder view in all apps
* Previously we assume the split placeholder view shouldn't be
present in any states except launcher split selection, however
with contextual that changes.
* Now we only ensure that view isn't there in all apps when
we are not in split selection.

Test: Test runs and passes locally
Fixes: 323418145
Change-Id: Ida92030f9b139532ebb09c1d2646795bbb940bfc
2024-02-07 03:32:02 +00:00
Cliff Wang
dd2222749b Merge "Revert "Make sure TAPL waits for Launcher activity to stop each time it stops"" into main 2024-02-05 08:21:54 +00:00
Cliff Wang
ac82e995ca Revert "Make sure TAPL waits for Launcher activity to stop each time it stops"
This reverts commit dd33b64a64.

Reason for revert: “DroidMonitor: Potential culprit for Bug b/323619378 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.”.

Bug:323619378
Change-Id: Iadaa80f2cc51f39ae3ab73cdd49a98d05835506e
2024-02-05 04:46:17 +00:00
Vadim Tryshev
f9eced5768 Merge "Make sure TAPL waits for Launcher activity to stop each time it stops" into main 2024-02-03 02:33:53 +00:00
Vadim Tryshev
dd33b64a64 Make sure TAPL waits for Launcher activity to stop each time it stops
This helps to ensure that the test doesn't proceed while the activity is
still stopping and it's state hasn't settled.

We introduce a count of STOP events and make sure it's 0 except for
cases where stops are safe to ignore or we have waited for them.

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: I51c73c89854fcaa390d47a57389da18b2ce0ee6c
2024-02-02 15:21:20 -08:00
Fengjiang Li
2aaccefecb Merge changes I471c27b8,I602cf29b into main
* changes:
  Fix small gap between widget resize frame and widget background.
  Update TaplAddWidgetTest#testResizeWidget() and WidgetResizeFrame#resize() API to pass launcher's cellBoarderSpace and use its height to expand widget
2024-02-02 03:31:13 +00:00
Fengjiang Li
387fea9731 Update TaplAddWidgetTest#testResizeWidget() and WidgetResizeFrame#resize() API to pass launcher's cellBoarderSpace and use its height to expand widget
To expand widget vertically, the drag distance has to be >= 0.66 * (cellHeight + cellBoarderSpace.y). The TAPL test should add cellBoarderSpace.y onto the vertical drag distance to make test less flaky.

Bug: 291104076
Test: Postsubmit passed https://android-build.corp.google.com/builds/abtd/run/L49100030001703948
Flag: NA
Change-Id: I602cf29b83df6875abd8eadfe255a2adb13f03cb
2024-02-01 16:24:14 -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
Vadim Tryshev
0df6404e6e Re-promoting testDragToFolder to postsubmit
Also fixing it. When tapping outside of the folder to close it, avoiding touching the gesture area.

Bug: 187761685, 233075289
Test: presubmit, abtd
Flag: N/A
Change-Id: I99ada9e3d681f93a6d079827f1d4c5451a562266
2024-01-09 21:38:52 +00:00
Jagrut Desai
71e8dcca46 Migrating Tapl Overview test to platform scenario project
- Removes tapl overview test form platinum test suite
 - adds individual overview test to platform scenario test.

Test: Presubmit, Manual
Bug: 303256981
Flag: NONE
Change-Id: I7d04dc5dc63ba3a5e63ad03d98760dbd24c974f8
2024-01-04 16:25:17 -08:00
Greg Kaiser
45ba84268c Revert "App Pairs: Implement Overview Actions View button"
Revert submission 25143701-app-pairs-action-button

Reason for revert: Causes P0 b/315292030

Reverted changes: /q/submissionid:25143701-app-pairs-action-button

Change-Id: I1fcbb9f333ca29c5db255232dc9475dec465ac81
2023-12-18 14:53:19 +00:00
Jeremy Sim
e1fcb5390b App Pairs: Implement Overview Actions View button
[App Pairs 6/?]

This patch includes:
- Ability to "save app pair" from Overview Actions
- The actions bar is not longer hidden for GroupedTasks; instead the individual buttons for "Select", "Screenshot", and "Split screen" are toggled off and "Save app pair" is toggled on.

Note: This patch introduces a slight regression (b/315545418) where users are now able to long-press to select text on task 1 of a paired GroupedTaskView (previously we did not let them select text on either task for consistency.) Will follow up with a fix -- see bug for details.

Flag: ACONFIG com.android.wm.shell.enable_app_pairs DEVELOPMENT
Bug: 315545418
Bug: 315292030
Test: Manual, all action buttons still work and "Save app pair" appears and disappears correctly
Change-Id: I0eb1fa9520ba14074ede3480e771b340cf2f6e2c
2023-12-18 02:25:22 +00:00
Tony Wickham
d546564f3e Change TAPL to swipe to stash taskbar (instead of deprecated long press)
This also means Taskbar is transient by default in automated tests,
instead of persistent. Updated some checks accordingly.

Flag: LEGACY ENABLE_TRANSIENT_TASKBAR ENABLED
Test: TaskbarExpandCollapse#hideShowTaskbar; TaplTestsTaskbar;
TaplTestsTransientTaskbar; TaplTestsPersistentTaskbar
Bug: 270395798

Change-Id: Ie7b8fcedb94e33742b7bf18cb829dab55af74b7d
2023-12-05 20:38:41 +00:00
Priyanka Advani
f796ae1c2a Merge "Revert "Update isLauncherInitialized check to wait until Launcher has stopped binding items"" into main 2023-12-05 19:08:41 +00:00
Priyanka Advani
99d2b4827d Revert "Update isLauncherInitialized check to wait until Launcher has stopped binding items"
This reverts commit 7ab2c874c9.

Reason for revert: Likely culprit for b/311366267

Change-Id: I52a2c7527a90698866aef44217230ef7ae5064ee
2023-12-05 17:07:38 +00:00
Satish Yalla
b85266aef2 Merge "Revert "Change TAPL to swipe to stash taskbar (instead of deprec..."" into main 2023-12-05 10:21:18 +00:00
Satish Yalla
de82f8f44f Revert "Change TAPL to swipe to stash taskbar (instead of deprec..."
Revert submission 25532044-tapl-transient-taskbar-default

Reason for revert: <test revert (b/314873201)>

Reverted changes: /q/submissionid:25532044-tapl-transient-taskbar-default

Change-Id: I51e78699f588a8fe8506c96398de921448e0ab6a
2023-12-05 06:48:25 +00:00
Tony Wickham
2f334e9ca7 Merge "Change TAPL to swipe to stash taskbar (instead of deprecated long press)" into main 2023-12-05 02:40:02 +00:00
Schneider Victor-tulias
a74612611d Merge "Update isLauncherInitialized check to wait until Launcher has stopped binding items" into main 2023-12-04 20:02:10 +00:00
Vadim Tryshev
0ad6d9bcee Waiting for Launcher to stop after quick-starting test apps
Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: I795571ec191b01929bb871fd021d8653449bb608
2023-12-01 18:22:04 +00:00
Schneider Victor-tulias
7ab2c874c9 Update isLauncherInitialized check to wait until Launcher has stopped binding items
The current implementation of isLauncherInitialized allows TAPL tests to run while LoaderTask is still binding items. This can lead to interactions on a launcher that is not yet drawn/responsive.

Flag: N/A
Fixes: 313043156
Test: TaplAppIconMenuTest#testLaunchMenuItem
Change-Id: I4cb9276eb3852653517faa45be8517e659f39c00
2023-11-30 15:11:33 -05:00
Tony Wickham
e1f770df2f Change TAPL to swipe to stash taskbar (instead of deprecated long press)
This also means Taskbar is transient by default in automated tests,
instead of persistent. Updated some checks accordingly.

Flag: LEGACY ENABLE_TRANSIENT_TASKBAR ENABLED
Test: TaskbarExpandCollapse#hideShowTaskbar; TaplTestsTaskbar;
TaplTestsTransientTaskbar; TaplTestsPersistentTaskbar
Bug: 270395798

Change-Id: I48b4c809025a9bab0a37ada1317adee823b1a8f9
2023-11-20 23:41:01 +00:00
Vadim Tryshev
7a1beb559f Allowing ACTION_CANCEL events to come from device 0
Tests assert that input events come to Launcher only from tests, which
sets deviceId to 0. This way, we spot when a cable touches a lab device
and breaks the tests, in which case deviceId will be != -1.

But CANCEL event, which is programmatic, now can legitimately come from
device 0.

Bug: 308489875
Test: presubmit
Flag: N/A
Change-Id: I84ee9ed8e008043f83e82d57b17b64a10677ee8d
2023-11-08 13:20:57 -08:00
Priyanka Advani
9aed56096c Revert "Change TAPL to swipe to stash taskbar (instead of deprec..."
Revert submission 24877128-cherrypick-tapl-transient-swipe-owubvwrsw6i

Reason for revert: Likely culprit for b/309158105

Reverted changes: /q/submissionid:24877128-cherrypick-tapl-transient-swipe-owubvwrsw6i

Change-Id: I8ee560f7e599bcfde09eff53f049309ba25ce77f
2023-11-03 21:31:45 +00:00
Tony Wickham
eccf070bae Change TAPL to swipe to stash taskbar (instead of deprecated long press)
This also means Taskbar is transient by default in automated tests,
instead of persistent. Updated some checks accordingly.

Flag: LEGACY ENABLE_TRANSIENT_TASKBAR ENABLED
Test: TaskbarExpandCollapse#hideShowTaskbar; TaplTestsTaskbar;
TaplTestsTransientTaskbar; TaplTestsPersistentTaskbar
Bug: 270395798

Change-Id: Ib6e592a31a55a912a7ea991a421a9c60bca51c80
2023-11-01 23:16:10 +00:00
Jagrut Desai
8e4077f8cd Adding test protocol support for getting num all apps columns
Test: Presubmit
Bug: 303257279
Flag: not needed
Change-Id: I9c6299fb3ff077bc42ca22609d2ff0232377a370
2023-10-10 16:07:51 -07:00
Alex Chau
6f264a927b Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag
Bug: 270397206
Test: OverviewActionsControllerTest
Flag: enableGridOnlyOverview
Change-Id: I1519e0e8d5b8a7e294d2d310c1614e8462649031
2023-10-03 12:58:18 +01:00
Brian Isganitis
42d12badd8 Merge "Support tapping outside container from above IME if visible." into main 2023-09-14 15:25:05 +00:00
Brian Isganitis
6066c44ed8 Support tapping outside container from above IME if visible.
This is useful for tests where the keyboard is open, which can take up
about half the screen.

Test: Tapl
Fix: 299514609
Flag: No
Change-Id: I47e2fe7555140b4b54046d4d8ba6de1ebd38c6a4
2023-09-13 21:00:52 +00:00
Alex Chau
e1955fe4b9 Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig
- Keeping FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW for local testing until aconfig is available in FlagFlipper
- Still reference ENABLE_GRID_ONLY_OVERVIEW in tests as aconfig still can't be mocked

Bug: 270397206
Test: manual
Change-Id: I799e05311adc21184a6ad7ce92a3abdab3f25c25
2023-09-13 15:59:01 +01:00
Vadim Tryshev
4d3179706a Removing verifying motion events in TAPL
This allows us to simplify GestureScope.

Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: I0ca0add5ef41ddd74a8fe3b4ebca10e0f866bf55
2023-09-06 13:08:31 -07:00
Vadim Tryshev
0e97dff0da Removing verifying touch events in TAPL
They are perceived to produce too much noise and maintenance.

Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: I062eb5670a92a2ccc7039108829b09ca9d9127ae
2023-08-30 13:57:18 -07:00
Treehugger Robot
bc6e67da45 Merge "Skips checking for overview actions when grid only overview flag is enabled." into udc-qpr-dev 2023-08-17 23:12:08 +00:00
Pat Manning
dc90a46e77 Skips checking for overview actions when grid only overview flag is enabled.
Fix: 296060682
Test: TaplTestsQuickstep
Flag: ENABLE_GRID_ONLY_OVERVIEW
Change-Id: If8ef23767350dbbcf80294abf6b93eebe57d3487
2023-08-15 16:55:23 +01: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
Sebastian Franco
a99e1d2a14 Ensure the reorder test runs on the foldable devices
It moves some classes form the Nexus package into the launcher package
so it can be used in both projects.

It also adds more test for foldables and test multiple
grids for each test.

Bug: 289584301
Fix: 291346193
Test: ReorderWidgets
Change-Id: I04db5f685d0344b8a3f3d42b429bbde061b3d8ea
2023-08-03 16:35:29 -07: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