Consolidate WorkProfileTest "@After" methods am: e6d86e20aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22330314 Change-Id: Ifaf79cfc0f1ff5db81bfa6a8116c65de90377552 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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.WorkPausedCard;
|
||||||
import com.android.launcher3.allapps.WorkProfileManager;
|
import com.android.launcher3.allapps.WorkProfileManager;
|
||||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||||
|
import com.android.launcher3.testing.shared.TestProtocol;
|
||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@@ -90,17 +91,14 @@ public class WorkProfileTest extends AbstractLauncherUiTest {
|
|||||||
|
|
||||||
@After
|
@After
|
||||||
public void removeWorkProfile() throws Exception {
|
public void removeWorkProfile() throws Exception {
|
||||||
mDevice.executeShellCommand("pm remove-user " + mProfileUserId);
|
Log.d(TestProtocol.WORK_TAB_MISSING, "WorkProfileTest teardown");
|
||||||
}
|
|
||||||
|
|
||||||
@After
|
|
||||||
public void resumeAppStoreUpdate() {
|
|
||||||
executeOnLauncher(launcher -> {
|
executeOnLauncher(launcher -> {
|
||||||
if (launcher == null || launcher.getAppsView() == null) {
|
if (launcher == null || launcher.getAppsView() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
launcher.getAppsView().getAppsStore().disableDeferUpdates(DEFER_UPDATES_TEST);
|
launcher.getAppsView().getAppsStore().disableDeferUpdates(DEFER_UPDATES_TEST);
|
||||||
});
|
});
|
||||||
|
mDevice.executeShellCommand("pm remove-user " + mProfileUserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void waitForWorkTabSetup() {
|
private void waitForWorkTabSetup() {
|
||||||
|
|||||||
Reference in New Issue
Block a user