Commit Graph

464 Commits

Author SHA1 Message Date
Pat Manning
f667823a8e Merge "Make showing back for bouncer only rely on back disable status, not home and recents as well." into tm-qpr-dev 2023-01-31 21:13:46 +00:00
Pat Manning
7462c2ab62 Make showing back for bouncer only rely on back disable status, not home and recents as well.
Fix: 260655218
Test: manual. Create second user, switch to three button nav, set lockscreen password, lock and show IME on lockscreen.
Change-Id: I1d874196afc24d5bae86d525a81ae199152fc750
2023-01-31 14:57:26 +00:00
Schneider Victor-tulias
7d346bf90b Merge "Revert "Revert^2 "Cancel gestures on launcher destroy""" into tm-qpr-dev 2023-01-30 21:39:50 +00:00
Schneider Victor-tulias
ece659d11a Revert "Revert^2 "Cancel gestures on launcher destroy""
This reverts commit 377eb40985.

Reason for revert: failing tests
Fixes: 266606727
Fixes: 266621449

Change-Id: I61094be02fb73c5ad65ee65be5ed93a3364f37ef
2023-01-27 14:38:19 -08:00
Jon Miranda
6f53364c14 Merge "Split taskbar test methods by persistent/transient" into tm-qpr-dev 2023-01-27 21:27:01 +00:00
Jon Miranda
7acd32cf16 Split taskbar test methods by persistent/transient
Test: TaplTestsTaskbar
Bug: 266861780
Change-Id: I0fc0ef58aa4bc087248ab223c4716992bc0cd692
2023-01-26 16:08:23 -08:00
Schneider Victor-tulias
74484f4a99 Merge "Revert^2 "Cancel gestures on launcher destroy"" into tm-qpr-dev 2023-01-24 17:55:54 +00:00
Brian Isganitis
b21ad2da8c Implement initial transient Taskbar EDU tooltips.
Since this tooltip looks and behaves differently than the existing EDU
sheet, it has its own view and controller implementations (I also may
have wanted to write some Kotlin).

To keep transient taskbar open while on the second EDU step, another
autohide suspend flag is defined. Additionally, special casing is added
to avoid hiding transient taskbar if autohiding is currently suspended.

Tooltips use the same assets as the bottom sheet for now, and are scaled
down to fit the tooltip dimensions.

Reset `Taskbar Education` in Developer Options to try EDU again.

[Demos]
- First: https://screenshot.googleplex.com/ASBeGvrb2EA5wEF.png
- Second: https://screenshot.googleplex.com/7fnfcTh9bMYezDc.png

Test: Manual
Test: Open app, see swipe-up tooltip.
Test: Swipe up to show transient taskbar, see features tooltip.
Bug: 263157739
Fix: 258460203
Change-Id: I473f5fccbae279db0614763b640da0a120b6b7f7
2023-01-20 15:16:12 -08:00
Vinit Nayak
b1c47227b1 Add unit tests for TaskbarKeyguardController
* Remove setting back button tint for SUW as that
is now done in ag/20953768

Bug: 230027385
Change-Id: I2c157ed67487cab9ba721fa659973351780509bb
2023-01-18 10:42:45 -08:00
Christophe Pinelli
9d46bca1b9 Make mutable PendingIntent explicit
Starting from target SDK U, we will block creation of mutable
PendingIntents with implicit Intents because attackers can mutate the
Intent object within and launch altered behavior on behalf of victim
apps. For more details on the vulnerability, see go/pendingintent-rca.

From a quick analysis, we concluded that the PendingIntent here was only
destined to the test app/to the app, so it was made explicit. Reviewers,
please call out if this is not the case.

Bug: 236704164
Test: atest NexusLauncherTests:com.android.quickstep.DigitalWellBeingToastTest
Test: atest RequestPinItemTest
Change-Id: I81311b0588b7b712c97de6cb016a62bb91c7a77c
2023-01-12 01:51:44 +00:00
Thales Lima
bdfc07f1f0 Merge "Check kotlin format before uploading" into tm-qpr-dev 2023-01-10 16:41:58 +00:00
Thales Lima
03ac377a34 Check kotlin format before uploading
This uses ktfmt on the PREUPLOAD hook to check file formatting.

Bug: 264851618
Test: manual
Change-Id: I8bdeabd9c1ed571a464707e6912419ad3190a169
Merged-In: I8bdeabd9c1ed571a464707e6912419ad3190a169
2023-01-10 13:24:43 +00:00
Wei Sheng Shih
485c8777cc Merge "[ShellTransit] Stabilize QuickSwitch test since Launcher can resumed." into tm-qpr-dev 2023-01-06 03:27:56 +00:00
wilsonshih
ae4a9ac0d4 [ShellTransit] Stabilize QuickSwitch test since Launcher can resumed.
QuickSwitch can resume Launcher activity due to transient launch when
shell transition is enabled, waiting for the Launcher leave resume
stage to make the test stable.

Bug: 263907455
Test: atest TaplTestsQuickstep#testQuickSwitchToPreviousAppForTablet
Change-Id: I2e6e0511cba51f4634ccf3da454e4be1dd93ffd1
2023-01-04 07:23:51 +00:00
Vinit Nayak
0d784ee7fb Toggle taskbar button nav assistant availability
* New signals coming in from Sysui reflect the toggle
in Settings for long pressing on home button to
invoke assistant.

Fixes: 255909545
Test: Manual + added unit test for TaskbarNavButtonController
Change-Id: Ic65a80b0b9697990931b7e89756773fb086cc3bd
2023-01-03 20:07:27 -08:00
Schneider Victor-tulias
377eb40985 Revert^2 "Cancel gestures on launcher destroy"
f0de6cc2ca

Bug: 261816852
Fixes: 244593270
Fixes: 257976590
Fixes: 261504234
Test: FallbackRecentsTest#goToOverviewFromApp and FallbackRecentsTest#goToOverviewFromHome
Change-Id: If49a08fd62b99c9bbc007900b613b83747916f5f
2023-01-03 11:31:05 -08:00
Thales Lima
6a59006592 Polish hotseat and taskbar with 3 buttons
Change margin spaces and logic of how many items the hotseat and taskbar should show.

Fix: 246424857
Test: DeviceProfileDumpTest
Test: HotseatWidthCalculationTest
Change-Id: I8ec71c56a0aa362483c43d6400c762d12cf45f5b
2022-12-17 11:20:21 +00:00
Alex Chau
be753137a2 Don't scale iconSize and textSize in non-default display size
- Cells should get extra space by reducing borderSpace. If that's still not enough, use 0 borderSpace and distribute the space

Fix: 256976071
Fix: 248348171
Test: manual
Change-Id: I067c1aaa553d7a84caeeb9ce21e80cfaf86a3bed
2022-12-13 16:30:14 +00:00
Sebastian Franco
150e572e05 Ignore all launcher3 flaky test so that they come back online
Test dashboard: https://android-build.googleplex.com/builds/tests/search?filter=mediumFailureRate&filter=highFailureRate&query=config%3Av2%2Fgnl-eng%2Funbundled%2Flauncher%2Flauncher3_test_platform+latest%3A4d&tab=tests

Test: dashboard should not show flaky tests
Bug: 256832045
Change-Id: I06e879dec2703455b7be728c7afd3500d2edd54a
2022-12-06 17:08:45 -08:00
Vinit Nayak
190fa37647 Update test for change in calculation of split portrait clipping
* Updated code, wrote new test for new code
but forgot to update old test.

Fixes: 261110474
Test: FullscreenDrawParamsTest passes
Change-Id: I39a9029b69774f0ea7064da295c516f547bcbef2
2022-12-01 21:22:38 -08:00
Vinit Nayak
3b1f5849ce Update for stashed taskbar animation
* Strangely if you swipe up with a split pair
and then tap on the live tile to go back to
fullscreen this animates fairly correctly.
However, if you drag the focused pair back to fullscreen
the bottom app does not unclip as expected

Bug: 219411750
Test: Swipe up w/ stashed taskbar in portrait.
Thumbnail cutout doesn't appear when dragging to
fullscreen

Change-Id: Ia6e7aae10389d9fefa4adbfce540171bbe0a9180
2022-11-30 11:56:40 -08:00
Vinit Nayak
825ede3e92 Update test for vertical split
* Takes into account taskbar insets, not sure what
expected val should be so copied the same logic from code

Bug: 219411750
Test: Ran test, passes
Change-Id: I6230a3d043e41446c35c9b393abf4a2e0ea891af
2022-11-17 16:39:27 -08:00
Vinit Nayak
03695ba0f2 Merge "Add test for vertical and horizontal split apps" into tm-qpr-dev 2022-11-16 20:45:01 +00:00
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
Vinit Nayak
7545f20268 Add test for vertical and horizontal split apps
* More work still needs to be done for portrait
split apps with stashed taskbar

Bug: 258714015
Test: Existing tests pass, visually saw slight
improvement in stashed portrait gesture clipping.

Change-Id: Id1b9bb28a1a2676a5da1b5e5824e0835290cb616
2022-11-15 11:23:38 -08: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