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

Commit e4622842 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove incorrectly specified @UserIdInt

This is a follow up CL to my previous CL [1], which introduced
TextServicesManagerServicve.SessionRequest for internal state
management.

It turns out that SessionRequest#mUserId was incorrectly marked with
@UserIdInt, even though it actually stores uid, not user ID int.

This CL addresses the confusion by removing @UserIdInt as well as
renaming it to SessionRequest#mUid.

There should be no behavior change actually.

 [1]: I92e7aa40dc9ea14f67d355f0bfa15325b775d27b

Bug: 7254002
Test: compile
Change-Id: I94f19d028be3b24fe0f3d848236ea9ca68e537b4
parent f465c353
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
                    pw.println("        " + "mTsListener=" + req.mTsListener);
                    pw.println("        " + "mScListener=" + req.mScListener);
                    pw.println(
                            "        " + "mScLocale=" + req.mLocale + " mUid=" + req.mUserId);
                            "        " + "mScLocale=" + req.mLocale + " mUid=" + req.mUid);
                }
                final int numOnGoingSessionRequests = grp.mOnGoingSessionRequests.size();
                for (int j = 0; j < numOnGoingSessionRequests; j++) {
@@ -246,7 +246,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
                    pw.println("        " + "mTsListener=" + req.mTsListener);
                    pw.println("        " + "mScListener=" + req.mScListener);
                    pw.println(
                            "        " + "mScLocale=" + req.mLocale + " mUid=" + req.mUserId);
                            "        " + "mScLocale=" + req.mLocale + " mUid=" + req.mUid);
                }
                final int N = grp.mListeners.getRegisteredCallbackCount();
                for (int j = 0; j < N; j++) {
@@ -738,8 +738,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
    }

    private static final class SessionRequest {
        @UserIdInt
        public final int mUserId;
        public final int mUid;
        @Nullable
        public final String mLocale;
        @NonNull
@@ -749,10 +748,10 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
        @Nullable
        public final Bundle mBundle;

        SessionRequest(@UserIdInt final int userId, @Nullable String locale,
        SessionRequest(int uid, @Nullable String locale,
                @NonNull ITextServicesSessionListener tsListener,
                @NonNull ISpellCheckerSessionListener scListener, @Nullable Bundle bundle) {
            mUserId = userId;
            mUid = uid;
            mLocale = locale;
            mTsListener = tsListener;
            mScListener = scListener;