490 Commits

Author SHA1 Message Date
MrSluffy
cc8f9828ab Merge branch 'heads/android-14.0.0_r18' into 14-dev 2023-12-16 17:18:13 +08:00
MrSluffy
32700b0100 Merge branch 'android14-release' into 14-dev 2023-12-13 18:47:55 +08:00
MrSluffy
19bf26dd5a Merge branch 'aosp-13' into 13-wip 2023-10-21 09:52:01 +08:00
Vinit Nayak
ecca8eacbc Default to using SplitSelectSource drawable if TaskView icon drawable is null
* Alternative solution could be to set
onTaskViewVisibilityChanged(true) for the taskView that is about
to be dismissed so it loads it's taskIcon/thumbnail back from the cache
* However, that does still leave us open to race conditions (even though
we can be reasonably confident the icon is probably in the cache)
* Also made other changes to allow already public fields on some classes
to be mockable for unit testing

Fixes: 275267738
Test: Tested with fullscreen task at end of overview,
GroupedTaskView at end of overview,
Initiating split from home,
Initiating split from overview actions,
Initiating split from overview app icon

Change-Id: Ic9059c93c07b90f61c9f418d5d36d6ba201ff96a
2023-03-30 15:26:57 -07:00
Jon Miranda
9c478b6c29 Add taskbarIconSize to GridOption/DisplayOptions
- Renamed variables to make it more clear what they represent
- DeviceProfile will be source of truth for taskbar
  sizes

Bug: 265144213
Test: phone, multi-display, tablet
Change-Id: Id9c19d15a65894fd7645e0f876a4b6527b713c34
Flag: ENABLE_TRANSIENT_TASKBAR=true
2023-03-24 12:29:11 -07:00
Jon Miranda
3344ec7004 Add spring animation when stashing transient taskbar.
Bug: 273961611
Change-Id: I35a658a5e30a155094a48effdefc3895f45e0483
Flag: ENABLE_TRANSIENT_TASKBAR
Test: stash transient taskbar
2023-03-21 10:25:48 -07:00
Jeremy Sim
da75737d63 Revert "Revert "Create TAPL test suite for splitscreen""
This reverts commit 313a44039f.

Merging will reenable the TAPL suite TaplTestsSplitscreen.java, which was failing on phones due to a function call that only works on tablets.

Fixed by conditionally running the function only on tablet devices.

Fixes: 271852893
Test: Ran tests locally on phone and tablet.
Change-Id: If3e692924ed9c5ee113872e4f8ff0652890d1280
2023-03-14 15:36:32 -07:00
Thales Lima
887c0ae68b Merge "Fix TaskView cropping for transient taskbar" into tm-qpr-dev 2023-03-13 13:27:37 +00:00
Thales Lima
9fde4781ea Fix TaskView cropping for transient taskbar
TaskView clipping is not necessary anymore because task in Overview will always be the same aspect ratio as the app when in fullscreen.

Fix: 268211636
Test: manual trigger of Overview (landscape, portrait, split screen)
Change-Id: Ib4faeda6f0cccef3b23fcbacb89c6d2832c0df59
Merged-In: Ib4faeda6f0cccef3b23fcbacb89c6d2832c0df59
2023-03-09 18:43:05 +00:00
TreeHugger Robot
19c0877745 Merge "Revert "Create TAPL test suite for splitscreen"" into tm-qpr-dev 2023-03-08 20:04:50 +00:00
Vinit Nayak
313a44039f Revert "Create TAPL test suite for splitscreen"
This reverts commit 03815e6c79.

Reason for revert: b/271852893

Change-Id: I165a15b29e41ce1114f6b7d92d22cdd8e0dfb5b0
2023-03-06 23:47:20 +00:00
Jeremy Sim
ad9bdcfd2d Merge "Create TAPL test suite for splitscreen" into tm-qpr-dev 2023-03-04 01:10:47 +00:00
Jeremy Sim
03815e6c79 Create TAPL test suite for splitscreen
This patch creates a new file, TaplTestsSplitscreen.java, containing one TAPL test sequence.

testSplitAppFromHomeWithItself() tests the user flow of splitting from home using an app that is already running, and then selecting the app itself again as a split target from the Taskbar. The expected result is that Launcher shows an error message gracefully and does not crash.

Fixes: 267554450
Test: Ran test file locally and verified that it passes.
Change-Id: I98a1e3a4143d10a6572175711059b3a77aa5dcd0
2023-03-02 16:35:54 -08:00
Jeremy Sim
e35d112693 Fix bug with Taskbar not differentiating between user profiles
This patch fixes a bug where Taskbar would not differentiate between user profiles when selecting an app to launch from Overview.

The bug occurred because findLastActiveTaskAndRunCallback(), which checks for already-running tasks when launching an app from the Taskbar, only checks for a ComponentName match and not a userId match.

Fixed by making the findLastActiveTaskAndRunCallback() also check for a userId match.

Fixes: 270456926
Test: Manual
Change-Id: I43ff06083a5dce775fdbd0b0ed951beaae34c0ab
2023-03-01 10:57:41 -08:00
Jordan Demeulenaere
be82bc661c Format files with the upcoming version of ktfmt
This CL was generated automatically from the following command:

$ external/ktfmt/prepare_upgrade.py --repo=packages/apps/Launcher3/ --build_id=9645412 --bug_id=266197805

This CL formats all files already correctly formatted with the upcoming
version of ktfmt.

Bug: 266197805
Test: Presubmits
Change-Id: Ide7d63a75fed98aabe348821355356c77f00a9ec
Merged-In: Ide7d63a75fed98aabe348821355356c77f00a9ec
2023-03-01 09:11:48 +00:00
Alibek Manabayev
3b61863ba8 Extend tests to check Transient Taskbar Autohide
Bug: 260589084
Test: ab/I67000010134246487 on local device

Change-Id: Iad141fcbac54770810009e41082ab583cc3d260e
2023-02-23 14:26:44 +00:00
Vinit Nayak
4e3636e8d0 Refactor SplitSelectStateController to add testing
Bug: 266482558
Change-Id: I2d62a3a310043710d66a26bc533df2309084b81e
2023-02-22 10:51:49 -08:00
Vinit Nayak
0a9056502b Merge "Add overview taskbar split support for 3P launcher" into tm-qpr-dev 2023-02-16 00:33:46 +00:00
Vinit Nayak
f4e7e5aaf4 Add overview taskbar split support for 3P launcher
* Created b/268120202 to track other states of split
selection that are unhandled on 3P launchers

Test: Able to initiate split in overview with 3P launcher
Fixes: 264576761
Change-Id: I0311fe83380bf914fa79956b2565b61cc5eab916
2023-02-15 11:26:06 -08:00
Schneider Victor-tulias
de7ceba80b Add the KeyboardQuickSwitchView (2/2)
Adding KeyboardQuickSwitchView and associated flows.

Test: Manually tested alt-tab and alt-shift-tab in and out of overview on a tablet and phone
Bug: 258854035
Change-Id: Ifb48b005067b3a9c66acfd5ecdbae144b359d3be
2023-02-14 13:34:37 -08:00
Thales Lima
5d5aad3024 Merge "Create an XML parser for WorkspaceSpecs" into tm-qpr-dev 2023-02-09 11:19:59 +00:00
Thales Lima
1a2d4bd6f4 Create an XML parser for WorkspaceSpecs
Extract DeviceProfileTest to Launcher3 so it can be used in other tests as well, and change name of previous base test to be more descriptive.

Bug: 241386436
Test: WorkspaceSpecsTest
Change-Id: I64613bb5a23c374ed15fb6d936192236a541ab9b
2023-02-08 11:20:14 +00:00
Jeremy Sim
5edd864c8d Improve resilience of testSplitFromOverview()
This patch makes it so that TaplTestsQuickstep#testSplitFromOverview() is less flaky.

Previously, this test worked by tapping the center of a Overview tile to confirm split select. However, sometimes the tile would be halfway offscreen, so it would accidentally tap an overlapping UI element (the staged first app) instead, causing the test to fail.

Fixed by using getCurrentTask() to always select an Overview tile that is fully onscreen.

Fixes: 267794149
Test: Manual on phone, confirmed test passing
Change-Id: I8b89509bb53a16e45aea4545562989e2e964de2d
2023-02-07 13:47:47 +08:00
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