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

Commit daeda6e7 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Make InputMethodManagerService#MSG_INITIALIZE_IME private"

parents 3fa78913 2070234c
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package com.android.server.inputmethod;

import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;

import static com.android.server.inputmethod.InputMethodManagerService.MSG_INITIALIZE_IME;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.PendingIntent;
@@ -311,11 +309,8 @@ final class InputMethodBindingController {
                    if (DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken);
                    final InputMethodInfo info = mMethodMap.get(mSelectedMethodId);
                    mSupportsStylusHw = info.supportsStylusHandwriting();
                    // Dispatch display id for InputMethodService to update context display.
                    mService.executeOrSendMessage(mCurMethod,
                            mService.mCaller.obtainMessageIOOO(MSG_INITIALIZE_IME,
                                    info.getConfigChanges(), mCurMethod, mCurToken,
                                    mSupportsStylusHw));
                    mService.executeOrSendInitializeIme(mCurMethod, mCurToken,
                            info.getConfigChanges(), mSupportsStylusHw);
                    mService.scheduleNotifyImeUidToAudioService(mCurMethodUid);
                    mService.reRequestCurrentClientSessionLocked();
                }
+10 −6
Original line number Diff line number Diff line
@@ -228,10 +228,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    private static final int MSG_SHOW_SOFT_INPUT = 1020;
    private static final int MSG_HIDE_SOFT_INPUT = 1030;
    private static final int MSG_HIDE_CURRENT_INPUT_METHOD = 1035;
    /**
     * package-private because this is also used by {@link InputMethodBindingController}.
     */
    static final int MSG_INITIALIZE_IME = 1040;
    private static final int MSG_INITIALIZE_IME = 1040;
    private static final int MSG_CREATE_SESSION = 1050;
    private static final int MSG_REMOVE_IME_SURFACE = 1060;
    private static final int MSG_REMOVE_IME_SURFACE_FROM_WINDOW = 1061;
@@ -288,7 +285,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    final WindowManagerInternal mWindowManagerInternal;
    final PackageManagerInternal mPackageManagerInternal;
    final InputManagerInternal mInputManagerInternal;
    final HandlerCaller mCaller;
    private final HandlerCaller mCaller;
    final boolean mHasFeature;
    private final ArrayMap<String, List<InputMethodSubtype>> mAdditionalSubtypeMap =
            new ArrayMap<>();
@@ -2244,7 +2241,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        }
    }

    void executeOrSendMessage(IInterface target, Message msg) {
    private void executeOrSendMessage(IInterface target, Message msg) {
         if (target.asBinder() instanceof Binder) {
             mCaller.sendMessage(msg);
         } else {
@@ -2529,6 +2526,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        }
    }

    @AnyThread
    void executeOrSendInitializeIme(@NonNull IInputMethod inputMethod, @NonNull IBinder token,
            @android.content.pm.ActivityInfo.Config int configChanges, boolean supportStylusHw) {
        executeOrSendMessage(inputMethod, mCaller.obtainMessageIOOO(MSG_INITIALIZE_IME,
                configChanges, inputMethod, token, supportStylusHw));
    }

    @AnyThread
    void scheduleNotifyImeUidToAudioService(int uid) {
        mCaller.removeMessages(MSG_NOTIFY_IME_UID_TO_AUDIO_SERVICE);