Loading services/core/java/com/android/server/inputmethod/AutofillSuggestionsController.java +26 −19 Original line number Diff line number Diff line Loading @@ -102,11 +102,21 @@ final class AutofillSuggestionsController { boolean touchExplorationEnabled) { clearPendingInlineSuggestionsRequest(); mInlineSuggestionsRequestCallback = callback; final InputMethodInfo imi = mService.queryInputMethodForCurrentUserLocked( mService.getSelectedMethodIdLocked()); if (userId == mService.getCurrentImeUserIdLocked() && imi != null && isInlineSuggestionsEnabled(imi, touchExplorationEnabled)) { if (userId != mService.getCurrentImeUserIdLocked()) { callback.onInlineSuggestionsUnsupported(); return; } // Note that current user ID is guaranteed to be userId. final var imeId = mService.getSelectedMethodIdLocked(); final InputMethodInfo imi = InputMethodSettingsRepository.get(userId).getMethodMap() .get(imeId); if (imi == null || !isInlineSuggestionsEnabled(imi, touchExplorationEnabled)) { callback.onInlineSuggestionsUnsupported(); return; } mPendingInlineSuggestionsRequest = new CreateInlineSuggestionsRequest( requestInfo, callback, imi.getPackageName()); if (mService.getCurMethodLocked() != null) { Loading @@ -120,9 +130,6 @@ final class AutofillSuggestionsController { Slog.d(TAG, "IME not connected. Delaying inline suggestions request."); } } } else { callback.onInlineSuggestionsUnsupported(); } } @GuardedBy("ImfLock.class") Loading Loading
services/core/java/com/android/server/inputmethod/AutofillSuggestionsController.java +26 −19 Original line number Diff line number Diff line Loading @@ -102,11 +102,21 @@ final class AutofillSuggestionsController { boolean touchExplorationEnabled) { clearPendingInlineSuggestionsRequest(); mInlineSuggestionsRequestCallback = callback; final InputMethodInfo imi = mService.queryInputMethodForCurrentUserLocked( mService.getSelectedMethodIdLocked()); if (userId == mService.getCurrentImeUserIdLocked() && imi != null && isInlineSuggestionsEnabled(imi, touchExplorationEnabled)) { if (userId != mService.getCurrentImeUserIdLocked()) { callback.onInlineSuggestionsUnsupported(); return; } // Note that current user ID is guaranteed to be userId. final var imeId = mService.getSelectedMethodIdLocked(); final InputMethodInfo imi = InputMethodSettingsRepository.get(userId).getMethodMap() .get(imeId); if (imi == null || !isInlineSuggestionsEnabled(imi, touchExplorationEnabled)) { callback.onInlineSuggestionsUnsupported(); return; } mPendingInlineSuggestionsRequest = new CreateInlineSuggestionsRequest( requestInfo, callback, imi.getPackageName()); if (mService.getCurMethodLocked() != null) { Loading @@ -120,9 +130,6 @@ final class AutofillSuggestionsController { Slog.d(TAG, "IME not connected. Delaying inline suggestions request."); } } } else { callback.onInlineSuggestionsUnsupported(); } } @GuardedBy("ImfLock.class") Loading