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

Commit b4be1893 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix flakiness of testTransferLaunchCookie" into sc-v2-dev am: 11f14b1e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15849146

Change-Id: I81ad1b45bfda33868d1d12c3bd4ec779ac22d261
parents d39232ed 11f14b1e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -110,18 +110,20 @@ public class ActivityOptionsTest {
            @Override
            public void onTaskAppeared(RunningTaskInfo taskInfo, SurfaceControl leash) {
                try (SurfaceControl.Transaction t = new SurfaceControl.Transaction()) {
                    t.setVisibility(leash, true /* visible */).apply();
                    t.show(leash).apply();
                }
                int cookieIndex = -1;
                if (trampoline.equals(taskInfo.baseActivity)) {
                    cookieIndex = 0;
                } else if (main.equals(taskInfo.baseActivity)) {
                    cookieIndex = 1;
                    mainLatch.countDown();
                }
                if (cookieIndex >= 0) {
                    appearedCookies[cookieIndex] = taskInfo.launchCookies.isEmpty()
                            ? null : taskInfo.launchCookies.get(0);
                    if (cookieIndex == 1) {
                        mainLatch.countDown();
                    }
                }
            }
        };