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

Commit 2402943a authored by Casey Burkhardt's avatar Casey Burkhardt
Browse files

Fix accessibility button CTS test

Ensure accessibility button callbacks are registered with a
Handler that has a valid Looper.

Bug: 37789861
Test: Passing CTS
Change-Id: Idf91547940fe7754bbabe55a729193c4100b8532
parent 8f4ac4ac
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.accessibilityservice;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
import android.util.ArrayMap;
import android.util.Slog;
@@ -91,7 +92,7 @@ public final class AccessibilityButtonController {
     * @param callback the callback to add, must be non-null
     */
    public void registerAccessibilityButtonCallback(@NonNull AccessibilityButtonCallback callback) {
        registerAccessibilityButtonCallback(callback, new Handler());
        registerAccessibilityButtonCallback(callback, new Handler(Looper.getMainLooper()));
    }

    /**