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

Commit d6ef62f5 authored by Wilson Wu's avatar Wilson Wu
Browse files

Add maxTargetSdk restriction to IMM fields

CL[1] and CL[2] refined mCurId and mCurMethod into the
BindState, annotated them with deprecated.

This is a follow up change to add maxTargetSdk for these
UnsupportedAppUsage fields to be restricted android U.

[1]: I010bc0ad196492bfac244b756dcfd986b9075698
[2]: Ie29597118ab7f37d3f1ac2a5368b28f0462e7a0a

Bug: 236937383
Test: presubmit
Change-Id: I77859113768cb8545924e9e29473a20aa2f624c6
parent 5897b777
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -550,7 +550,10 @@ public final class InputMethodManager {
     */
    @Deprecated
    @GuardedBy("mH")
    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 236937383,
            maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
            publicAlternatives = "Apps should not change behavior based on the currently connected"
                    + " IME. If absolutely needed, use {@link InputMethodInfo#getId()} instead.")
    String mCurId;

    /**
@@ -561,7 +564,9 @@ public final class InputMethodManager {
    @Deprecated
    @GuardedBy("mH")
    @Nullable
    @UnsupportedAppUsage
    @UnsupportedAppUsage(trackingBug = 236937383,
            maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
            publicAlternatives = "Use methods on {@link InputMethodManager} instead.")
    IInputMethodSession mCurMethod;

    /**