Commit Graph

115 Commits

Author SHA1 Message Date
Shamali Patwa
afa97055fa Update various tests to prepare for the new picker UI
- Switched the tests that probe old picker to use disabled flag
- Added some more tests for new code
  - A test to use the tap to add listener to add widget to homescreen
  - Updated compose unit test to cover for expanding an item

Bug: 408283627
Flag: EXEMPT independent module
Test: Test changes
Change-Id: I238896ec6e24596db93953a22bb43f6c7abbb9d1
2025-06-03 17:37:40 -07:00
Catherine Liang
4bbf978043 Move custom Launcher theme flag to shared SysUI package (1/3)
This allows the flag to be shared with Customization Picker.

Flag: com.android.systemui.shared.extendible_theme_manager
Test: manually verified by building w/ soong and gradle
Test: manually verified by flipping flag
Bug: 397782741
Change-Id: I131f54602e33dd2b92ce0068f5fc43da3e150a01
2025-05-29 18:47:43 +00:00
Pierre Barbier de Reuille
8ac46d7e37 Only show the Desktop shortcut when appropriate
The Desktop shortcut should only be shown if the task is on a display
that can host a desktop.

Bug: 405181230
Test: atest DesktopSystemShortcutTest
Test: Manual
Flag: EXEMPT (bug fix)
Change-Id: I4639aade4c3640a3c60b85e08981cbe46974df38
2025-05-13 14:41:13 +01:00
Sebastián Franco
73dd3d3723 Merge "Making the Launcher Customizar available to Launcher3 and not only Nexus" into main 2025-05-06 08:56:51 -07:00
Sebastian Franco
3fd034c932 Making the Launcher Customizar available to Launcher3 and not only Nexus
Bug: 390496167
Bug: 411322054
Test: All Image tests
Flag: EXEMPT test only
Change-Id: I5e6cd806036bbc548ba9526efd619eec7ab9facd
2025-05-05 22:56:38 +00:00
Sebastian Franco
fc8537d5de Creating NexusLauncherE2ETests test suite, this cl only adds the Launcher3 part
The test don't run yet in presubmit, first I will have the NexusLauncherE2ETests
target ready and then I will add it to the presubmit.

Bug: 324261526
Flag: EXEMPT test only
Test: atest NexusLauncherE2ETests
Change-Id: I4daa204ec735456c481b0682ca518da381af7bb7
2025-05-05 18:53:08 +00:00
Anushree Ganjam
7128c6fcfb Refactor TestEmitter and it doesn't need to be MainThreadInitializedObject
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger

Change-Id: I30e7c3c165db698785e9e4d7e2256ab061ff71a2
2025-02-13 15:20:17 -08:00
Rex Hoffman
2c1c08a1ac Remove no longer meaningful upstream: true flag.
This used to direct robolectric tests to /external/robolectric rather than the older/unmaintained /external/robolectric-shadows, that has since been deleted.

Change-Id: If5065b2d25b5e5d8850f50dd4b25bd0ea7e3dd5c
Flag: TEST_ONLY
Test: CI
Bug: 386652866
2025-01-08 10:13:04 -08:00
Sunny Goyal
a39a09ba6a Replacing custom parcelables with platform types for test APIs
Bug: 377772352
Flag: EXEMPT test only
Test: Presubmit
Change-Id: Ie464c67adf6502aee1fe65ef643e1a67260b820f
2024-12-26 17:19:15 -08:00
Sunny Goyal
5f8e2d7c13 Migrating widgets tests off TAPL
Bug: 377772352
Test: Presubmit
Flag: EXEMPT test refactor
Change-Id: I6e9ffb3dee913617ca9ad897504e8457cfbdccd6
2024-11-15 12:45:27 -08:00
Sunny Goyal
cac373ce91 Separating TAPL functionality from AbstractLauncherUiTest into a separate base class
This will make it easier to get rid of AbstractLauncherUiTest by directly depending on the base class

Bug: 377772352
Test: Presubmit
Flag: EXEMPT test infra
Change-Id: I46ceb188ed4b64d4fb86236969ed0d3f23809000
2024-11-13 16:27:22 -08:00
Anushree Ganjam
ef2c5c0e49 Make ApiWrapper to be injected by dagger (12/n)
Bug: 361850561
Test: Manual
Flag: EXEMPT Dagger Integration
Change-Id: I53ec78999085b3e0ad6df69e177806e0cb1b52d1
2024-10-24 12:14:40 -07:00
Sunny Goyal
0b7f4cf1e2 Fixing deadlock in dagger singletons
Bug: 373557167
Flag: EXEMPT dagger
Test: atest DaggerSingletonDeadlockTest

Change-Id: I2304237bfd818c99b82bbfceea8a81ddb136b5a1
2024-10-21 18:09:37 +00:00
Jihoon Kang
a2dc65a2a1 Merge "Make java_sdk_library dependencies explicit" into main am: 10f0f9a93b am: 612b153591
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/3250185

Change-Id: I37d8a779985f820befa52be51df8101f53ed12bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30 20:41:29 +00:00
Jihoon Kang
612b153591 Merge "Make java_sdk_library dependencies explicit" into main am: 10f0f9a93b
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/3250185

Change-Id: Ic156ed0a774b6d6a40af20a1852846503e229b77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30 20:11:39 +00:00
Jihoon Kang
9f8e4b6b62 Make java_sdk_library dependencies explicit
modules should specify the submodule of java_sdk_library that the module
actually depends on

Test: CI
Bug: 358613520
Change-Id: If1b96a7ffa7ddde50c44817e0d96257ae2967a0e
2024-08-30 00:29:41 +00:00
Sihua Ma
a9e4324bd5 Rename test helper filegroup to robo
Test: N/A
Flag: EXEMPT filegroup rename
Change-Id: I8afeccc69fbca8e317c6b74a051d6b94239b8c52
2024-08-23 22:13:33 +00:00
Sihua Ma
58e8573085 Migrate model tests to multivalent
Also migrating some other tests that have been verified

Test: SysUI studio
Test: atest NexusLauncherRoboTests
Flag: TEST_ONLY
Change-Id: I072201b8e7b98945ca88657fe813fef4727f16e4
2024-08-20 07:28:35 +00:00
Jordan Silva
4afa195b5b Add Jetpack Compose for Launcher3 and Quickstep behind a build flag (2/3)
This CL adds a Soong build flag in Android.bp files to enable Compose code when building Launcher.
The flag is disabled by default, and it will be enabled once agreed with the System Health team. More details in go/launcher-enabling-compose-next-steps.

To turn this flag on, one simply has to `build-flag set RELEASE_ENABLE_COMPOSE_IN_LAUNCHER true` before compiling.

- When the flag is enabled, Launcher3 will use a ComposeFacade object that provides features implemented using Compose. This Facade also provides a function to check whether Compose is enabled or not.
- When the flag is disabled, Launcher3 will implement a ComposeFacade object that throws an exception if a feature using Compose is requested. Thus, it is important to always check isComposableAvailable function before requesting a Compose feature.

Bug: 346288480
Test: Builds
Flag: EXEMPT Build flag: RELEASE_ENABLE_COMPOSE_IN_LAUNCHER
Change-Id: I5f2703f74960aeb104d0386ed3ef49784ed85234
2024-08-06 18:47:22 +01:00
Kevin Liu
97cbdbcfd3 Add strict_mode: false
As strict mode is in place, the default strict_mode is now set to true. We are encourage teams to write tests in strict_mode to make tests Bivalent (able to run on device and devicelessly)
For more info on strict mode: go/roboStrictMode
Also fixed some missing deps.

Flag: NONE
Test: atest Launcher3RoboTests
Bug: 334089788
Change-Id: I4b4f2ef9a21926eef63fcada81355b928bbe2870
Merged-In: I4b4f2ef9a21926eef63fcada81355b928bbe2870
2024-06-19 15:53:35 +00:00
Sihua Ma
de5ef62967 Migrate GeneratedPreviewTest to multivalent
Test: atest NexusLauncherRoboTests
Test: SysUI studio
Fix: 325088369
Flag: TEST_ONLY
Change-Id: I2c88a357c8ac5fb0171a70e850be25e8fb11de33
2024-06-10 16:49:47 +00:00
Treehugger Robot
236bb12736 Merge "Move SettingsActivityTest to multivalent" into main 2024-05-30 04:26:56 +00:00
Kevin Liu
a39a4695af Merge "Add strict_mode: false" into main 2024-05-28 20:09:05 +00:00
Sihua Ma
350c29a5f6 Move SettingsActivityTest to multivalent
Test: atest NexusLauncherRoboTests
Test: SysUI studio
Flag: None Test migration
Bug: 297950111
Fix: 325089136

Change-Id: I85a2ed62453088941cb12fee9067acb076819dc5
2024-05-28 18:05:14 +00:00
Uwais Ashraf
784b4f28b0 Fix some compile errors occurring as a result of robo enablement
Fix: 297950111
Test: :NexusLauncher.Robo:testGoogleWithQuickstepDebugUnitTest
Test: atest NexusLauncherRoboTests
Flag: NA
Change-Id: Ic9b09fff630d274558d09b7031d12ec28f10fbc7
2024-05-21 18:56:52 +00:00
Uwais Ashraf
029de6d10a Fix mockito deviceless deps
Bug: 334825222
Test: TasksRepositoryTest
Flag: EXEMPT build files
Change-Id: Ia682e364d56b23a2b3c3a1ef6d83044d110e14d6
2024-05-21 11:59:05 +00:00
Kevin Liu
a75ea0b8cb Add strict_mode: false
As strict mode is in place, the default strict_mode is now set to true. We are encourage teams to write tests in strict_mode to make tests Bivalent (able to run on device and devicelessly)

Flag: NONE
Test: atest Launcher3RoboTests
Bug: 334089788
Change-Id: I4b4f2ef9a21926eef63fcada81355b928bbe2870
2024-05-08 01:44:46 +00:00
Sihua Ma
1593bb4af2 Move cell layout tests to deviceless tests
Excluding Tapl tests

Also adding Launcher3 test assets to Launcher3TestResources

Bug: 297950111
Flag: None
Test: atest Launcher3RoboTests
Test: atest NexusLauncherRoboTests
Test: SysUI studio
Change-Id: I101fc7229252016ec7e5015ed5f6a5b4dbba894d
2024-05-08 00:52:43 +00:00
Sunny Goyal
0f4bc92653 Creating a custom runner for multivalent tests with Launcher specific features
Bug: 338128923
Test: Verified by modifying a test
Flag: None
Change-Id: I1f04e28847ff9c0f7af3c0d952038ad24d03c17e
2024-05-06 12:10:21 -07:00
Uwais Ashraf
7a0150d02e Use script to auto-enable all tests that are currently working
Fix: 325088906
Test: presubmits passing, gradle robo run passing locally
Flag: NA
Change-Id: I481bfe9caeb8cc18b3e01ec8b7a58fb0eb36fdaa
2024-04-08 20:59:23 +00:00
Uwais Ashraf
6e9927e61f Add test and android lifecycle coroutine libs
Fix: 330128421
Bug: 330127493
Test: Presubmit build passes
Flag: NA
Change-Id: I87cf3b5faaee6bcdb99c5afbe1999a11d031d98e
2024-03-27 10:23:36 +00:00
Sunny Goyal
77954bae4e Cleaning up some build configurations
> Removing Launcher3Go-without-quickstep
> Removing src_ui_overrides to src_no_quickstep
> Removing unnecessary code swpa for GO builds

Bug: 330920490
Flag: None
Test: Presubmit, everything builds
Change-Id: I5746dbc7c5a37c1d99d78b55bf2a6adce1a711c9
2024-03-26 17:16:52 +00:00
Sihua Ma
444b8e6d0f Revert^2 "Include AndroidX test rules in Robolectric tests"
c041b5c625

Change-Id: I0b93613ff8544cbe2a0a108da53bc085a532b074
2024-03-21 21:50:20 +00:00
Priyanka Advani
c041b5c625 Revert "Include AndroidX test rules in Robolectric tests"
Revert submission 26605558-robolectric-enable-androidx-rules

Reason for revert: Droid-monitor created revert due to build breakages in b/330752689.

Reverted changes: /q/submissionid:26605558-robolectric-enable-androidx-rules

Change-Id: I7737d713be09faff78327df80232d084e836b500
2024-03-21 19:07:50 +00:00
Sihua Ma
f62002bb7d Merge "Include AndroidX test rules in Robolectric tests" into main 2024-03-21 17:06:45 +00:00
Sunny Goyal
5ca50490a3 Making some classess accessible in multivalent tests
Bug: 297950111
Flag: None
Test: Presubmit
Change-Id: I2e4b18fc279cb96b3f68d64f95703c11bb885b2a
2024-03-20 13:30:40 -07:00
Sihua Ma
6da8d07f83 Include AndroidX test rules in Robolectric tests
Test: atest Launcher3RoboTests
Bug: 297950111
Flag: N/A
Change-Id: I6f3c9ddeac9cb676644b3a236a00575c4faaa921
2024-03-19 20:26:40 +00:00
Kevin Lim
a14145aad4 [Deviceless] Create launcher-multivalent-src for referring from
NexusLauncherRoboTests

Bug: b/297950111
Bug: b/322393087
Flag: NA
Test: atest Launcher3RoboTests
Test: atest NexusLauncherRoboTests
Change-Id: I8ac58862d53f8574a6678502fcf9488f812eaa1f
2024-03-19 20:11:37 +00:00
Uwais Ashraf
f7c9e2c112 Adjust mockito dependencies to make them work for Robolectric
Fix: 327257788
Flag: NA
Test: Presubmit passing
Change-Id: I1eee4fe0f79b2d22fc6bc080c8cc88c19086c7d5
2024-03-11 12:08:02 +00: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
Willie Koomson
fda1b4b0d0 Merge "Use generated RemoteViews preview for widget picker if available" into main 2024-02-13 21:18:45 +00:00
Willie Koomson
fedc18e9a8 Use generated RemoteViews preview for widget picker if available
WidgetCell will use the generated RemoteViews preview to display
previews in the widget picker. It will fallback to current preview
methods if not available.

Introduces WidgetManagerHelper.loadGeneratedPreviews as a utility
function. WidgetManagerHelper is passed into the constructor of
WidgetItem to avoid calling
context.getSystemService(AppWidgetManager.class) for each widget.

Bug: 308041327
Test: atest Launcher3Tests:GeneratedPreviewTest
Flag: ACONFIG com.android.launcher3.enable_generated_previews DEVELOPMENT
Change-Id: I37429057cda83a5321884ace2537038e050b9a58
2024-02-13 18:49:44 +00:00
Sebastian Franco
2d8be10856 Adding unit test to makeSpaceForHotseatMigration
Flag: NA
Bug: 318417510
Test: atest HotseatReorderUnitTest
Change-Id: If4fe388d00138b2d43693df0cf79abb16f354291
2024-02-01 17:08:52 +00:00
Colin Cross
f156b6bc7c Set use_resource_processor: false
These modules fail to compile when use_resource_processor is enabled
by default, disable them explicitly for now.

Bug: 319712088
Test: m javac-check
Flag: NA
Change-Id: I0f7ee108aab802ee1882f8017ea4b47346e38683
2024-01-24 15:52:06 -08:00
Uwais Ashraf
77b97c0729 Replace existing Robolectric test task with functioning one.
This CL does the following:
- Creates a dir for multivalentTests
- Creates symlinks for the dir to keep Android Studio happy
- Moves many files to the multivalentTests dir
- Adjusts gradle and soong build files to use the new dir as part of
their source sets.

Test: ./gradlew :NexusLauncher:testGoogleWithQuickstepDebugUnitTest
Test: atest Launcher3RoboTests
Fix: 316553886
Bug: 316553889
Flag: NA
Change-Id: Iae28fd0c0191b3ecf9bd2950800875950cca2622
2024-01-19 21:39:23 +00:00
Uwais Ashraf
861f2fdc81 Create Launcher3RoboTests and enable Robolectric on small set of tests
Test: atest Launcher3RoboTests
Bug: 316551909
Flag: NA
Change-Id: Ib1bbaf49e3e608f8c67005c129e090711df1e99c
2023-12-21 15:06:12 +00:00
Uwais Ashraf
e0a4feb664 Rename Tapl tests that do not match *Test.(kt|java) for easier groups
Test: presubmits passing
Bug: 316551909
Flag: NA
Change-Id: Ib2070d7610927777376acf0ddefcbc90e582e6f6
2023-12-19 11:54:10 +00:00
Sebastian Franco
d30100eaa9 Move classes inside of CellLayoutBoard to their own file
Previous step for adding unit testing for MultipageCellLayout.

Flag: LEGACY FOLDABLE_SINGLE_PAGE DISABLED
Bug: 270395274
Test: ReorderAlgorithmUnitTest
Change-Id: Ia5ca0b10481d7a21883594434b3406fb3a5ccf0b
2023-11-20 17:58:24 -06:00
Uwais Ashraf
aa7fa886d6 Add margins to top and bottom when grid only overview enabled
Fix: 299100244
Test: OverviewImageTest and dump tests
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Change-Id: I22ebced5bf1e27974036d6e2ef72d2b8d63df824
2023-10-24 16:15:39 +00:00
Jordan Silva
4d95f79db5 Merge "Create a new test suite for screenshot tests" into main 2023-10-23 22:46:11 +00:00