Commit Graph

440 Commits

Author SHA1 Message Date
TreeHugger Robot
87ccecb6fc Merge "Revert "Revert "Add TaskbarModeSwitchRule to test both transient/persistent taskbar.""" into tm-qpr-dev 2022-11-15 22:31:55 +00:00
Jon Miranda
f0349354ec Revert "Revert "Add TaskbarModeSwitchRule to test both transient/persistent taskbar.""
This reverts commit e7011d2b87.

Reason for revert: attempt to fix test issues

- Instead of using SharedPrefs which can be flaky anyways,
  we pass along a boolean to test transient taskbar when
  we are in the test harness

Bug: 257549303
Test: TaplTestsTaskbar
Change-Id: I7c15a97363adc377f29853c1fe60b1960c77bfc3
2022-11-10 11:11:14 -08:00
Jon Miranda
e7011d2b87 Revert "Add TaskbarModeSwitchRule to test both transient/persistent taskbar."
This reverts commit d5a6b5f688.

Reason for revert: Breaks tests due to "SharedPreferences in credential encrypted storage are not available until after user is unlocked"

Bug: 258256906
Change-Id: I1de69249685f9d2e71183357cf3eda8d443c7d97
2022-11-08 21:56:52 +00:00
Vinit Nayak
29e71bdd72 Improve Split portrait gesture animation
* Crop out taskbar from bottom thumbnail for vertical split
* TODO: Need to re-calculate thumbnail sizes if taskbar
 is stashed. There's also a very slight rounding error
 somewhere even in the unstashed case that needs to be
 revisited

Bug: 219411750
Test: Start gesture animation in split in potrait
Change-Id: I35f2415e13af7467e0735ac8865cee0e3e3d27f8
2022-11-08 11:33:08 -08:00
Jon Miranda
d5a6b5f688 Add TaskbarModeSwitchRule to test both transient/persistent taskbar.
- Lays the foundation for transient taskbar tests.
- Does not add flags that would add ACTION_OUTSIDE in tests.
  We can address testing this functionality in a separate CL

Bug: 257549303
Test: TaplTestsTaskbar
Change-Id: I44acc5e589b959e6d4bc93fdc369e503c54e7d87
2022-11-07 14:18:37 -08:00
Sunny Goyal
3c7054f0d2 Updating widget prediction handling:
When handling widget prediction, first match the full provider names
Only if no widgets are found, match any widget in the package

Bug: 256202399
Test: atest WidgetsPredicationUpdateTaskTest
Change-Id: I5337618d935f8b926803aeefede46059545de72d
2022-11-02 02:24:21 +00:00
Sunny Goyal
8a11443333 Removing unnecessary RemoteAnimationTargetCompat
Merged-In: I12a4c29eaf9bd7d97d3c02074b4cc1ca452fc88a
Bug: 221961069
Test: Presubmit
Change-Id: I12a4c29eaf9bd7d97d3c02074b4cc1ca452fc88a
2022-10-24 17:17:36 +00:00
Sunny Goyal
dd11f089cc Revert "Revert "Using Transaction directly instead of building s..."
Revert^2 "Removing unused surface transaction wrappers"

2460910c8c454bc2d3c9ae35bd32eeb590851788

Bug: 221961069
Test: Presubmit
Change-Id: I0028c9fe0de6fde6a77de84e4858fda14cd578dd
2022-10-18 16:30:26 +00:00
Vinit Nayak
d6c5147524 Landscape 3 button nav on taskbar phone supported
* TODO: Seascape bar positioning, add tests

Change-Id: I542be2f2f682d8c8a9cdd9bb6c667c44ca167f3e
Merged-In: I542be2f2f682d8c8a9cdd9bb6c667c44ca167f3e
2022-10-17 13:59:18 -07:00
Nick Chameyev
cbfb35edc7 Extract PreviewPositionHelper to shared library
Moves Launcher's PreviewPositionHelper to shared
library between SystemUI and Launcher to reuse
it in the future in the partial screensharing
recents selector.

There should be no functional changes in the
code itself.

Bug: 240924926
Test: presubmit
Change-Id: Ib38b6f9db91e63a2598bf81229e3cd3e1a49ca60
2022-10-05 10:23:54 +01:00
Ming-Shin Lu
8ff85dc733 Merge "TAPL: add setIgnoreTaskbarVisibility in LauncherInstrumentation" into tm-qpr-dev 2022-10-05 06:43:42 +00:00
Ming-Shin Lu
4d4f62ac77 TAPL: add setIgnoreTaskbarVisibility in LauncherInstrumentation
As now FlickerTests is leveraging TAPL to interact devices CUJs,
we realized in LauncherInstrumentation will verify task bar visibility
automatically to expect it always visible when quick-switch, which is
not always reliable since the task bar may be hidden by manual or
when the activity requests to show IME.

Add setIgnoreTaskbarVisibility in LauncherInstrumentation for the caller
to ignore taskbar visibility if the test does not need to verify it.

Bug: 228012334
Bug: 240306344
Test: atest FlickerTests:SwitchImeWindowsFromGestureNavTest
      in tablet device
Test: atest NexusLauncherOutOfProcTests:com.android.quickstep.\
       TaplTestsQuickstep#testQuickSwitchToPreviousAppForTablet

Change-Id: Id0a35561523d733b8434acb702ec7dcaa466a1c2
2022-10-05 11:37:37 +08:00
Tracy Zhou
c0095e81ae Remove ENABLE_QUICKSTEP_LIVE_TILE flag
Fixes: 249627137
Test: manual - (1) swipe up from app (2) swipe home (3) quick switch (4) split in overview
Change-Id: Ibe56ba3824b379b20fb3f0aa09be4d6bdb5abaa1
2022-09-29 04:58:52 +00:00
Sunny Goyal
9925bbd147 Revert "Using Transaction directly instead of building surface p..."
Revert "Removing unused surface transaction wrappers"

Revert submission 19933596-tcompat

Reason for revert: b/246899728
Reverted Changes:
I31123dff7:Using Transaction directly instead of building sur...
I2e2526d21:Removing unused surface transaction wrappers

Change-Id: I63d1d8bb723b7bd05d345fb21a67f88e5fb36bc1
2022-09-15 14:07:51 -07:00
Winson Chung
3f649ef892 Update Launcher for removed shared wrappers
- Launcher can reference system code directly now

Bug: 219861883
Test: Builds/Presubmit
Change-Id: I3f656b6c7fce93243ccb7591e52441e99137dec6
Merged-In: I3f656b6c7fce93243ccb7591e52441e99137dec6
2022-09-14 17:14:32 +00:00
Sunny Goyal
fd2c9eb04e Using Transaction directly instead of building surface params
Bug: 221961069
Test: Presubmit
Change-Id: I31123dff78de513addd0c851403af9097686c46e
2022-09-13 22:26:42 +00:00
Ats Jenk
accde3a686 Merge "Filter out active freeform tasks from recents" into tm-qpr-dev 2022-09-08 16:07:19 +00:00
Ats Jenk
461c3b3bd0 Filter out active freeform tasks from recents
Freeform tasks will show up as a separate, single tile in recents.
Filtering them out right now.

Bug: 244348395
Test: atest RecentTasksControllerTest RecentTasksListTest
Change-Id: Ifb197031076a8d8934cea78c6b68cb059477a81a
2022-09-07 15:32:02 -07:00
Alex Chau
e818bcb997 Use real IDP in DeviceProfileTest
- Mock WindowManagerProxy instead of IDP in DeviceProfileTest
- Extracted NavigationMode to standalone class
- Moved parseNavigationMode to WindowManagerProxy so it can be mocked
- Moved DeviceProfileTest to internal repo

Bug: 242086027
Test: DeviceProfileTest
Change-Id: Ia5a43293b1380f04d786d2adf8503cfd10f7674a
2022-09-07 10:35:21 +01:00
Tony Wickham
d833fe4a12 Merge changes Ie55bd70e,I69bcfa97,I222522bc into tm-qpr-dev
* changes:
  Fix taskbar stash state not persisting properly across recreate
  Add support to Tapl to recreateTaskbar
  Don't rely on QuickstepLauncher instance for tests
2022-09-01 00:52:54 +00:00
Tony Wickham
e74569e935 Fix taskbar stash state not persisting properly across recreate
Because we check supportsVisualStashing() in
TaskbarStashController#init(), we need to avoid using
TaskbarUIController to provide that value since TaskbarUIController
isn't initialized until a bit later than the other controllers. So I
moved the logic from supportsVisualStashing() back to
TaskbarStashController, but still allow TaskbarUIController to override
it (e.g. for DesktopTaskbarUIController).

After that fix, I noticed that force stopping launcher (to test the fix)
would briefly show the taskbar background before resetting the stashed
state. This is also due to LauncherTaskbarUIController not being ready
immediately, since that's what sets FLAG_IN_APP due to launcher being
paused. To work around this, I set FLAG_IN_APP to true by default in
TaskbarStashController#init(), since that is the most common case, and
taskbar background/stashed handle isn't shown on home anyway.

Test: Force stop launcher while taskbar is stashed, verify it recreates
as stashed without background flicker; same when changing wallpaper
color on home or in app; also tested when taskbar isn't stashed and in 3
button mode for good measure
Test: testHideTaskbarPersistsOnRecreate
Fixes: 235986838

Change-Id: Ie55bd70e8288d5ad7433dde970f18c176831d747
2022-08-30 13:42:04 -07:00
Pat Manning
53d750e427 Launch tasks before testing switch to overview.
Bug: 238461210
Test: TaplTestsQuickstep#testSwitchToOverview
Change-Id: I0033b8b33371a01165c595ae66826bef5699eddb
2022-08-24 12:25:00 +00:00
Thales Lima
a08a443d63 Make folder sizes customizable
Introduce new attrs for folder sizes and update all grids to use the new attrs

Fix: 214582832
Fix: 236272949
Test: atest DeviceProfileTest
Test: manual comparison with mocks
Change-Id: I638052a7f01b4951df0dd26db577167468a3c46d
2022-08-12 12:24:18 +01:00
Tracy Zhou
6a4a229c27 Revert "Revert "Add testSplitFromOverview test (for phones)""
This reverts commit 24df4bffd8.

Reason for revert: resubmit

Change-Id: Iebc66cbce6885e06fe7691c548c1ffe950e936df
2022-08-11 17:59:34 -07:00
Thales Lima
9938c2f791 Calculate hotseat width based on available width
Navigation buttons take space on the hotseat, so hotseat width (qsb width and border space between icons) should be calculated instead of having a coded value.

Bug: 223724516
Bug: 228998463
Test: manual, changing display size
Test: manual, changing hotseatBarEndOffset value
Test: HotseatWidthCalculationTest
Change-Id: Ibd4f5ff2e06afda8e7420fb744db049d2e418e14
2022-08-04 15:21:06 +01:00
Alex Chau
206ede9c1f Adjust height of tablet AllApps base on row height
- Also used hotseatQsbHeight for AllApps QSB height as they have to match to transform between each other

Fix: 232907846
Test: manual on different tablets
Test: atest DeviceProfileTest
Change-Id: I001d0e129db2a5de6c8ace4c3302381110da03f1
2022-08-03 15:29:22 +00:00
Pat Manning
5f74bfd76d Refactor DeviceProfile tests based on dump() and use real device dimensions for tests.
- Added roundPxValueFromFloat when converting dp/sp to px to deterministically round up values around .5

Fix: 240133465
Bug: 237542518
Test: DeviceProfileTest.kt
Change-Id: If4239f714487fe5bf2ef44274e2ce415bd75c86d
2022-08-01 17:54:43 +00:00
Jeremy Sim
fe5bccbf6f Merge "Update calculation method for Overview UI placement on tablets" into tm-qpr-dev 2022-07-29 18:56:40 +00:00
TreeHugger Robot
0438ea2293 Merge "Revert "Add testSplitFromOverview test (for phones)"" into tm-qpr-dev 2022-07-29 07:05:34 +00:00
Winson Chung
24df4bffd8 Revert "Add testSplitFromOverview test (for phones)"
This reverts commit 1780cee0fe.

Reason for revert: b/240517487

Change-Id: Id0b690ebba880dd9c978ed42c0f965beb2678b8c
2022-07-29 00:01:17 +00:00
Jeremy Sim
1cfe6d490a Update calculation method for Overview UI placement on tablets
This update slightly changes the calculation method for Overview UI placement, in order to line up better with spec. (The previous calculation caused a small 30dp divergence on tablets.)

Bug: 236760307
Test: Manual by measuring pixels and comparing to spec
Change-Id: I94e9e7b5a6a24c37693425ac8ec71cd066003658
2022-07-28 14:05:24 -07:00
Tracy Zhou
f1a523a790 Merge "Add testSplitFromOverview test (for phones)" into tm-qpr-dev 2022-07-28 05:06:40 +00:00
Vadim Tryshev
45633e5aa1 Merge "Moving all sources that are shared between Launcher and TAPL in one directory" into tm-qpr-dev 2022-07-27 20:24:35 +00:00
vadimt
f6ef879cf4 Moving all sources that are shared between Launcher and TAPL in one directory
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.

Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
2022-07-27 20:18:46 +00:00
Evan Rosky
d14f4c5181 Merge "Make shell-transit flag public" into tm-qpr-dev 2022-07-27 16:11:50 +00:00
Tony Wickham
592d80dc29 Merge "Add @ScreenRecord to testSwitchToOverview" into tm-qpr-dev 2022-07-27 14:59:12 +00:00
Tracy Zhou
1780cee0fe Add testSplitFromOverview test (for phones)
Design doc: go/split_tapl

Bug: 238553914
Fixes: 239082974
Test: run this test
Change-Id: I6b67ede6d62a9fb48222aa4d15fe29ccd1d0fa06
2022-07-27 04:18:50 +00:00
Evan Rosky
13a86c43ac Make shell-transit flag public
So it can be accessed by tests in other packages

Bug: 238328090
Test: N/A just increasing visibility
Change-Id: I5c270e1bdd315010c169d4cfcd82e3cce6d12442
2022-07-26 12:49:11 -07:00
TreeHugger Robot
5e6fe32818 Merge "Space out 3 button nav on taskbar" into tm-qpr-dev 2022-07-26 16:32:06 +00:00
Alex Chau
66bac181ac Merge "Revert "Move BaseActivityInterface task size methods to DevicePr..."" into tm-qpr-dev 2022-07-26 09:36:18 +00:00
Tony Wickham
a397f3784f Add @ScreenRecord to testSwitchToOverview
Test: N/A
Bug: 238461765
Change-Id: I0ff65e2ca7c5026d46e0e218a94a11cafe3f9648
2022-07-25 17:11:55 -07:00
Vinit Nayak
c7293179d0 Space out 3 button nav on taskbar
* Add additional margin on nav buttons if
there's overlap w/ contextual button
* End spacing is dependent on grid layout

Bug: 223724516
Test: Tested on unfolded with different
grid sizes.

Change-Id: Ie814f35cd1f35629744050ee3f7242c5a8599883
2022-07-25 13:15:11 -07:00
Alex Chau
62572c04e2 Revert "Move BaseActivityInterface task size methods to DevicePr..."
Revert "Move BaseActivityInterface task size methods to DevicePr..."

Revert submission 19279487-baseactivityinterface

Reason for revert: As per discussion in ag/19341332, make sure DeviceProfile can properly react to inset changes before moving task size calculations there
Reverted Changes:
I30324d34c:Move BaseActivityInterface task size methods to De...
Ia9c1d0387:Move BaseActivityInterface task size methods to De...

Bug: 238593212
Change-Id: I0d40fdd4a5d4468494e30cef32a284479ddd2feb
2022-07-25 18:38:03 +00:00
Tracy Zhou
3e64f94387 Merge "Add splitFromOverviewForTablet test" into tm-qpr-dev 2022-07-19 19:06:47 +00:00
Tracy Zhou
86a844c976 Add splitFromOverviewForTablet test
Design doc: go/split_tapl

Bug: 238553914
Test: run this test

Change-Id: Ibb385d852f73dee10470d14c4962cf482740105d
2022-07-19 01:57:35 +00:00
Pat Manning
4e73e5e352 Move BaseActivityInterface task size methods to DeviceProfile.
Fix: 238593212
Test: DeviceProfilePhoneTest.kt
Test: DeviceProfileVerticalBarTest.kt
Test: DeviceProfilePhone3ButtonTest.kt
Test: DeviceProfileVerticalBar3ButtonTest.kt
Test: DeviceProfileTabletLandscapeTest.kt
Test: DeviceProfileTabletPortraitTest.kt
Test: DeviceProfileTabletLandscape3ButtonTest.kt
Test: DeviceProfileTabletPortrait3ButtonTest.kt
Test: DeviceProfileTwoPanelLandscapeTest.kt
Test: DeviceProfileTwoPanelPortraitTest.kt
Test: DeviceProfileTwoPanelLandscape3ButtonTest.kt
Test: DeviceProfileTwoPanelPortrait3ButtonTest.kt
Change-Id: I30324d34ca119a467f530b590949743c2ba7b91a
2022-07-18 16:35:02 +01:00
Pat Manning
e700efde22 Merge "Add DeviceProfile tests on all attributes across different configurations." into tm-qpr-dev 2022-07-13 10:45:50 +00:00
Pat Manning
26f70f777e Add DeviceProfile tests on all attributes across different configurations.
Fix: 237542518
Test: DeviceProfilePhoneTest.kt
Test: DeviceProfileVerticalBarTest.kt
Test: DeviceProfilePhone3ButtonTest.kt
Test: DeviceProfileVerticalBar3ButtonTest.kt
Test: DeviceProfileTabletLandscapeTest.kt
Test: DeviceProfileTabletPortraitTest.kt
Test: DeviceProfileTabletLandscape3ButtonTest.kt
Test: DeviceProfileTabletPortrait3ButtonTest.kt
Test: DeviceProfileTwoPanelLandscapeTest.kt
Test: DeviceProfileTwoPanelPortraitTest.kt
Test: DeviceProfileTwoPanelLandscape3ButtonTest.kt
Test: DeviceProfileTwoPanelPortrait3ButtonTest.kt
Change-Id: I1596dcd1fb8c9b353cdfcab224d7670d88bed716
2022-07-12 14:17:18 +01:00
Pat Manning
9f61347bc6 Clip taskbar size from bottom of thumbnail in overview.
Remove other TaskView clipping logic as it is always false for other sides.

Fix: 234007059
Test: TaskThumbnailViewTest
Change-Id: I56210605fb8c2f433236a82932aaa2800afe392b
2022-07-12 13:27:25 +01:00
Thales Lima
b8c0595d42 Add new hotseat bottom margin options
This changes how the hotseat height is calculated and by consequence how spaces are distributed in the workspace as well. This is the first of a series of changes that will improve and streamline workspace calculations.

Bug: 228998463
Fix: 234023782
Fix: 230191631
Fix: 232914299
Fix: 236238226
Test: manual, HSV and comparing to mocks
Change-Id: If021e8ba2c7c24c0bf9f27a1aa7aa946792ed04f
2022-07-05 15:33:47 +01:00