Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -9669,6 +9669,7 @@ package android.service.autofill { method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); method @Nullable public android.os.Bundle onGetInlineSuggestionsRendererInfo(); method @Nullable public android.view.View onRenderSuggestion(@NonNull android.service.autofill.InlinePresentation, int, int); method public final void startIntentSender(@NonNull android.content.IntentSender); field public static final String SERVICE_INTERFACE = "android.service.autofill.InlineSuggestionRenderService"; } api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3193,6 +3193,7 @@ package android.service.autofill { method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); method @Nullable public android.os.Bundle onGetInlineSuggestionsRendererInfo(); method @Nullable public android.view.View onRenderSuggestion(@NonNull android.service.autofill.InlinePresentation, int, int); method public final void startIntentSender(@NonNull android.content.IntentSender); field public static final String SERVICE_INTERFACE = "android.service.autofill.InlineSuggestionRenderService"; } Loading core/java/android/service/autofill/IInlineSuggestionUiCallback.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.service.autofill; import android.content.IntentSender; import android.os.IBinder; import android.view.SurfaceControlViewHost; Loading @@ -30,4 +31,5 @@ oneway interface IInlineSuggestionUiCallback { void onContent(in SurfaceControlViewHost.SurfacePackage surface); void onError(); void onTransferTouchFocusToImeWindow(in IBinder sourceInputToken, int displayId); void onStartIntentSender(in IntentSender intentSender); } core/java/android/service/autofill/InlineSuggestionRenderService.java +18 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.annotation.TestApi; import android.app.Service; import android.app.slice.Slice; import android.content.Intent; import android.content.IntentSender; import android.graphics.PixelFormat; import android.os.Bundle; import android.os.Handler; Loading Loading @@ -60,6 +61,8 @@ public abstract class InlineSuggestionRenderService extends Service { private final Handler mHandler = new Handler(Looper.getMainLooper(), null, true); private IInlineSuggestionUiCallback mCallback; private void handleRenderSuggestion(IInlineSuggestionUiCallback callback, InlinePresentation presentation, int width, int height, IBinder hostInputToken, int displayId) { Loading @@ -84,6 +87,7 @@ public abstract class InlineSuggestionRenderService extends Service { } return; } mCallback = callback; final InlineSuggestionRoot suggestionRoot = new InlineSuggestionRoot(this, callback); suggestionRoot.addView(suggestionView); Loading Loading @@ -154,6 +158,20 @@ public abstract class InlineSuggestionRenderService extends Service { return null; } /** * Starts the {@link IntentSender} from the client app. * * @param intentSender the {@link IntentSender} to start the attribution UI from the client app. */ public final void startIntentSender(@NonNull IntentSender intentSender) { if (mCallback == null) return; try { mCallback.onStartIntentSender(intentSender); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } /** * Returns the metadata about the renderer. Returns {@code null} if no metadata is provided. */ Loading services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java +23 −14 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.app.AppGlobals; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager; import android.content.pm.ServiceInfo; import android.os.Bundle; Loading Loading @@ -250,7 +251,9 @@ final class RemoteAugmentedAutofillService final InlineSuggestionsResponse inlineSuggestionsResponse = InlineSuggestionFactory.createAugmentedInlineSuggestionsResponse( request, inlineSuggestionsData, focusedId, dataset -> { new InlineSuggestionFactory.InlineSuggestionUiCallback() { @Override public void autofill(Dataset dataset) { mCallbacks.logAugmentedAutofillSelected(sessionId, dataset.getId()); try { Loading @@ -258,16 +261,22 @@ final class RemoteAugmentedAutofillService final int size = fieldIds.size(); final boolean hideHighlight = size == 1 && fieldIds.get(0).equals(focusedId); if (dataset.getAuthentication() != null) { client.startIntentSender(dataset.getAuthentication(), new Intent()); } else { client.autofill(sessionId, fieldIds, dataset.getFieldValues(), hideHighlight); } } catch (RemoteException e) { Slog.w(TAG, "Encounter exception autofilling the values"); } } @Override public void startIntentSender(IntentSender intentSender, Intent intent) { try { client.startIntentSender(intentSender, intent); } catch (RemoteException e) { Slog.w(TAG, "RemoteException starting intent sender"); } } }, onErrorCallback, remoteRenderService); if (inlineSuggestionsResponse == null) { Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -9669,6 +9669,7 @@ package android.service.autofill { method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); method @Nullable public android.os.Bundle onGetInlineSuggestionsRendererInfo(); method @Nullable public android.view.View onRenderSuggestion(@NonNull android.service.autofill.InlinePresentation, int, int); method public final void startIntentSender(@NonNull android.content.IntentSender); field public static final String SERVICE_INTERFACE = "android.service.autofill.InlineSuggestionRenderService"; }
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3193,6 +3193,7 @@ package android.service.autofill { method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); method @Nullable public android.os.Bundle onGetInlineSuggestionsRendererInfo(); method @Nullable public android.view.View onRenderSuggestion(@NonNull android.service.autofill.InlinePresentation, int, int); method public final void startIntentSender(@NonNull android.content.IntentSender); field public static final String SERVICE_INTERFACE = "android.service.autofill.InlineSuggestionRenderService"; } Loading
core/java/android/service/autofill/IInlineSuggestionUiCallback.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.service.autofill; import android.content.IntentSender; import android.os.IBinder; import android.view.SurfaceControlViewHost; Loading @@ -30,4 +31,5 @@ oneway interface IInlineSuggestionUiCallback { void onContent(in SurfaceControlViewHost.SurfacePackage surface); void onError(); void onTransferTouchFocusToImeWindow(in IBinder sourceInputToken, int displayId); void onStartIntentSender(in IntentSender intentSender); }
core/java/android/service/autofill/InlineSuggestionRenderService.java +18 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.annotation.TestApi; import android.app.Service; import android.app.slice.Slice; import android.content.Intent; import android.content.IntentSender; import android.graphics.PixelFormat; import android.os.Bundle; import android.os.Handler; Loading Loading @@ -60,6 +61,8 @@ public abstract class InlineSuggestionRenderService extends Service { private final Handler mHandler = new Handler(Looper.getMainLooper(), null, true); private IInlineSuggestionUiCallback mCallback; private void handleRenderSuggestion(IInlineSuggestionUiCallback callback, InlinePresentation presentation, int width, int height, IBinder hostInputToken, int displayId) { Loading @@ -84,6 +87,7 @@ public abstract class InlineSuggestionRenderService extends Service { } return; } mCallback = callback; final InlineSuggestionRoot suggestionRoot = new InlineSuggestionRoot(this, callback); suggestionRoot.addView(suggestionView); Loading Loading @@ -154,6 +158,20 @@ public abstract class InlineSuggestionRenderService extends Service { return null; } /** * Starts the {@link IntentSender} from the client app. * * @param intentSender the {@link IntentSender} to start the attribution UI from the client app. */ public final void startIntentSender(@NonNull IntentSender intentSender) { if (mCallback == null) return; try { mCallback.onStartIntentSender(intentSender); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } /** * Returns the metadata about the renderer. Returns {@code null} if no metadata is provided. */ Loading
services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java +23 −14 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.app.AppGlobals; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager; import android.content.pm.ServiceInfo; import android.os.Bundle; Loading Loading @@ -250,7 +251,9 @@ final class RemoteAugmentedAutofillService final InlineSuggestionsResponse inlineSuggestionsResponse = InlineSuggestionFactory.createAugmentedInlineSuggestionsResponse( request, inlineSuggestionsData, focusedId, dataset -> { new InlineSuggestionFactory.InlineSuggestionUiCallback() { @Override public void autofill(Dataset dataset) { mCallbacks.logAugmentedAutofillSelected(sessionId, dataset.getId()); try { Loading @@ -258,16 +261,22 @@ final class RemoteAugmentedAutofillService final int size = fieldIds.size(); final boolean hideHighlight = size == 1 && fieldIds.get(0).equals(focusedId); if (dataset.getAuthentication() != null) { client.startIntentSender(dataset.getAuthentication(), new Intent()); } else { client.autofill(sessionId, fieldIds, dataset.getFieldValues(), hideHighlight); } } catch (RemoteException e) { Slog.w(TAG, "Encounter exception autofilling the values"); } } @Override public void startIntentSender(IntentSender intentSender, Intent intent) { try { client.startIntentSender(intentSender, intent); } catch (RemoteException e) { Slog.w(TAG, "RemoteException starting intent sender"); } } }, onErrorCallback, remoteRenderService); if (inlineSuggestionsResponse == null) { Loading