Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 020688bb authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Wait for package_added broadcasts to be handled.

Bug: 257393315
Test: atest OverlayDeviceTests
Change-Id: I00d030a2ea9b6fc597cc73e2a92289826031b575
parent a6b032d1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ android_test {
    static_libs: [
        "androidx.test.rules",
        "testng",
        "compatibility-device-util-axt",
    ],
    test_suites: ["device-tests"],
    data: [
+9 −0
Original line number Diff line number Diff line
@@ -37,10 +37,12 @@ import android.view.View;

import androidx.test.InstrumentationRegistry;

import com.android.compatibility.common.util.AmUtils;
import com.android.internal.util.ArrayUtils;
import com.android.overlaytest.view.TestTextView;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

@@ -70,6 +72,13 @@ public abstract class OverlayBaseTest {
        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
    public void setUp() {
        mContext = InstrumentationRegistry.getContext();