Commit Graph

740 Commits

Author SHA1 Message Date
Vadim Tryshev
f782eaba73 Improving diagnostics from fallback recents tests when phone is not unlocked
Failing earlier so that we don't get strange messages from the middle of the test.

Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: I1e3c70623e6f907bcc6bd0486b6c75afecb610e3
2023-10-10 19:18:22 -07:00
Federico Baron
ca39bd99cc Merge "Add screenrecord to testOverviewActionsMenu_iconAppChipMenu" into main 2023-10-09 21:29:11 +00:00
Vadim Tryshev
6bc3f5e0e1 Merge "Introducing a method for execution an action on Launcher for teardown" into main 2023-10-09 21:22:47 +00:00
Vadim Tryshev
39b4fad9b0 Introducing a method for execution an action on Launcher for teardown
If the test fails to initialize properly, tearDown is still called,
and we may have null Launcher activity.

We want to safely skip using that activity to avoid a NullPointerException
that would hide the original error message.

Bug: 304306290
Test: presubmit
Flag: N/A
Change-Id: I89774a92ede046fa3afadacc62df25f4f496f4e7
2023-10-09 11:29:42 -07:00
Alex Chau
a0c149fc8d Use mock TaskStackChangeListeners in RecentsModelTest
- Also unregistered TaskStackChangeListeners and TaskIconCache listeners in RecentsModel.close(), so clean-up will happen if it's in a SandboxContext

Bug: 303259446
Test: RecentsModelTest
Change-Id: I438a499be8e737de7df79b670ecfd26f0ee70662
2023-10-09 14:31:58 +01:00
fbaron
263644524e Add screenrecord to testOverviewActionsMenu_iconAppChipMenu
Bug: 303329286
Test: n/a
Flag: no flag
Change-Id: Iab1f9e38ef1d05d56b08f62a5b3b973e96cc6f60
2023-10-06 15:38:08 -07:00
Brian Isganitis
96224ef755 Merge "Migrate Kotlin tests to use mockito-kotlin2." into main 2023-10-06 17:54:56 +00:00
Vadim Tryshev
e8f7dd5a51 Merge "Further tightening leak detector checks" into main 2023-10-04 22:18:18 +00:00
Vadim Tryshev
c116cee748 Further tightening leak detector checks
Some checks see 2 activities for some reason: Launcher and Overview.
Both active.
I'll have to decide what to do with these cases, but for now, I simply don't pass 'true' from places where this can happen.

When we have 2 activities:
Either Overview is present (and I guess we have to close it before the check) or the screenshot shows that there is no Overview, but internally, apparently, Overview activity is active and therefore, technically, is not leaked.
For the latter case, I may need to do some kind of investigation.
But for now, I'm tightening the check where there is no Overview.

Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: I1f1619093e0948b8112f29fd7e94facbf7093983
2023-10-04 22:18:12 +00:00
Jeremy Sim
4986aa85e5 Merge "App Pairs: App pairs now save with automatic default name and custom split ratios" into main 2023-10-04 00:06:57 +00:00
Vadim Tryshev
23825e84a8 Merge "Tearing down the test safely." into main 2023-10-03 21:02:51 +00:00
Brian Isganitis
06139e079c Migrate Kotlin tests to use mockito-kotlin2.
Test: atest
Bug: 300509464
Flag: No
Change-Id: I5e0d0f1f29d51cdbfacd51f7229afddf8bd66f7e
2023-10-03 16:04:19 -04:00
Jeremy Sim
6ac8949fc4 App Pairs: App pairs now save with automatic default name and custom split ratios
[App Pairs 4/?]

This patch includes:
- Ability to save and launch app pairs with custom 0.3, 0.7, or 0.5 split ratios
- App pairs now save with default name "App1 | App2"
- Grid migration, prediction, and other misc. flows should now work with app pairs

Flag: ENABLE_APP_PAIRS (set to false)
Bug: 274189428
Test: AppPairsControllerTest.java
Change-Id: I46dd3e30f8de03dd3e6d086c8ff9fc52e7e7fd2b
2023-10-03 10:38:03 -07:00
Vadim Tryshev
c0489b41a7 Tearing down the test safely.
If the test fails to initialize properly, tearDown is still called,
and we may have null Launcher activity.

We want to safely skip using that activity to avoid a NullPointerException
that would hide the original error message.

Bug: 303070230
Test: presubmit
Flag: N/A
Change-Id: I3bb07fa55e5793c73caaaeda57168aa11c85893e
2023-10-02 18:51:42 -07:00
Vadim Tryshev
d8c049f2af Starting to tighten leak detector checks
This will help to detect leaks earlier, not when we have 3 activities in some cases, but when we have 2.

Adding a parameter that enables more strict detection, and using it in some places.

I'll try to convert as many places as possible to the more strict check after landing this CL.

Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: Idd5a0386005e46dad8aab222bd77c0240f23f43a
2023-10-02 18:34:32 -07:00
Vadim Tryshev
a6b74ffdfc Merge "Verifying that workspace looks correct at the end of the test." into main 2023-10-02 21:48:04 +00:00
Tracy Zhou
fe38407873 Merge "Repostion contextual buttons upon layout changes" into main 2023-10-02 20:15:31 +00:00
Alex Chau
8eb662c67b Merge "Create icon app chip menu for overview tasks." into main 2023-10-02 17:40:33 +00:00
Pat Manning
1695cc724c Create icon app chip menu for overview tasks.
Fix: 257951354
Test: TaplTestsQuickstep
Test: TaplTestsSplitscreen
Flag: ENABLE_OVERVIEW_ICON_MENU
Change-Id: Id8a14b1970ae42bcc74e95419caeaf52ef63638b
2023-10-02 12:51:56 +00:00
Vadim Tryshev
b57e25127e Verifying that workspace looks correct at the end of the test.
I hope that this will lock bugs like b/298114205 in the test that created the bad condition, not the next one.

Bug: 298114205
Test: presubmit
Flag: N/A
Change-Id: If9b48fb5159fc35948607a99f87199d5a32e64d6
2023-09-29 18:31:04 -07:00
Pat Manning
ff74bb5ded Mark existing Launcher CUJs as Platinum tests.
Exclusion CL: cl/565329636 & cl/569615823

Acceptance Criteria:
- TaplTestsQuickstep#testOverviewActionsMenu: https://android-build.corp.google.com/test_investigate/?invocationId=I68300010197543619&testResultId=TR13128935381586398&tab=performance
- OopTaplOpenCloseAllApps#testAllAppsSwipeUpToWorkspace: https://android-build.corp.google.com/test_investigate/?invocationId=I29900010197342608&testResultId=TR26328933842394642&tab=performance
- AddWidgetTest#testResizeWidget: https://android-build.corp.google.com/test_investigate/?invocationId=I56600010197561454&testResultId=TR14428935383013115&tab=performance
- TaplTestsLauncher3#testLaunchHomeScreenMenuItem: https://android-build.corp.google.com/test_investigate/?invocationId=I56600010197561454&testResultId=TR20028935383489058&tab=performance

Bug: 300249773
Test: TaplTestsLauncher3
Test: OopTaplOpenCloseAllApps
Test: AddWidgetTest
Test: TaplTestsQuickstep
Change-Id: Ica71dbad91efe8f5b4fd243f0ec78fc3c3c4d456
2023-09-29 23:27:27 +00:00
Jagrut Desai
9c80d72947 Merge "Fixing testQuickSwitchToPreviousAppForTablet" into main 2023-09-29 19:38:48 +00:00
Schneider Victor-tulias
0606b1f296 Merge "Add TAPL tests for the keyboard quick switch view" into main 2023-09-29 18:42:11 +00:00
Schneider Victor-tulias
41b42bf7d5 Add TAPL tests for the keyboard quick switch view
Flag: ENABLE_KEYBOARD_QUICK_SWITCH
Bug: 267520665
Test: TaplTestsKeyboardQuickSwitch
Design doc: go/kqs-tapl-tests

Change-Id: I1c3c5c758011a36ed405426f543ce450910f774e
2023-09-29 14:39:35 -04:00
Vinit Nayak
5b759afe90 Merge "Revert "Unignore splitscreen tapl tests"" into main 2023-09-28 23:14:29 +00:00
Vinit Nayak
8d0442372b Revert "Unignore splitscreen tapl tests"
This reverts commit 80d274e041.

Reason for revert: b/302542596

Change-Id: Iac1274dd844ff1baea1e8c7b22a54bf353c69974
2023-09-28 18:45:37 +00:00
Jagrut Desai
dbbeac7747 Fixing testQuickSwitchToPreviousAppForTablet
Bug: 286084688
Test: Presubmit
Flag: not needed
Change-Id: Ibd2a98096df5dc15fa3ae5833b8cab0fe77850e5
2023-09-28 10:57:26 -07:00
Vinit Nayak
6120e525d8 Merge "Unignore splitscreen tapl tests" into main 2023-09-28 05:12:36 +00:00
Vinit Nayak
80d274e041 Unignore splitscreen tapl tests
* Previous they were failling locally, now they've magically
started working, let's see if the same happen in TH.

Bug: 297135374
Test: Passes/gets ignored correctly locally
Change-Id: I580afa43011237ca167bb763c65ef1974586a0fa
2023-09-27 14:45:13 -07:00
Helen Cheuk
5ab9a57ec0 Merge "Fixed delay of thumbnail loading when going to overview from home" into main 2023-09-27 20:29:00 +00:00
helencheuk
9e142d3998 Fixed delay of thumbnail loading when going to overview from home
Some thumbnail snapshots show up slowly when GRID_ONLY_OVERVIEW is enabled because more thumbnails are displayed than before and some cache related code needs to be changed. This issue should be fixed for smooth user experience so all thumbnails could be shown quickly and at the same time.
Root causes and corresponding solution are as below:
1. No high resolution thumbnails are in cache when entering overview. It is either no cache at all or just low resolution cache
Solution: Preload when high resolution is enabled
2. The cache size is 3 which is not enough for tablet
Solution: Update cache size to 8 when it is tablet, and preload more if cache size increases. Remove least recent ones when cache size decreases

Fix: 271570416
Test: RecentsModelTest
Test: TaskKeyByLastActiveTimeCache
Test: TaskThumbnailCacheTest
Change-Id: I60003ca20942c256a0a1047678ea4368cd2520eb
2023-09-27 16:57:27 +01:00
Tracy Zhou
a9194c54ef Repostion contextual buttons upon layout changes
Also make sure the contextual buttons are centered in its respective orientation

Fixes: 300849078
Test: Rotate around, and make sure the rotation button stays in the same corner
Change-Id: Ibc40739eff050f258b938ccf94c2056ed1ee596b
2023-09-26 19:09:59 -07:00
Vinit Nayak
df751430bc Revert "Verifying that workspace looks correct at the end of the test."
This reverts commit 62e3b162ba.

Reason for revert: Possible culprit for b/301966780

Change-Id: Ice6babe404feeddf9f8b13ce2a6288005402c9cd
2023-09-26 15:19:20 -07:00
Vadim Tryshev
9489d0939e Merge "Ignoring testHideTaskbarPersistsOnRecreate" into main 2023-09-23 03:23:21 +00:00
Vinit Nayak
3222ad9ab8 FallbackRecentsTests seem stable, so we re-enable!
* Maybe partial revert of ag/21100567 (unclear why originally done)

Bug: 266606727
Change-Id: I2d289157e4a41ba7d82cdcdbcbd1fb7a8edf73a9
2023-09-22 21:19:05 +00:00
Vadim Tryshev
562318d2bb Ignoring testHideTaskbarPersistsOnRecreate
Bug: 301575789
Test: presubmit
Flag: N/A
Change-Id: I8f329ff9397d0810b2b1c117f114a76fa221fb94
2023-09-22 13:43:33 -07:00
Jeremy Sim
da230cf526 Request split launches using a new enum, snapPosition, rather than a float splitRatio
Split ratios are now stored as an int enum rather than float values. Previously, split ratios were stored as floats, which needed to be recalculated frequently and differed depending on device screen size. Now Shell to store and launch split screen setups using an enum rather than floats.

Bug: 274835596
Bug: 182839788
Test: Existing tests still pass
Change-Id: Iebb8d3c7e8f9d597a59b677e48072300ddea458f
2023-09-21 11:34:07 -07:00
Brian Isganitis
171b428984 Make dismissByTappingOutsideForTablet an API of AllApps super class.
Test: TAPL
Bug: 300147433
Flag: No
Change-Id: I66d602b5d26672e3e4338fb8c4ad631eb2ee4148
2023-09-20 17:28:13 -04:00
Vinit Nayak
3a57263a7d Merge "Exit split selection state if launcher interrupted" into main 2023-09-18 21:56:07 +00:00
Vadim Tryshev
8a80ae21fd Merge "Adding TestStabilityRule; otherwise @Stability annotation is ignored." into main 2023-09-18 18:51:11 +00:00
Tony Wickham
2b9b15325c Merge "Remove unused variables in FullscreenDrawParams and PreviewPositionHelper" into main 2023-09-18 17:41:06 +00:00
Pat Manning
9ea209b893 Merge "Add test to check swiping from app to overview without unstashing taskbar." into main 2023-09-18 15:39:23 +00:00
Pat Manning
66c1051e7e Merge "Remove taskbar tooltip hover delay." into main 2023-09-18 15:37:34 +00:00
Vadim Tryshev
403d945037 Adding TestStabilityRule; otherwise @Stability annotation is ignored.
Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: Ic13a183ff285eca02ed69a2e09822cc66655797b
2023-09-15 19:09:11 -07:00
Vadim Tryshev
58d24763a1 Merge "Re-promote testStressPressHome to presubmit" into main 2023-09-15 21:55:19 +00:00
Tony Wickham
8179ac323e Remove unused variables in FullscreenDrawParams and PreviewPositionHelper
Flag: none
Test: FullscreenDrawParamsTest
Bug: 293224095
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d48be359b3773237ff659b660b0d7f80a3866fde)
Merged-In: Icbd71082b5278c0f9ce8a742eed25395b31d4284
Change-Id: Icbd71082b5278c0f9ce8a742eed25395b31d4284
2023-09-15 19:46:36 +00:00
Vinit Nayak
d91f811ab6 Exit split selection state if launcher interrupted
* Launcher gets paused as a natural part of
confirming a split, so only cancel when 1 app is
confirmed

Test: Start split from workspace, then go to
* double tap camera
* settings via notification drawer
* mic icon on QSB
Bug: 276361926

Change-Id: I048964403303defe35035ee24950cfbbfc201afd
2023-09-15 17:19:13 +00:00
Pat Manning
237f3a6677 Add test to check swiping from app to overview without unstashing taskbar.
Follow up to ag/24420598

Fix: 293419351
Test: TaplTestsTransientTaskbar.
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: Id5c6b441f45e4e17baa29bc2e1de10a1863d754e
2023-09-15 12:46:21 +01:00
Pat Manning
2db8ce7e94 Remove taskbar tooltip hover delay.
Fix issue when setting fullscreen drag layer causes hover exit/enter events.

Update ArrowTipView paddings to match spec.

Update ArrowTipView to check on each time it is shown if it should point up or down, not only the first time.

Fix: 295851126
Fix: 295315397
Test: TaskbarHoverToolTipControllerTest
Change-Id: I314c65cb9fce3fb8d6002d8917bd5c97301d9dbc
2023-09-15 12:24:51 +01:00
Vadim Tryshev
0d50b19f4b Merge "Verifying that workspace looks correct at the end of the test." into main 2023-09-14 23:44:24 +00:00