From 5acd2214573539985fcbae367ee21391b33a3b60 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Thu, 27 Jan 2022 03:08:24 -0800 Subject: [PATCH] Add @UserIdInt for InputMethodManagerInternal impls This CL adds missing @UserIdInt annotations to InputMethodManagerInternal implementation classes. @UserIdInt is source-level annotation. There should be no impact on change in build artifacts. Bug: 192412909 Test: presubmit Change-Id: I18067fd51eff6e9dece08b17f9ea1cf6ecedda68 --- .../inputmethod/InputMethodManagerInternal.java | 12 +++++++----- .../inputmethod/InputMethodManagerService.java | 10 +++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java index 9a53d837f25b1..80c83e97256e7 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java @@ -162,28 +162,30 @@ public abstract class InputMethodManagerInternal { } @Override - public List getInputMethodListAsUser(int userId) { + public List getInputMethodListAsUser(@UserIdInt int userId) { return Collections.emptyList(); } @Override - public List getEnabledInputMethodListAsUser(int userId) { + public List getEnabledInputMethodListAsUser( + @UserIdInt int userId) { return Collections.emptyList(); } @Override - public void onCreateInlineSuggestionsRequest(int userId, + public void onCreateInlineSuggestionsRequest(@UserIdInt int userId, InlineSuggestionsRequestInfo requestInfo, IInlineSuggestionsRequestCallback cb) { } @Override - public boolean switchToInputMethod(String imeId, int userId) { + public boolean switchToInputMethod(String imeId, @UserIdInt int userId) { return false; } @Override - public boolean setInputMethodEnabled(String imeId, boolean enabled, int userId) { + public boolean setInputMethodEnabled(String imeId, boolean enabled, + @UserIdInt int userId) { return false; } diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index c6a206bfff52a..936b1a20e3269 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -4977,28 +4977,28 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub } @Override - public List getInputMethodListAsUser(int userId) { + public List getInputMethodListAsUser(@UserIdInt int userId) { return mService.getInputMethodListAsUser(userId); } @Override - public List getEnabledInputMethodListAsUser(int userId) { + public List getEnabledInputMethodListAsUser(@UserIdInt int userId) { return mService.getEnabledInputMethodListAsUser(userId); } @Override - public void onCreateInlineSuggestionsRequest(int userId, + public void onCreateInlineSuggestionsRequest(@UserIdInt int userId, InlineSuggestionsRequestInfo requestInfo, IInlineSuggestionsRequestCallback cb) { mService.onCreateInlineSuggestionsRequest(userId, requestInfo, cb); } @Override - public boolean switchToInputMethod(String imeId, int userId) { + public boolean switchToInputMethod(String imeId, @UserIdInt int userId) { return mService.switchToInputMethod(imeId, userId); } @Override - public boolean setInputMethodEnabled(String imeId, boolean enabled, int userId) { + public boolean setInputMethodEnabled(String imeId, boolean enabled, @UserIdInt int userId) { return mService.setInputMethodEnabled(imeId, enabled, userId); }