Commit Graph

2153 Commits

Author SHA1 Message Date
Shamali Patwa
1a72429687 Merge changes from topic "preview-sizes" into main
* changes:
  Limit the recommendations space in two pane picker
  Update the widget previews to use the container sizes
  Avoid cropping image previews.
  Add preview container size helper to display previews in picker.
2024-03-13 13:32:05 +00:00
Uwais Ashraf
4ee1701fd1 Enable tests which do not require any modification
Fix: 329052420
Flag: NA
Test: Presubmits + :NexusLauncher:testGoogleWithQuickstepDebugUnitTest
Change-Id: I27e847c923076e4e978fd7359c9c62745d4f5f0a
2024-03-13 12:27:46 +00:00
Shamali P
927dd27ece Update the widget previews to use the container sizes
Additionally, adjusts the margins on sides, to make space for displaying
multiple previews side by side.

As a result of this change, previews aren't cropped anymore (indirectly
also fixing b/317366201).

There is one more follow up pending - to limit the height of
recommendations in two pane sheet to only visible area to keep the
suggestions quick to look and concise. It will also help with better
scroll experience when size is same across pages.

* http://screencast/cast/NTQ0Njc4ODgyNjc5MTkzNnxjYzZiYTU2Ny02Yw
* http://screencast/cast/NTk4ODMyMDkxOTE1ODc4NHw3NzdlNTgxZS1kMw
* http://screencast/cast/NTYxOTc5NjIxNjM4MTQ0MHxiMjQ2Njc3OC0zOQ
* http://screencast/cast/NDk4MjIxNjI0MDEzNjE5MnxjY2IwYmIxNi00Mw

Bug: 319152349
Flag: N/A
Test: Image test and table utils test
Change-Id: I07465bd4d84597b560a2b998ff1ccbf9867c0192
2024-03-12 23:47:07 +00:00
Shamali P
c93f687f12 Avoid cropping image previews.
In most cases, cropping image-based previews to just fit width leads to
degraded UX. Instead we try to fit them to the widget size if possible.

* Before: See attached bug for examples of cropped previews.
* After: http://screen/Bg7Eoydr4qBQdVZ

Additionally center align previews vertically for non-categorized
suggestions too.

Bug: 319152349, 317366201
Flag: N/A
Test: Includes a unit test & manual with the child cls
Change-Id: I4447f99028129d5d5379ead9ca404f7a011d1551
2024-03-12 23:47:07 +00:00
Shamali P
a1dbbeab7e Add preview container size helper to display previews in picker.
While we want previews to be displayed at true size, today, there is
less consistency among different widgets. This change is a first step
towards consistent sizes. In this change, we provide helper classes
that provide the size of the container in terms of grid spans.

Note: This does not change the size for rendering widget previews; but,
we take that original rendered preview and scale it maintaining the
aspect ratio to display it in one of closest container sizes.

Bug: 319152349
Flag: N/A
Test: Includes a unit test & manual with the child cls
Change-Id: I335373aa1be9a41fe039c98cded0113a007ad8c4
2024-03-12 23:47:07 +00:00
Sebastián Franco
e9ebd2d70a Merge "Revert^4 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-12 22:00:36 +00:00
Himanshu Gupta
201626b553 Merge "Using LauncherApps API for PS Settings and Setup Flow." into main 2024-03-12 21:17:22 +00:00
Willie Koomson
be65a75e82 Merge "Check for null preview in WidgetItem.hasGeneratedPreview" into main 2024-03-12 19:15:59 +00:00
Sebastián Franco
ad46eb75f4 Revert^4 "Removing all restored backups except one so we don't have old backups"
To prevent the error I introduce the method restorePreviousState().

This reverts commit 1234090589.

Reason for revert: Fixing presubmit breaks

Bug: 325285743
Flag:  ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I63666c29eb91dada4243af019ab0538c40bc0f78
2024-03-12 11:01:26 -07:00
Shamali Patwa
7574bed02e Merge "Update labels for the categories to match the UX writer provided strings" into main 2024-03-12 11:37:25 +00:00
Himanshu Gupta
616a1b828d Using LauncherApps API for PS Settings and Setup Flow.
Bug: 310027945
Test: Launcher3 tests
Flag: ACONFIG com.android.launcher3.enable_private_space TRUNKFOOD
Change-Id: I6e04a4b0c33d4526d83b51e512e1e4372ce1cca4
2024-03-11 16:13:08 -07:00
Sebastián Franco
8a5dd1b3cf Merge "Revert^3 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-11 20:17:43 +00:00
Sebastián Franco
1234090589 Revert^3 "Removing all restored backups except one so we don't have old backups"
This reverts commit 4b960d1f11.

Reason for revert: Breaking presubmit, no bug number yet 

Change-Id: I0bafad8bf63fae1d9408b65c6c18c79ab5d40d05
2024-03-11 20:15:24 +00:00
Sebastián Franco
37e9aa2504 Merge "Revert^2 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-11 17:09:21 +00:00
Sebastián Franco
bbdcade30d Merge "Add testing for GridMigration." into main 2024-03-09 13:41:00 +00:00
Brandon Dayauon
68c18236ad Disable two line text legacy flag.
Will now repurpose the twolinetoggle flag to be the flag that will
make twoline text enabled/disabled.

bug: 316027081
Test: presubmit
manually: https://screenshot.googleplex.com/BsZGCm7DrTZLwG4
Flag: com.android.launcher3.enable_twoline_toggle Staging
Change-Id: Idef427bad6551ae56b13e35393e076b8e000af5a
2024-03-08 21:32:22 -08:00
Treehugger Robot
00110bce5f Merge "Add logs for TaplAddConfigWidgetTest test" into main 2024-03-09 01:55:14 +00:00
Willie Koomson
52f2e98647 Check for null preview in WidgetItem.hasGeneratedPreview
AppWidgetManager.getWidgetPreview has been updated to return null
if the provider does not exist or the caller does not have permission to
access its previews. This change updates WidgetItem to check for that.

Bug: 308041327
Test: GeneratedPreviewTest#widgetItem_hasGeneratedPreview_nullPreview
Flag: ACONFIG com.android.launcher3.enable_generated_previews TRUNKFOOD
Change-Id: Ic2489c8698a81ba1bac005b2eb77348bcbfab999
2024-03-08 22:22:53 +00:00
Sebastian Franco
851b1f3b1c Add testing for GridMigration.
Bug: 325286145
Flag: ACONFIG grid_migration_fix disabled
Test: GridMigrationTest
Change-Id: I49fd32be895f3a05204775373b9eec62d9026f3b
2024-03-08 14:46:41 -06:00
Vadim Tryshev
513437bdfa Merge "Saving artifacts for failing initialization of PortraitLandscapeRunner" into main 2024-03-08 20:18:11 +00:00
Shamali P
20a5f4e8d1 Update labels for the categories to match the UX writer provided strings
Also fix issue that user was not passed when getting application info.
(error noticed by Zak)
http://screen/8fiiTSHvo2SfYdE

Bug: 318410881
Flag: N/A
Test: Unit test
Change-Id: Id85feec0d95d3d4d183a673f7eed40906b0043e2
2024-03-08 19:58:23 +00:00
Sebastián Franco
4b960d1f11 Revert^2 "Removing all restored backups except one so we don't have old backups"
This reverts commit 3306fa5325.

Reason for revert: Fixing issue that caused b/328782012

Change-Id: Ib6a1bbfeedf608f5f77ac6be500271e811320f32
2024-03-08 18:53:57 +00:00
Sebastián Franco
0f0c1dd30b Merge "Revert "Removing all restored backups except one so we don't have old backups"" into main 2024-03-08 18:45:17 +00:00
Sebastián Franco
3306fa5325 Revert "Removing all restored backups except one so we don't have old backups"
This reverts commit bd43b9344f.

Reason for revert: b/328782012

Change-Id: I1666fbd63d82da06ed8c3d9ce58b5ed6b298618b
2024-03-08 18:42:30 +00:00
Sebastián Franco
acdcaa21a0 Merge "Removing all restored backups except one so we don't have old backups" into main 2024-03-08 14:16:14 +00:00
Vadim Tryshev
ee39f393e7 Saving artifacts for failing initialization of PortraitLandscapeRunner
Test: presubmit
Flag: N/A
Bug: 321772674
Change-Id: Ifa865224ebdae160b4fbc75b587d893ac6bfd847
2024-03-07 18:28:21 -08:00
Himanshu Gupta
68c145a14b Merge "Clearing All Apps Search For ALL_APPS Intent" into main 2024-03-07 22:29:31 +00:00
Sukesh Ram
73b07daab3 Add logs for TaplAddConfigWidgetTest test
Flag: NONE
Bug: 324419890
Test: Check logs when flake is reproduced
Change-Id: I2fdb1e4f96c8095a387280c79e074ee42eb0010c
2024-03-07 18:53:15 +00:00
Sebastian Franco
bd43b9344f Removing all restored backups except one so we don't have old backups
Adding test to make sure this is the case.

Bug: 325285743
Flag:  ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I84c3a92f40598137d5c5c52d34af7583b384122c
2024-03-07 11:23:55 -06:00
Brandon Dayauon
d0bec45d37 Upon expanding, expand just enough so the header shows.
This issue only happens when there is a lot of private space apps that scrolling to the bottom
will not sure the private space header.

Formula to calculate how many rows to scroll to =
	(appListHeight - privateHeaderHeight - headerProtectionHeight) / cellHeight.

bug: 299294792
Test:
manually - https://screenshot.googleplex.com/76UJPT2Jnpnp2Ab
before: it just scrolls all the way to the bottom
after: https://drive.google.com/file/d/1AbprxFm1RWTQKvpt7M4khbUfc1o6-XGF/view?usp=sharing
after PHONE WITH TABS:
2x2- https://drive.google.com/file/d/1SLPsWPHenCuZuisiS7HeEy5JwtNPeONs/view?usp=sharing
3x3- https://drive.google.com/file/d/1SK82jeNZMzFJK2odIuHnfTNLYfppne83/view?usp=sharing
4x4- https://drive.google.com/file/d/1T7EhFRq2tDv2zYIvs_FMsTKcFZXwGUaD/view?usp=sharing
4x5- https://drive.google.com/file/d/1SMUPuKjO1Yg36U6P6cDOb6dTkHn6Bh7D/view?usp=sharing
5x5- https://drive.google.com/file/d/1SJCQn1O_Yq5P7C__VUfZHc5I67CEdIpb/view?usp=sharing

AFTER PHONE NO TABS:
2x2: https://drive.google.com/file/d/1THU2xrAIt0hTmN5_GwBrgN9Lqj-W4Kfr/view?usp=sharing
3x3: https://drive.google.com/file/d/1TPTUx7PcHW3GsVwVAg_L5rCcn0QYoiY2/view?usp=sharing
4x4: https://drive.google.com/file/d/1TWVWpAX6bZp_JfFKtmXYO0askl4e5qKO/view?usp=sharing
4x5: https://drive.google.com/file/d/1TDJK-swmY3Y3C4ARH_2eljqUkBGEnD3e/view?usp=sharing
5x5- https://drive.google.com/file/d/1TBJtAynwvZrGyOc-29f637wyrJZpMXBJ/view?usp=sharing

Tablet:
landscape: https://drive.google.com/file/d/1SfyPdoUnCV7e7BWLnpxXWN2HiBOQkRo2/view?usp=sharing
portrait: https://drive.google.com/file/d/1SgZq0iE9WMvIFtc8mBb577nYlS9jBa_g/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation TRUNKFOOD

Change-Id: If70df1299572f8f2edc6376dd2a6df5d74287264
2024-03-06 18:04:09 -08:00
Fengjiang Li
c6ae88f904 Use Matrix.setRectToRect() replace RectUtils.letterBox()
Bug: 284236964
Flag: aconfig launcher.enable_add_app_widget_via_config_activity_v2 DISABLED
Test: manual
Change-Id: Ia83f3415442c2359bffb1efcfd1ee96bf17ab9ff
2024-03-06 17:04:02 -08:00
Fengjiang Li
7dea7f0b42 Merge "[2/n] Avoid flicker to drop a widget that needs a config activity" into main 2024-03-06 02:03:48 +00:00
Fengjiang Li
fb16517fea [2/n] Avoid flicker to drop a widget that needs a config activity
1. Don't show background in PendingAppWidgetHostView if we are showing preview bitmap
2. Extract bitmap from DropView instead of LauncherAppHostView
3. Letterbox bitmap into PendingAppWidgetHostView's canvas if canvas has different aspect ratio

Fix: 284236964
Flag: aconfig launcher.enable_add_app_widget_via_config_activity_v2 DISABLED
Test: manual
Change-Id: I76de215186b96ffe65c909b28155fb19ac90d4f1
2024-03-05 14:49:09 -08:00
Anushree Ganjam
be6fff5e6a Add InputDispatcherRule to print the key events dispatched from system_server.
See
https://source.corp.google.com/h/android/platform/superproject/main/+/main:cts/libs/input/src/com/android/cts/input/DebugInputRule.kt

Locally we can execute `adb shell setprop log.tag.InputTransportPublisher DEBUG` to enable the InputDispatcher logs.

I want to debug why "Ctrl+W" DOWN events in not received by TAPL and to which window is the events delivered.

Bug: 325377690
Test: Manual
Flag: NA
Change-Id: I3f55a48ef3ca79fdaff9d1269c55846cb67b2179
2024-03-04 14:01:05 -08:00
Uwais Ashraf
9c2f5a4c62 Remove classes related to E2E testing from deviceless test classpath
Fix: 327187136
Flag: NA
Test: gradlew :NexusLauncher:testGoogleWithQuickstepDebugUnitTest
Test: atest Launcher3RoboTests
Test: presubmits passing
Change-Id: I4f05524bdc55d8473f3b5115cc239eb8cc48a856
2024-03-04 13:45:32 +00:00
Himanshu Gupta
b3cd9802e8 Clearing All Apps Search For ALL_APPS Intent
Currently, if ALL_APPS intent is executed while All Apps
QSB is highlighted, user is left on the search sub-view of
the All Apps view.
To fix this, we add a runner to check the search view and
exit from it after State Transition has happened.

Before: https://photos.app.goo.gl/c5WeUnAzowxRWW1m7
After: https://photos.app.goo.gl/dxvb23wzwPfKqi3o6

Bug: 324516950
Flag: NA
Test: Manual flash and running intent via cmd
Change-Id: Icc291f792545b0c515535857f578bc2e01fef7f7
2024-03-02 18:42:33 +00:00
Federico Baron
b68a6e581c Merge "Add ScreenRecord for workTabExists tapl test" into main 2024-02-29 02:56:55 +00:00
Treehugger Robot
e5f02039eb Merge "Debugging Logs for TaplDragTest#testDragAppIconToMultipleWorkspaceCells" into main 2024-02-28 23:59:38 +00:00
fbaron
bd528add50 Add ScreenRecord for workTabExists tapl test
Bug: 325383911
Test: TaplWorkProfileTest#workTabExists
Flag: NONE
Change-Id: I83c92376b16c9b0de352a03ce297e7a9ae51123d
2024-02-28 12:07:49 -08:00
Sukesh Ram
872b9f9a61 Debugging Logs for TaplDragTest#testDragAppIconToMultipleWorkspaceCells
Add logging for TaplDragTest#testDragAppIconToMultipleWorkspaceCells.

Flag: NONE
Test: Manually tested in pixel 7.
Bug: 326908466
Change-Id: Icb3262d6af66c9b947cb0cc92c1c67556fba315f
2024-02-28 19:28:07 +00:00
Vadim Tryshev
544f6e228c Add TestStabilityRule so that @Stability annotation works
Bug: 319923578
Test: presubmit
Flag: N/A
Change-Id: I5613a2ee658a458871ea89219764d13796d07b83
2024-02-28 18:27:39 +00:00
Vadim Tryshev
2b5c4d51a5 Merge "Demote from presubmit a set of flaking tests" into main 2024-02-27 17:11:09 +00:00
Himanshu Gupta
dcf394535a Merge "Making Settings Cog open PS Settings page." into main 2024-02-27 15:46:34 +00:00
Jakob Schneider
c93dc0e52a Merge "Remove archiving test because it tests platform specifics instead of launcher logic." into main 2024-02-26 18:26:18 +00:00
Vadim Tryshev
3d02d86872 Demote from presubmit a set of flaking tests
Bug: 319923578
Test: presubmit
Flag: N/A
Change-Id: Icd18cbe386b5cab9ac33b0b74ad0d2d8a40fa5c3
2024-02-26 10:18:54 -08:00
Andy Wickham
525163d0c7 Merge "Use setFlags to disable two line toggle flag in tests." into main 2024-02-25 08:09:39 +00:00
Priyanka Advani
d0a1c2c023 Merge "Revert "Remove Unused parts of LauncherPrefs causing cyclical dependency."" into main 2024-02-23 18:11:50 +00:00
Priyanka Advani
a80997d9eb Revert "Remove Unused parts of LauncherPrefs causing cyclical dependency."
This reverts commit 21ab3b979b.

Reason for revert: Culprit for b/326611479. Will be verifying through ABTD for confirmation and before submitting the revert.

Change-Id: Ib71791d159b3ac65ca332f58500341a1a0fe36e1
2024-02-23 18:05:39 +00:00
Jakob Schneider
07c1c98dab Remove archiving test because it tests platform specifics instead of
launcher logic.

Sunny suggested to remove this test b/325283522 because we shouldn't
have any platform logic in these launchers tests.

Test: N/A
Bug: 325283522
Flag: NA
Change-Id: I6a8eea815e0cf5951f98030063447fe5fd0142eb
2024-02-23 16:20:30 +00:00
Federico Baron
cda8adfad3 Merge "Fix testDragToFolder()" into main 2024-02-23 00:41:55 +00:00