mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Consolidate WorkProfileTest "@After" methods
* There were two separate methods, which can run in any order. Consolidate to reduce variability Bug: 243688989 Change-Id: Ic924aa8a5d75505aecf6c830c63a85a0d2028d83
This commit is contained in:
@@ -36,6 +36,7 @@ import com.android.launcher3.allapps.WorkEduCard;
|
||||
import com.android.launcher3.allapps.WorkPausedCard;
|
||||
import com.android.launcher3.allapps.WorkProfileManager;
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
import com.android.launcher3.testing.shared.TestProtocol;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -90,17 +91,14 @@ public class WorkProfileTest extends AbstractLauncherUiTest {
|
||||
|
||||
@After
|
||||
public void removeWorkProfile() throws Exception {
|
||||
mDevice.executeShellCommand("pm remove-user " + mProfileUserId);
|
||||
}
|
||||
|
||||
@After
|
||||
public void resumeAppStoreUpdate() {
|
||||
Log.d(TestProtocol.WORK_TAB_MISSING, "WorkProfileTest teardown");
|
||||
executeOnLauncher(launcher -> {
|
||||
if (launcher == null || launcher.getAppsView() == null) {
|
||||
return;
|
||||
}
|
||||
launcher.getAppsView().getAppsStore().disableDeferUpdates(DEFER_UPDATES_TEST);
|
||||
});
|
||||
mDevice.executeShellCommand("pm remove-user " + mProfileUserId);
|
||||
}
|
||||
|
||||
private void waitForWorkTabSetup() {
|
||||
|
||||
Reference in New Issue
Block a user