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

Commit ffc5cbc8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Attempt to reduce race of WmTests" into main

parents 7b845ba1 c5482b12
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@
        <activity android:name="com.android.server.wm.TaskStackChangedListenerTest$ActivityInVirtualDisplay"
                  android:resizeableActivity="true" />
        <activity android:name="com.android.server.wm.TaskStackChangedListenerTest$LandscapeActivity"
                  android:configChanges="screenLayout|screenSize|smallestScreenSize|orientation"
                  android:screenOrientation="sensorLandscape"
                  android:showWhenLocked="true"
                  android:turnScreenOn="true" />
+6 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@ import android.os.StrictMode;
import android.os.strictmode.InstanceCountViolation;
import android.util.Log;

import com.android.server.wm.utils.CommonUtils;

import org.junit.After;
import org.junit.Test;

@@ -63,6 +65,10 @@ public class ActivityLeakTests {
                activity.finish();
            }
        }
        if (!mStartedActivityList.isEmpty()) {
            CommonUtils.waitUntilActivityRemoved(
                    mStartedActivityList.get(mStartedActivityList.size() - 1));
        }
        mStartedActivityList.clear();
    }

+3 −0
Original line number Diff line number Diff line
@@ -54,6 +54,8 @@ import android.window.TaskOrganizer;

import androidx.test.filters.MediumTest;

import com.android.server.wm.utils.CommonUtils;

import org.junit.Test;
import org.mockito.ArgumentCaptor;

@@ -172,6 +174,7 @@ public class ActivityOptionsTest {
            instrumentation.removeMonitor(monitor);
            if (mainActivity != null) {
                mainActivity.finish();
                CommonUtils.waitUntilActivityRemoved(mainActivity);
            }
        }
    }
+8 −0
Original line number Diff line number Diff line
@@ -56,6 +56,9 @@ import androidx.annotation.Nullable;
import androidx.test.filters.SmallTest;
import androidx.test.rule.ActivityTestRule;

import com.android.server.wm.utils.CommonUtils;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -90,6 +93,11 @@ public class ScreenshotTests {
        mInstrumentation.waitForIdleSync();
    }

    @After
    public void tearDown() {
        CommonUtils.waitUntilActivityRemoved(mActivity);
    }

    @Test
    public void testScreenshotSecureLayers() throws InterruptedException {
        SurfaceControl secureSC = new SurfaceControl.Builder()
+3 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.rule.ActivityTestRule;

import com.android.server.wm.utils.CommonUtils;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -87,6 +89,7 @@ public class SurfaceControlViewHostTests {
    @After
    public void tearDown() {
        mInstrumentation.getUiAutomation().dropShellPermissionIdentity();
        CommonUtils.waitUntilActivityRemoved(mActivity);
    }

    @Test
Loading