Merge "Wait for package_added broadcasts to be handled." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a9690cc87a
@@ -29,6 +29,7 @@ android_test {
|
|||||||
static_libs: [
|
static_libs: [
|
||||||
"androidx.test.rules",
|
"androidx.test.rules",
|
||||||
"testng",
|
"testng",
|
||||||
|
"compatibility-device-util-axt",
|
||||||
],
|
],
|
||||||
test_suites: ["device-tests"],
|
test_suites: ["device-tests"],
|
||||||
data: [
|
data: [
|
||||||
|
|||||||
@@ -37,10 +37,12 @@ import android.view.View;
|
|||||||
|
|
||||||
import androidx.test.InstrumentationRegistry;
|
import androidx.test.InstrumentationRegistry;
|
||||||
|
|
||||||
|
import com.android.compatibility.common.util.AmUtils;
|
||||||
import com.android.internal.util.ArrayUtils;
|
import com.android.internal.util.ArrayUtils;
|
||||||
import com.android.overlaytest.view.TestTextView;
|
import com.android.overlaytest.view.TestTextView;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@@ -70,6 +72,13 @@ public abstract class OverlayBaseTest {
|
|||||||
mMode = mode;
|
mMode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void setUpClass() {
|
||||||
|
// Wait for package_added broadcasts to be handled so that OverlayManagerService
|
||||||
|
// can update it's internal state with the new packages.
|
||||||
|
AmUtils.waitForBroadcastBarrier();
|
||||||
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
mContext = InstrumentationRegistry.getContext();
|
mContext = InstrumentationRegistry.getContext();
|
||||||
|
|||||||
Reference in New Issue
Block a user