Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -47645,6 +47645,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; field public static final java.lang.String EXTRA_DATA_EXTRAS = "android.view.autofill.extra.DATA_EXTRAS"; field public static final int FLAG_MANUAL_REQUEST = 1; // 0x1 } api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -51135,6 +51135,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; field public static final java.lang.String EXTRA_DATA_EXTRAS = "android.view.autofill.extra.DATA_EXTRAS"; field public static final int FLAG_MANUAL_REQUEST = 1; // 0x1 } api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -48028,6 +48028,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; field public static final java.lang.String EXTRA_DATA_EXTRAS = "android.view.autofill.extra.DATA_EXTRAS"; field public static final int FLAG_MANUAL_REQUEST = 1; // 0x1 } core/java/android/view/autofill/AutofillManager.java +16 −2 Original line number Diff line number Diff line Loading @@ -56,9 +56,9 @@ public final class AutofillManager { /** * Intent extra: The assist structure which captures the filled screen. * * <p> * Type: {@link android.app.assist.AssistStructure} * </p> */ public static final String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; Loading @@ -72,11 +72,25 @@ public final class AutofillManager { * <p> * Type: {@link android.service.autofill.FillResponse} or a * {@link android.service.autofill.Dataset} * </p> */ public static final String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; /** * Intent extra: The optional extras provided by the * {@link android.service.autofill.AutofillService}. * * <p>For example, when the service responds to a {@link * android.service.autofill.FillCallback#onSuccess(android.service.autofill.FillResponse)} with * a {@code FillResponse} that requires authentication, the Intent that launches the * service authentication will contain the Bundle set by * {@link android.service.autofill.FillResponse.Builder#setExtras(Bundle)} on this extra. * * <p> * Type: {@link android.os.Bundle} */ public static final String EXTRA_DATA_EXTRAS = "android.view.autofill.extra.DATA_EXTRAS"; // Public flags start from the lowest bit /** * Indicates autofill was explicitly requested by the user. Loading services/autofill/java/com/android/server/autofill/Session.java +12 −8 Original line number Diff line number Diff line Loading @@ -244,10 +244,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState // FillServiceCallbacks @Override public void authenticate(IntentSender intent) { public void authenticate(IntentSender intent, Bundle extras) { final Intent fillInIntent; synchronized (mLock) { fillInIntent = createAuthFillInIntent(mStructure); fillInIntent = createAuthFillInIntent(mStructure, extras); } mHandlerCaller.getHandler().post(() -> startAuthentication(intent, fillInIntent)); } Loading Loading @@ -313,7 +313,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (mCurrentResponse == null || data == null) { removeSelf(); } else { Parcelable result = data.getParcelable( final Parcelable result = data.getParcelable( AutofillManager.EXTRA_AUTHENTICATION_RESULT); if (result instanceof FillResponse) { mMetricsLogger.action(MetricsEvent.AUTOFILL_AUTHENTICATED, mPackageName); Loading @@ -321,7 +321,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState mCurrentResponse = (FillResponse) result; processResponseLocked(mCurrentResponse); } else if (result instanceof Dataset) { Dataset dataset = (Dataset) result; final Dataset dataset = (Dataset) result; final int index = mCurrentResponse.getDatasets().indexOf(mAutoFilledDataset); if (index >= 0) { mCurrentResponse.getDatasets().set(index, dataset); Loading Loading @@ -614,7 +614,8 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (mCurrentResponse.getAuthentication() != null) { // Handle authentication. final Intent fillInIntent = createAuthFillInIntent(mStructure); final Intent fillInIntent = createAuthFillInIntent(mStructure, mCurrentResponse.getExtras()); mCurrentViewState.setResponse(mCurrentResponse, fillInIntent); return; } Loading @@ -640,7 +641,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } // ...or handle authentication. Intent fillInIntent = createAuthFillInIntent(mStructure); final Intent fillInIntent = createAuthFillInIntent(mStructure, null); startAuthentication(dataset.getAuthentication(), fillInIntent); } } Loading @@ -649,9 +650,12 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState return mService.getServiceName(); } private Intent createAuthFillInIntent(AssistStructure structure) { Intent fillInIntent = new Intent(); private Intent createAuthFillInIntent(AssistStructure structure, Bundle extras) { final Intent fillInIntent = new Intent(); fillInIntent.putExtra(AutofillManager.EXTRA_ASSIST_STRUCTURE, structure); if (extras != null) { fillInIntent.putExtra(AutofillManager.EXTRA_DATA_EXTRAS, extras); } return fillInIntent; } Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -47645,6 +47645,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; field public static final java.lang.String EXTRA_DATA_EXTRAS = "android.view.autofill.extra.DATA_EXTRAS"; field public static final int FLAG_MANUAL_REQUEST = 1; // 0x1 }
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -51135,6 +51135,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; field public static final java.lang.String EXTRA_DATA_EXTRAS = "android.view.autofill.extra.DATA_EXTRAS"; field public static final int FLAG_MANUAL_REQUEST = 1; // 0x1 }
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -48028,6 +48028,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; field public static final java.lang.String EXTRA_DATA_EXTRAS = "android.view.autofill.extra.DATA_EXTRAS"; field public static final int FLAG_MANUAL_REQUEST = 1; // 0x1 }
core/java/android/view/autofill/AutofillManager.java +16 −2 Original line number Diff line number Diff line Loading @@ -56,9 +56,9 @@ public final class AutofillManager { /** * Intent extra: The assist structure which captures the filled screen. * * <p> * Type: {@link android.app.assist.AssistStructure} * </p> */ public static final String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; Loading @@ -72,11 +72,25 @@ public final class AutofillManager { * <p> * Type: {@link android.service.autofill.FillResponse} or a * {@link android.service.autofill.Dataset} * </p> */ public static final String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; /** * Intent extra: The optional extras provided by the * {@link android.service.autofill.AutofillService}. * * <p>For example, when the service responds to a {@link * android.service.autofill.FillCallback#onSuccess(android.service.autofill.FillResponse)} with * a {@code FillResponse} that requires authentication, the Intent that launches the * service authentication will contain the Bundle set by * {@link android.service.autofill.FillResponse.Builder#setExtras(Bundle)} on this extra. * * <p> * Type: {@link android.os.Bundle} */ public static final String EXTRA_DATA_EXTRAS = "android.view.autofill.extra.DATA_EXTRAS"; // Public flags start from the lowest bit /** * Indicates autofill was explicitly requested by the user. Loading
services/autofill/java/com/android/server/autofill/Session.java +12 −8 Original line number Diff line number Diff line Loading @@ -244,10 +244,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState // FillServiceCallbacks @Override public void authenticate(IntentSender intent) { public void authenticate(IntentSender intent, Bundle extras) { final Intent fillInIntent; synchronized (mLock) { fillInIntent = createAuthFillInIntent(mStructure); fillInIntent = createAuthFillInIntent(mStructure, extras); } mHandlerCaller.getHandler().post(() -> startAuthentication(intent, fillInIntent)); } Loading Loading @@ -313,7 +313,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (mCurrentResponse == null || data == null) { removeSelf(); } else { Parcelable result = data.getParcelable( final Parcelable result = data.getParcelable( AutofillManager.EXTRA_AUTHENTICATION_RESULT); if (result instanceof FillResponse) { mMetricsLogger.action(MetricsEvent.AUTOFILL_AUTHENTICATED, mPackageName); Loading @@ -321,7 +321,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState mCurrentResponse = (FillResponse) result; processResponseLocked(mCurrentResponse); } else if (result instanceof Dataset) { Dataset dataset = (Dataset) result; final Dataset dataset = (Dataset) result; final int index = mCurrentResponse.getDatasets().indexOf(mAutoFilledDataset); if (index >= 0) { mCurrentResponse.getDatasets().set(index, dataset); Loading Loading @@ -614,7 +614,8 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (mCurrentResponse.getAuthentication() != null) { // Handle authentication. final Intent fillInIntent = createAuthFillInIntent(mStructure); final Intent fillInIntent = createAuthFillInIntent(mStructure, mCurrentResponse.getExtras()); mCurrentViewState.setResponse(mCurrentResponse, fillInIntent); return; } Loading @@ -640,7 +641,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } // ...or handle authentication. Intent fillInIntent = createAuthFillInIntent(mStructure); final Intent fillInIntent = createAuthFillInIntent(mStructure, null); startAuthentication(dataset.getAuthentication(), fillInIntent); } } Loading @@ -649,9 +650,12 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState return mService.getServiceName(); } private Intent createAuthFillInIntent(AssistStructure structure) { Intent fillInIntent = new Intent(); private Intent createAuthFillInIntent(AssistStructure structure, Bundle extras) { final Intent fillInIntent = new Intent(); fillInIntent.putExtra(AutofillManager.EXTRA_ASSIST_STRUCTURE, structure); if (extras != null) { fillInIntent.putExtra(AutofillManager.EXTRA_DATA_EXTRAS, extras); } return fillInIntent; } Loading