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

Commit 2f539d91 authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Call ClipboardOverlayController#hideImmediate on main thread

Only an issue for the test tearDown methods.

Bug: 410575606
Fix: 410575606
Flag: EXEMPT test-only change
Test: atest ClipboardOverlayControllerTest; verify that dispose methods
are called on the main thread

Change-Id: I0d06da0e1b514e8c13bc65a67ec3f9c3efa15192
parent 8abd55d5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@ import android.content.Intent;
import android.graphics.Insets;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.PersistableBundle;
import android.platform.test.annotations.DisableFlags;
import android.platform.test.annotations.EnableFlags;
@@ -120,6 +122,7 @@ public class ClipboardOverlayControllerTest extends SysuiTestCase {
    private ArgumentCaptor<AnimatorListenerAdapter> mAnimatorArgumentCaptor;

    private FakeExecutor mExecutor = new FakeExecutor(new FakeSystemClock());
    private Handler mMainHandler = new Handler(Looper.getMainLooper());

    private class FakeClipboardIndicationProvider implements ClipboardIndicationProvider {
        private ClipboardIndicationCallback mIndicationCallback;
@@ -205,7 +208,8 @@ public class ClipboardOverlayControllerTest extends SysuiTestCase {

    @After
    public void tearDown() {
        mOverlayController.hideImmediate();
        // call the InputReceiver dispose method on the main thread
        mMainHandler.post(() -> mOverlayController.hideImmediate());
    }

    @Test