Commit Graph

2162 Commits

Author SHA1 Message Date
Sunny Goyal d2a34a2d54 Merge "Scale folder if it doesn't fit the screen" into tm-qpr-dev 2023-03-20 20:01:52 +00:00
Thales Lima 7eee74b3f8 Scale folder if it doesn't fit the screen
Scale folder attrs if a full folder doesn't fit the screen width. This will make icons and text smaller than the workspace.

As a follow-up, another bug will be created to only scale full folders instead of all folders.

Bug: 271554689
Test: manually create a full folder, change the display size to large+
Change-Id: I47dc4bd4fe0c9eae989095fc1d179b81d350ef77
2023-03-17 14:13:04 -03:00
Jeremy Sim 7b286a4f68 Merge "Revert "Revert "Create TAPL test suite for splitscreen""" into tm-qpr-dev 2023-03-15 21:08:24 +00:00
Vinit Nayak 51a864893b Merge "Add debug logs for WorkTabExists test" into tm-qpr-dev 2023-03-14 22:46:07 +00: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
Vinit Nayak 7a68378fe4 Add debug logs for WorkTabExists test
Bug: 243688989
Change-Id: Iafec4cae86f1527acac9a25fceb501609ca308f6
2023-03-13 14:27:55 -07:00
Andrew Cole f905365e5a Merge "Asking the test to wait for launcher to commit the uninstall transaction before opening all apps." into tm-qpr-dev 2023-03-13 20:51:38 +00:00
Andrew Cole 66e5c91380 Asking the test to wait for launcher to commit the uninstall transaction before opening all apps.
Bug: 258071914
Test: Run testUnintallFromAllApps
Change-Id: Iceba2650e24b06c162f42767955fa6ae3e3b19c8
2023-03-13 09:58:26 -07:00
Brandon Dayauon c5677f824f Merge "Clean up bubble text view test so that the feature flag is off at the end" into tm-qpr-dev 2023-03-11 01:48:38 +00:00
Brandon Dayauon 7d10db66de Clean up bubble text view test so that the feature flag is off at the end
- When running the test with feature flag is on, the TestLauncherApp is unable to be found when rerunning the failed TaplTests the bug states. I suspect this because the BubbleTextViewTest.java test is not properly torn down in the test environment which seems to be the case.

bug: 272798314
bug: 272797678
test: locally - able to repro when two line is on
Change-Id: I7379a5411de70f24804b404dbe5c7cf7f6769977
2023-03-10 15:51:28 -08:00
Sebastián Franco 4122868216 Merge "Making sure there is a propper Chrome icon for the test to long press" into tm-qpr-dev 2023-03-10 19:19:42 +00:00
Brandon Dayauon cf88ea1e62 Support two line text in AllApps/OnDeviceSearch w/ feature flag
Made separate feature flag for on device search
Add unit test to test twoLine string
- Unit tests for testing newStringThatShouldSupportTwoLineText() in BubbleTextView.java. This class tests a couple of strings
and uses the getLineCount() to determine if the test passes. Verifying with getLineCount() is sufficient since BubbleTextView can only be in one line or two lines,
and this is enough to ensure whether the string should be specifically wrapped onto the second line and to ensure truncation.

bug: 201388851
test: presubmit, ran locally on big and small device, before: https://screenshot.googleplex.com/3Q6pwveFDZqxDXL (ORIGINAL TWO LINE TEXT)
after:  https://screenshot.googleplex.com/7pkwUto6HGzMYoT

Change-Id: I93e6ed179e1081d5cdffc6db9c7ae34de8021c24
2023-03-09 15:13:04 -08:00
Sebastian Franco 239ae0a995 Making sure there is a propper Chrome icon for the test to long press
In some cases, the test was long pressing on a recommendation for
google chrome and not a regular chrome icon and the events didn't
match. I don't think is good to relly on chrome getting recommended
so I'm making sure there is always a chrome app icon on the hotseat

Fix: 269163620
Test: atest TaplTestsLauncher3:testWorkspace (run on pixel 7 pro)
Change-Id: Ic8ee744a9af18d60de9bbedd42043f5abbbd7356
2023-03-09 14:59:21 -08:00
TreeHugger Robot 19c0877745 Merge "Revert "Create TAPL test suite for splitscreen"" into tm-qpr-dev 2023-03-08 20:04:50 +00:00
Schneider Victor-tulias bd98aef4a4 Merge "Fix flaky RequestPinItemTests" into tm-qpr-dev 2023-03-07 23:36:10 +00:00
Brandon Dayauon 9de1c05cbf Merge "Add logging to testDragAppIconToWorkspaceCell()" into tm-qpr-dev 2023-03-07 19:37:44 +00:00
Sihua Ma a245873fed Merge "Update widget picker row logic to resolve cropping" into tm-qpr-dev 2023-03-07 18:42:46 +00:00
Schneider Victor-tulias c3281a42a8 Fix flaky RequestPinItemTests
RequestPinItemTest is flaking because launcher hasn't started yet before the tests try to complete gestures. Waiting for launcher to intitialize before running tests.

Fixes: 267201968
Test: RequestPinItemTest
Change-Id: Ib52e00a1ce68fba5d9af9d1c875078f2f60ea248
2023-03-07 10:36:02 -08: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
Sihua Ma 16180801e8 Update widget picker row logic to resolve cropping
Using pixels instead of cell spans for calculating the widget picker row
binding logic.

Before: https://screenshot.googleplex.com/3uXX2m7xWh3om5t
Now: https://screenshot.googleplex.com/C593mrQfqTahNrQ

Test: Manual
Fix: 269790954
Change-Id: Ib591a6f6d3cf8b72766e0714b9bc8ceb86b2ba4f
2023-03-06 13:41:24 -08:00
Vadim Tryshev 8f7ca126b0 Merge "Making Launcher3Tests "abtd atest"-compatible" into tm-qpr-dev 2023-03-06 19:59:03 +00:00
Jeremy Sim ad9bdcfd2d Merge "Create TAPL test suite for splitscreen" into tm-qpr-dev 2023-03-04 01:10:47 +00:00
Sunny Goyal b138ec9fc6 Adding support for overriding flag values in test
Bug: 270386012
Test: Verified on device
Change-Id: Ic1af9ca369c0cd2ec49d98875f7b97e90a0050ca
2023-03-03 09:29:42 -08: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
Vadim Tryshev 990a32e7cf Making Launcher3Tests "abtd atest"-compatible
Test: labtest
Bug: 187761685

Change-Id: I3e7ed63eb8cfa0d634d720a692e050deb8736906
2023-03-02 23:06:37 +00:00
Stefan Andonian 5bd9a225a8 Preload expensive objects before user is unlocked.
This change includes migrating data required for starting the launcher
from encrypted storage into device protected storage. All of the data
being moved has already been approved by the correct authorities.

Bug: 251502424
Test: Performed latency testing using logs from user unlock until first
workspace screen loaded.

Change-Id: I58b0cd1c7bad260c2252f9e172ef85ab885c7fe9
2023-03-01 23:09:07 +00:00
Schneider Victor-tulias e09fecc272 Merge "Add debug logs to help investigate view and activity leak test failures." into tm-qpr-dev 2023-03-01 17:14:27 +00: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
Sunny Goyal 1297f400bc Merge "Moving flag creation to a separate file" into tm-qpr-dev 2023-02-28 19:18:25 +00:00
Sunny Goyal 98204add71 Moving flag creation to a separate file
> This provides better control over proguarding descriptions
> Enforcing bug number in flag creation

Bug: 270386012
Test: Presubmit and verified on device
Change-Id: I31014e397690379024d2e42c0e913ce806b9569c
Merged-In: I31014e397690379024d2e42c0e913ce806b9569c
2023-02-28 18:05:42 +00:00
Schneider Victor-tulias 5c817a7fdb Add debug logs to help investigate view and activity leak test failures.
Test: MemoryTests
Bug: 260260325
Change-Id: I510d9bb3a5a8a273fd0e5fb09de05354c959fbde
2023-02-27 11:00:10 -08:00
Helen Cheuk a695986d56 Merge "Update folder row and column for 5x5 grid to 4x4. Update dump method to include changed properties and add dump test for 5x5 grid" into tm-qpr-dev 2023-02-27 17:55:42 +00:00
Sebastián Franco 2e1524ec2f Merge "Binding tests to TouchInteractionService to preventing it from getting destroyed" into tm-qpr-dev 2023-02-25 00:45:46 +00:00
Schneider Victor-tulias cd17310656 Merge "Add debug logs to debug flaky workspace binding" into tm-qpr-dev 2023-02-24 21:12:41 +00:00
Helen Cheuk 599109b23f Update folder row and column for 5x5 grid to 4x4. Update dump method to include changed properties and add dump test for 5x5 grid
Originally folder row and column for 5x5 grid was 3x3. This change is to update it to 4x4 in config to increase the max number of cells displayed. It also adds corresponding test for 5x5 grid and includes numFolderRows and numFolderColumns in the dump string

Fix: 265139500
Test: DeviceProfileDumpTest
Change-Id: I09fe3eac8113a147cb895988e5424471e4e772e5
2023-02-24 14:40:50 +00:00
Ling Wo 6d3658dd0c Merge "Revert^2 "Expose getSearchBox from the HomeAllApps class"" into tm-qpr-dev 2023-02-24 02:24:54 +00:00
Brandon Dayauon 3d58117d76 Add logging to testDragAppIconToWorkspaceCell()
- add time logs to see what is taking up the most time

bug: 269555222
test: presubmit + manually
Change-Id: I36e763a42e0d8ebdcca108d9206418e05ab33e8f
2023-02-23 16:21:50 -08:00
Ling Wo d70c8a743d Revert^2 "Expose getSearchBox from the HomeAllApps class"
Reverted changes: /q/submissionid:21128652-revert-20714047-b_255390519-CAXVPNWYOY

Change-Id: I0e9680408e8b1db85600a226d808669c65ba4967
Bug: b/266169958
2023-02-23 02:42:09 +00:00
Federico Baron 4ee5c429fe Merge changes I6c89c639,I6cab9202 into tm-qpr-dev
* changes:
  Move 'no widgets found' to right pane and add rounded edges to right pane.
  Add ripple effect when a header in widget picker is selected.
2023-02-22 23:24:10 +00:00
Stefan Andonian 78187b3812 Merge changes from topic "idp_grid_name" into tm-qpr-dev
* changes:
  Add unit test and fix bug related to "Migrate IDP_GRID_NAME usage to LauncherPrefs" CL.
  Revert "Revert "Migrate IDP_GRID_NAME usage to LauncherPrefs""
2023-02-22 22:09:42 +00:00
Schneider Victor-tulias 6b94a960c0 Add debug logs to debug flaky workspace binding
Bug: 270216650
Test: ReorderWidgets
Change-Id: I6fa2eab98c0268000ef4c44980c2917d5ef1bc89
2023-02-22 13:05:13 -08:00
Stefan Andonian 246eeaaea1 Add unit test and fix bug related to "Migrate IDP_GRID_NAME usage to LauncherPrefs" CL.
The issue was that kotlin initializes class variables before contructor
variables, but allows constructor variables to be referenced by
the class variables before they are initialized. This led to `isBackedUp`
always being false, and then the SharedPreference store always and only
checking if values were in DEVICE_PREFERENCES rather than the standard
backed up preferences.

The fix is to make the class variable sharedPrefFile lazily retrieved.
That way, isBackedUp will have been initialized and behave correctly.

Bug: 269569568
Test: Everything works on device and manual and unit tests
verified original bug is not present.

Change-Id: I8ab4a5752886ce8f4a2988295fa61c8a2c38ec7c
2023-02-22 19:05:00 +00:00
Stefan Andonian 4c9612be30 Revert "Revert "Migrate IDP_GRID_NAME usage to LauncherPrefs""
This reverts commit df11959779.

Bug: 269569568
Test: In follow-up CL, everything works on device and manual and unit tests
verified original bug from this CL is not present.

Change-Id: I125bbbfd6442cd3fa1e88c9109de536b88981dc6
2023-02-22 18:53:26 +00:00
Stefan Andonian 429460beae Re-add LockedUserState util that was reverted after TAPL test failures.
Bug: 251502424
Test: Unit tests all passed.
Change-Id: I80f1d521d430edf6c4d5e027d14e2087ed7e04f1
2023-02-22 18:49:21 +00:00
Sebastian Franco 0451d239ed Binding tests to TouchInteractionService to preventing it from getting destroyed
Fix: 257514573
Bug: 266716173
Test: atest MemoryTests
Test: atest TaplTestsLauncher3#testDragAppIcon
Change-Id: Ib53bf11f45f9e05bf55116d52f3406f45dfaf6c2
2023-02-22 10:14:29 -08:00
Federico Baron e8217b3c1b Add ripple effect when a header in widget picker is selected.
We need to use setSelected in order to add a ripple effect when a header is selected in tablet landscape mode, and to set the style through XML rather than programmatically the way it was done before in the method `setLargeScreenTheme`.

Fix: 268558453
Test: Turn on LARGE_SCREEN_WIDGET_PICKER and verify that when selecting a header there's a ripple effect on that header
Change-Id: I6cab920258a57118430d1e07416508ef36faa56d
2023-02-21 16:33:18 -08:00
Stefan Andonian b7221177b4 Merge "Revert "Migrate IDP_GRID_NAME usage to LauncherPrefs"" into tm-qpr-dev 2023-02-21 18:12:55 +00:00
Stefan Andonian df11959779 Revert "Migrate IDP_GRID_NAME usage to LauncherPrefs"
This reverts commit 6f9a57186c.

Reason for revert: A Bug where only device preferences were being used, not the main shared preference file.

Bug: 269569568
Test: Verified this on device.
Change-Id: I8422b2d7073537bd46c3a91033bd2281bbd306b7
2023-02-21 18:12:11 +00:00
Robin Lee aafeb82613 Revert "Refactor the OnUserUnlock code out of RecentsAnimationDeviceState and"
This reverts commit 2a58ddb89f.

Reason for revert: b/266987957

Change-Id: I4a4a1f01a693d703f4dc87e8169fbf374729d274
2023-02-17 19:45:27 +00:00
Sunny Goyal cc10ed5532 Merge "Using DiffUtil for calculating widget diff instead of a custom implementation" into tm-qpr-dev 2023-02-16 23:28:19 +00:00