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

Commit 81f36611 authored by yingleiw's avatar yingleiw Committed by Yinglei Wang
Browse files

Allow app usage of AccessibilityInteractionClient#getInstance and clearCache before T

These are needed to have a workaround fix for a11y cache filled with
stale data before android T.

NoNonSdkCheck: set maxTargetSdk to S in UnsupportedAppUsage is not allowed yet.

Bug: b/192110374

Test: it builds fine.
Change-Id: Iaa0f68b2b8e4702f6b638cb3060714a22850af7e
parent 8fba2059
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ public final class AccessibilityInteractionClient
    /**
     * @return The client for the current thread.
     */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @UnsupportedAppUsage()
    public static AccessibilityInteractionClient getInstance() {
        final long threadId = Thread.currentThread().getId();
        return getInstanceForThread(threadId);
@@ -837,7 +837,10 @@ public final class AccessibilityInteractionClient
        return false;
    }

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    /**
     * Clears the accessibility cache.
     */
    @UnsupportedAppUsage()
    public void clearCache() {
        sAccessibilityCache.clear();
    }