Loading core/java/android/inputmethodservice/InputMethodService.java +0 −4 Original line number Diff line number Diff line Loading @@ -590,10 +590,6 @@ public class InputMethodService extends AbstractInputMethodService { @Override public final void initializeInternal(@NonNull IBinder token, IInputMethodPrivilegedOperations privilegedOperations, int configChanges) { if (InputMethodPrivilegedOperationsRegistry.isRegistered(token)) { Log.w(TAG, "The token has already registered, ignore this initialization."); return; } Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMS.initializeInternal"); mConfigTracker.onInitialize(configChanges); mPrivOps.set(privilegedOperations); Loading core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperationsRegistry.java +1 −23 Original line number Diff line number Diff line Loading @@ -74,12 +74,7 @@ public final class InputMethodPrivilegedOperationsRegistry { if (sRegistry == null) { sRegistry = new WeakHashMap<>(); } final WeakReference<InputMethodPrivilegedOperations> previousOps = sRegistry.put(token, new WeakReference<>(ops)); if (previousOps != null) { throw new IllegalStateException(previousOps.get() + " is already registered for " + " this token=" + token + " newOps=" + ops); } } } Loading Loading @@ -132,21 +127,4 @@ public final class InputMethodPrivilegedOperationsRegistry { } } } /** * Check the given IME token registration status. * * @param token IME token * @return {@code true} when the IME token has already registered * {@link InputMethodPrivilegedOperations}, {@code false} otherwise. */ @AnyThread public static boolean isRegistered(IBinder token) { synchronized (sLock) { if (sRegistry == null) { return false; } return sRegistry.containsKey(token); } } } Loading
core/java/android/inputmethodservice/InputMethodService.java +0 −4 Original line number Diff line number Diff line Loading @@ -590,10 +590,6 @@ public class InputMethodService extends AbstractInputMethodService { @Override public final void initializeInternal(@NonNull IBinder token, IInputMethodPrivilegedOperations privilegedOperations, int configChanges) { if (InputMethodPrivilegedOperationsRegistry.isRegistered(token)) { Log.w(TAG, "The token has already registered, ignore this initialization."); return; } Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMS.initializeInternal"); mConfigTracker.onInitialize(configChanges); mPrivOps.set(privilegedOperations); Loading
core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperationsRegistry.java +1 −23 Original line number Diff line number Diff line Loading @@ -74,12 +74,7 @@ public final class InputMethodPrivilegedOperationsRegistry { if (sRegistry == null) { sRegistry = new WeakHashMap<>(); } final WeakReference<InputMethodPrivilegedOperations> previousOps = sRegistry.put(token, new WeakReference<>(ops)); if (previousOps != null) { throw new IllegalStateException(previousOps.get() + " is already registered for " + " this token=" + token + " newOps=" + ops); } } } Loading Loading @@ -132,21 +127,4 @@ public final class InputMethodPrivilegedOperationsRegistry { } } } /** * Check the given IME token registration status. * * @param token IME token * @return {@code true} when the IME token has already registered * {@link InputMethodPrivilegedOperations}, {@code false} otherwise. */ @AnyThread public static boolean isRegistered(IBinder token) { synchronized (sLock) { if (sRegistry == null) { return false; } return sRegistry.containsKey(token); } } }