Loading core/java/android/inputmethodservice/InputMethodService.java +16 −5 Original line number Diff line number Diff line Loading @@ -517,7 +517,9 @@ public class InputMethodService extends AbstractInputMethodService { @Override public void onCreateInlineSuggestionsRequest(ComponentName componentName, AutofillId autofillId, IInlineSuggestionsRequestCallback cb) { if (DEBUG) { Log.d(TAG, "InputMethodService received onCreateInlineSuggestionsRequest()"); } handleOnCreateInlineSuggestionsRequest(componentName, autofillId, cb); } Loading Loading @@ -755,7 +757,12 @@ public class InputMethodService extends AbstractInputMethodService { private void handleOnCreateInlineSuggestionsRequest(@NonNull ComponentName componentName, @NonNull AutofillId autofillId, @NonNull IInlineSuggestionsRequestCallback callback) { if (!mInputStarted) { try { Log.w(TAG, "onStartInput() not called yet"); callback.onInlineSuggestionsUnsupported(); } catch (RemoteException e) { Log.w(TAG, "Failed to call onInlineSuggestionsUnsupported.", e); } return; } Loading @@ -768,8 +775,12 @@ public class InputMethodService extends AbstractInputMethodService { private void handleOnInlineSuggestionsResponse(@NonNull ComponentName componentName, @NonNull AutofillId autofillId, @NonNull InlineSuggestionsResponse response) { if (!mInlineSuggestionsRequestInfo.validate(componentName)) { Log.d(TAG, "Response component=" + componentName + " differs from request component=" + mInlineSuggestionsRequestInfo.mComponentName + ", ignoring response"); if (DEBUG) { Log.d(TAG, "Response component=" + componentName + " differs from request component=" + mInlineSuggestionsRequestInfo.mComponentName + ", ignoring response"); } return; } onInlineSuggestionsResponse(response); Loading Loading @@ -841,7 +852,7 @@ public class InputMethodService extends AbstractInputMethodService { */ public boolean validate(ComponentName componentName) { final boolean result = componentName.equals(mComponentName); if (!result) { if (DEBUG && !result) { Log.d(TAG, "Cached request info ComponentName=" + mComponentName + " differs from received ComponentName=" + componentName); } Loading core/java/android/view/inputmethod/InputMethod.java +7 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,8 @@ import com.android.internal.view.IInlineSuggestionsRequestCallback; * which is what clients use to communicate with the input method. */ public interface InputMethod { /** @hide **/ public static final String TAG = "InputMethod"; /** * This is the interface name that a service implementing an input * method should say that it supports -- that is, this is the action it Loading Loading @@ -111,6 +113,10 @@ public interface InputMethod { /** * Called to notify the IME that Autofill Frameworks requested an inline suggestions request. * * @param componentName {@link ComponentName} of current app/activity. * @param autofillId {@link AutofillId} of currently focused field. * @param cb {@link IInlineSuggestionsRequestCallback} used to pass back the request object. * * @hide */ default void onCreateInlineSuggestionsRequest(ComponentName componentName, Loading @@ -118,7 +124,7 @@ public interface InputMethod { try { cb.onInlineSuggestionsUnsupported(); } catch (RemoteException e) { Log.w("InputMethod", "RemoteException calling onInlineSuggestionsUnsupported: " + e); Log.w(TAG, "Failed to call onInlineSuggestionsUnsupported.", e); } } Loading services/autofill/java/com/android/server/autofill/Session.java +7 −4 Original line number Diff line number Diff line Loading @@ -646,8 +646,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState @Override public void onInlineSuggestionsUnsupported() throws RemoteException { Log.i(TAG, "inline suggestions request unsupported, " if (sDebug) { Log.d(TAG, "inline suggestions request unsupported, " + "falling back to regular autofill"); } final Session session = mSession.get(); if (session != null) { synchronized (session.mLock) { Loading @@ -660,8 +662,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState @Override public void onInlineSuggestionsRequest(InlineSuggestionsRequest request, IInlineSuggestionsResponseCallback callback) throws RemoteException { Log.i(TAG, "onInlineSuggestionsRequest() received: " + request); if (sDebug) { Log.d(TAG, "onInlineSuggestionsRequest() received: " + request); } final Session session = mSession.get(); if (session != null) { synchronized (session.mLock) { Loading services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +0 −8 Original line number Diff line number Diff line Loading @@ -19,8 +19,6 @@ package com.android.server.inputmethod; import android.annotation.NonNull; import android.annotation.UserIdInt; import android.content.ComponentName; import android.os.RemoteException; import android.util.Log; import android.view.autofill.AutofillId; import android.view.inputmethod.InlineSuggestionsRequest; import android.view.inputmethod.InputMethodInfo; Loading Loading @@ -99,12 +97,6 @@ public abstract class InputMethodManagerInternal { @Override public void onCreateInlineSuggestionsRequest(ComponentName componentName, AutofillId autofillId, IInlineSuggestionsRequestCallback cb) { try { cb.onInlineSuggestionsUnsupported(); } catch (RemoteException e) { Log.w("IMManagerInternal", "RemoteException calling" + " onInlineSuggestionsUnsupported: " + e); } } }; Loading services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +1 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import android.provider.Settings; import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; import android.util.Log; import android.util.Slog; import android.util.SparseArray; import android.view.InputChannel; Loading Loading @@ -198,8 +197,7 @@ public final class MultiClientInputMethodManagerService { //TODO(b/137800469): support multi client IMEs. cb.onInlineSuggestionsUnsupported(); } catch (RemoteException e) { Log.w("MultiClientIMManager", "RemoteException calling" + " onInlineSuggestionsUnsupported: " + e); Slog.w(TAG, "Failed to call onInlineSuggestionsUnsupported.", e); } } }); Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +16 −5 Original line number Diff line number Diff line Loading @@ -517,7 +517,9 @@ public class InputMethodService extends AbstractInputMethodService { @Override public void onCreateInlineSuggestionsRequest(ComponentName componentName, AutofillId autofillId, IInlineSuggestionsRequestCallback cb) { if (DEBUG) { Log.d(TAG, "InputMethodService received onCreateInlineSuggestionsRequest()"); } handleOnCreateInlineSuggestionsRequest(componentName, autofillId, cb); } Loading Loading @@ -755,7 +757,12 @@ public class InputMethodService extends AbstractInputMethodService { private void handleOnCreateInlineSuggestionsRequest(@NonNull ComponentName componentName, @NonNull AutofillId autofillId, @NonNull IInlineSuggestionsRequestCallback callback) { if (!mInputStarted) { try { Log.w(TAG, "onStartInput() not called yet"); callback.onInlineSuggestionsUnsupported(); } catch (RemoteException e) { Log.w(TAG, "Failed to call onInlineSuggestionsUnsupported.", e); } return; } Loading @@ -768,8 +775,12 @@ public class InputMethodService extends AbstractInputMethodService { private void handleOnInlineSuggestionsResponse(@NonNull ComponentName componentName, @NonNull AutofillId autofillId, @NonNull InlineSuggestionsResponse response) { if (!mInlineSuggestionsRequestInfo.validate(componentName)) { Log.d(TAG, "Response component=" + componentName + " differs from request component=" + mInlineSuggestionsRequestInfo.mComponentName + ", ignoring response"); if (DEBUG) { Log.d(TAG, "Response component=" + componentName + " differs from request component=" + mInlineSuggestionsRequestInfo.mComponentName + ", ignoring response"); } return; } onInlineSuggestionsResponse(response); Loading Loading @@ -841,7 +852,7 @@ public class InputMethodService extends AbstractInputMethodService { */ public boolean validate(ComponentName componentName) { final boolean result = componentName.equals(mComponentName); if (!result) { if (DEBUG && !result) { Log.d(TAG, "Cached request info ComponentName=" + mComponentName + " differs from received ComponentName=" + componentName); } Loading
core/java/android/view/inputmethod/InputMethod.java +7 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,8 @@ import com.android.internal.view.IInlineSuggestionsRequestCallback; * which is what clients use to communicate with the input method. */ public interface InputMethod { /** @hide **/ public static final String TAG = "InputMethod"; /** * This is the interface name that a service implementing an input * method should say that it supports -- that is, this is the action it Loading Loading @@ -111,6 +113,10 @@ public interface InputMethod { /** * Called to notify the IME that Autofill Frameworks requested an inline suggestions request. * * @param componentName {@link ComponentName} of current app/activity. * @param autofillId {@link AutofillId} of currently focused field. * @param cb {@link IInlineSuggestionsRequestCallback} used to pass back the request object. * * @hide */ default void onCreateInlineSuggestionsRequest(ComponentName componentName, Loading @@ -118,7 +124,7 @@ public interface InputMethod { try { cb.onInlineSuggestionsUnsupported(); } catch (RemoteException e) { Log.w("InputMethod", "RemoteException calling onInlineSuggestionsUnsupported: " + e); Log.w(TAG, "Failed to call onInlineSuggestionsUnsupported.", e); } } Loading
services/autofill/java/com/android/server/autofill/Session.java +7 −4 Original line number Diff line number Diff line Loading @@ -646,8 +646,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState @Override public void onInlineSuggestionsUnsupported() throws RemoteException { Log.i(TAG, "inline suggestions request unsupported, " if (sDebug) { Log.d(TAG, "inline suggestions request unsupported, " + "falling back to regular autofill"); } final Session session = mSession.get(); if (session != null) { synchronized (session.mLock) { Loading @@ -660,8 +662,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState @Override public void onInlineSuggestionsRequest(InlineSuggestionsRequest request, IInlineSuggestionsResponseCallback callback) throws RemoteException { Log.i(TAG, "onInlineSuggestionsRequest() received: " + request); if (sDebug) { Log.d(TAG, "onInlineSuggestionsRequest() received: " + request); } final Session session = mSession.get(); if (session != null) { synchronized (session.mLock) { Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +0 −8 Original line number Diff line number Diff line Loading @@ -19,8 +19,6 @@ package com.android.server.inputmethod; import android.annotation.NonNull; import android.annotation.UserIdInt; import android.content.ComponentName; import android.os.RemoteException; import android.util.Log; import android.view.autofill.AutofillId; import android.view.inputmethod.InlineSuggestionsRequest; import android.view.inputmethod.InputMethodInfo; Loading Loading @@ -99,12 +97,6 @@ public abstract class InputMethodManagerInternal { @Override public void onCreateInlineSuggestionsRequest(ComponentName componentName, AutofillId autofillId, IInlineSuggestionsRequestCallback cb) { try { cb.onInlineSuggestionsUnsupported(); } catch (RemoteException e) { Log.w("IMManagerInternal", "RemoteException calling" + " onInlineSuggestionsUnsupported: " + e); } } }; Loading
services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +1 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import android.provider.Settings; import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; import android.util.Log; import android.util.Slog; import android.util.SparseArray; import android.view.InputChannel; Loading Loading @@ -198,8 +197,7 @@ public final class MultiClientInputMethodManagerService { //TODO(b/137800469): support multi client IMEs. cb.onInlineSuggestionsUnsupported(); } catch (RemoteException e) { Log.w("MultiClientIMManager", "RemoteException calling" + " onInlineSuggestionsUnsupported: " + e); Slog.w(TAG, "Failed to call onInlineSuggestionsUnsupported.", e); } } }); Loading