Remove the test aconfig lib.

zhidou@ from ACE team is working on AConfigFakelib which will be useful
to set fake flag values in both unit tests and UI automator tests.
Meanwhile, we will mock the flag values for unit tests and UI automator
tests will have all flags values defaulted to false.

testAConfigLib with "test:true" doesn't generate fake flags values and
forces us to set the flag values using "SetFlagsRule". "SetFlagsRule"
doesn't work with Out Of Proc tests and hence doesn't serve the purpose
for us. AConfigFakelib and FakeFlagTargetPreparer should use for Out Of
Proc tests.

testAConfigLib with "test:true" is suitable for java host tests where
there is no device involved. Launcher tests are instrumentation tests and tests run on actual
devices. So we can use the production version of the AConfig lib and device
config flag values will be fetched for UI Automator tests.

Also migrating "enable_twoline_allapps" to trunk stable. Unit tests is
using mockito to mock the flag value as false. The owner of
"enable_twoline_allapps" can mock the value to true in unit tests as
next step.

Bug: 294913042
Test: Local studio build and soong build
Flag: enable_twoline_allapps

Change-Id: Iea42bf18197832a9ecbddc1c3aaa8c9e36169131
This commit is contained in:
Anushree Ganjam committed 2023-08-30 15:20:51 -07:00
1 parent 861733f756
commit 2a14b978c6
9 files changed
+32 -44

No files matched your search

@@ -15,7 +15,6 @@
*/
package com.android.launcher3.ui;
import static com.android.launcher3.Flags.FLAG_ENABLE_EXPANDING_PAUSE_WORK_BUTTON;
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST;
@@ -27,7 +26,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
import android.platform.test.flag.junit.SetFlagsRule;
import android.util.Log;
import android.view.View;
@@ -46,7 +44,6 @@ import com.android.launcher3.util.rule.TestStabilityRule.Stability;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import java.util.Objects;
@@ -55,7 +52,6 @@ import java.util.function.Predicate;
public class WorkProfileTest extends AbstractLauncherUiTest {
private static final int WORK_PAGE = ActivityAllAppsContainerView.AdapterHolder.WORK;
@Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
private int mProfileUserId;
private boolean mWorkProfileSetupSuccessful;
@@ -64,7 +60,6 @@ public class WorkProfileTest extends AbstractLauncherUiTest {
@Before
@Override
public void setUp() throws Exception {
mSetFlagsRule.disableFlags(FLAG_ENABLE_EXPANDING_PAUSE_WORK_BUTTON);
super.setUp();
String output =
mDevice.executeShellCommand(