Loading core/java/android/app/assist/AssistStructure.java +3 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.os.PooledStringWriter; import android.os.RemoteException; import android.os.SystemClock; import android.service.autofill.FillContext; import android.service.autofill.FillRequest; import android.text.TextUtils; import android.util.Log; import android.util.Pair; Loading Loading @@ -494,7 +495,7 @@ public class AssistStructure implements Parcelable { ViewNodeBuilder builder = new ViewNodeBuilder(assist, mRoot, false); if ((root.getWindowFlags() & WindowManager.LayoutParams.FLAG_SECURE) != 0) { if (forAutoFill) { final int autofillFlags = (flags & AutofillManager.FLAG_MANUAL_REQUEST) != 0 final int autofillFlags = (flags & FillRequest.FLAG_MANUAL_REQUEST) != 0 ? View.AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS : 0; view.onProvideAutofillStructure(builder, autofillFlags); } else { Loading @@ -506,7 +507,7 @@ public class AssistStructure implements Parcelable { } } if (forAutoFill) { final int autofillFlags = (flags & AutofillManager.FLAG_MANUAL_REQUEST) != 0 final int autofillFlags = (flags & FillRequest.FLAG_MANUAL_REQUEST) != 0 ? View.AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS : 0; view.dispatchProvideAutofillStructure(builder, autofillFlags); } else { Loading core/java/android/service/autofill/AutofillService.java +2 −72 Original line number Diff line number Diff line Loading @@ -116,15 +116,7 @@ public abstract class AutofillService extends Service { final IFillCallback callback = (IFillCallback) args.arg3; final FillCallback fillCallback = new FillCallback(callback, request.getId()); args.recycle(); // TODO(b/37563972): temporary try-catch hack to support old method try { onFillRequest(request, cancellation, fillCallback); } catch (AbstractMethodError e) { final List<FillContext> contexts = request.getFillContexts(); onFillRequest(contexts.get(contexts.size() - 1).getStructure(), request.getClientState(), request.getFlags(), cancellation, fillCallback); } break; } case MSG_ON_SAVE_REQUEST: { final SomeArgs args = (SomeArgs) msg.obj; Loading @@ -132,14 +124,7 @@ public abstract class AutofillService extends Service { final ISaveCallback callback = (ISaveCallback) args.arg2; final SaveCallback saveCallback = new SaveCallback(callback); args.recycle(); // TODO(b/37563972): temporary try-catch hack to support old method try { onSaveRequest(request, saveCallback); } catch (AbstractMethodError e) { final List<FillContext> contexts = request.getFillContexts(); onSaveRequest(contexts.get(contexts.size() - 1).getStructure(), request.getClientState(), saveCallback); } break; } case MSG_DISCONNECT: { onDisconnected(); Loading Loading @@ -200,37 +185,6 @@ public abstract class AutofillService extends Service { public abstract void onFillRequest(@NonNull FillRequest request, @NonNull CancellationSignal cancellationSignal, @NonNull FillCallback callback); /** * Called by the Android system do decide if an {@link Activity} can be autofilled by the * service. * * <p>Service must call one of the {@link FillCallback} methods (like * {@link FillCallback#onSuccess(FillResponse)} * or {@link FillCallback#onFailure(CharSequence)}) * to notify the result of the request. * * @param structure {@link Activity}'s view structure. * @param data bundle containing data passed by the service in a last call to * {@link FillResponse.Builder#setExtras(Bundle)}, if any. This bundle allows your * service to keep state between fill and save requests as well as when filling different * sections of the UI as the system will try to aggressively unbind from the service to * conserve resources. * See {@link FillResponse} for examples of multiple-sections requests. * @param flags either {@code 0} or {@link AutofillManager#FLAG_MANUAL_REQUEST}. * @param cancellationSignal signal for observing cancellation requests. The system will use * this to notify you that the fill result is no longer needed and you should stop * handling this fill request in order to save resources. * @param callback object used to notify the result of the request. * * @hide */ @Deprecated public void onFillRequest(@NonNull AssistStructure structure, @Nullable Bundle data, int flags, @NonNull CancellationSignal cancellationSignal, @NonNull FillCallback callback) { } /** * Called when user requests service to save the fields of an {@link Activity}. * Loading @@ -245,30 +199,6 @@ public abstract class AutofillService extends Service { public abstract void onSaveRequest(@NonNull SaveRequest request, @NonNull SaveCallback callback); /** * Called when user requests service to save the fields of an {@link Activity}. * * <p>Service must call one of the {@link SaveCallback} methods (like * {@link SaveCallback#onSuccess()} or {@link SaveCallback#onFailure(CharSequence)}) * to notify the result of the request. * * @param structure {@link Activity}'s view structure. * @param data bundle containing data passed by the service in a last call to * {@link FillResponse.Builder#setExtras(Bundle)}, if any. This bundle allows your * service to keep state between fill and save requests as well as when filling different * sections of the UI as the system will try to aggressively unbind from the service to * conserve resources. * See {@link FillResponse} for examples of multiple-sections requests. * @param callback object used to notify the result of the request. * * @hide */ @Deprecated public void onSaveRequest(@NonNull AssistStructure structure, @Nullable Bundle data, @NonNull SaveCallback callback) { } /** * Called when the Android system disconnects from the service. * Loading core/java/android/service/autofill/SaveInfo.java +0 −9 Original line number Diff line number Diff line Loading @@ -326,15 +326,6 @@ public final class SaveInfo implements Parcelable { return this; } /** @hide */ // TODO (b/37563972): Remove when callers migrate public @NonNull Builder setNegativeAction(@Nullable CharSequence title, @Nullable IntentSender listener) { throwIfDestroyed(); setNegativeAction(NEGATIVE_BUTTON_STYLE_CANCEL, listener); return this; } /** * Sets the style and listener for the negative save action. * Loading core/java/android/view/autofill/AutofillManager.java +1 −8 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view.autofill; import static android.service.autofill.FillRequest.FLAG_MANUAL_REQUEST; import static android.view.autofill.Helper.sDebug; import static android.view.autofill.Helper.sVerbose; Loading Loading @@ -99,14 +100,6 @@ public final class AutofillManager { static final String SESSION_ID_TAG = "android:sessionId"; static final String LAST_AUTOFILLED_DATA_TAG = "android:lastAutoFilledData"; /** * @deprecated Use {@link android.service.autofill.FillRequest#FLAG_MANUAL_REQUEST} * @hide */ // TODO(b/37563972): remove (and change value of private flags) @Deprecated public static final int FLAG_MANUAL_REQUEST = 0x1; /** @hide */ public static final int ACTION_START_SESSION = 1; /** @hide */ public static final int ACTION_VIEW_ENTERED = 2; /** @hide */ public static final int ACTION_VIEW_EXITED = 3; Loading Loading
core/java/android/app/assist/AssistStructure.java +3 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.os.PooledStringWriter; import android.os.RemoteException; import android.os.SystemClock; import android.service.autofill.FillContext; import android.service.autofill.FillRequest; import android.text.TextUtils; import android.util.Log; import android.util.Pair; Loading Loading @@ -494,7 +495,7 @@ public class AssistStructure implements Parcelable { ViewNodeBuilder builder = new ViewNodeBuilder(assist, mRoot, false); if ((root.getWindowFlags() & WindowManager.LayoutParams.FLAG_SECURE) != 0) { if (forAutoFill) { final int autofillFlags = (flags & AutofillManager.FLAG_MANUAL_REQUEST) != 0 final int autofillFlags = (flags & FillRequest.FLAG_MANUAL_REQUEST) != 0 ? View.AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS : 0; view.onProvideAutofillStructure(builder, autofillFlags); } else { Loading @@ -506,7 +507,7 @@ public class AssistStructure implements Parcelable { } } if (forAutoFill) { final int autofillFlags = (flags & AutofillManager.FLAG_MANUAL_REQUEST) != 0 final int autofillFlags = (flags & FillRequest.FLAG_MANUAL_REQUEST) != 0 ? View.AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS : 0; view.dispatchProvideAutofillStructure(builder, autofillFlags); } else { Loading
core/java/android/service/autofill/AutofillService.java +2 −72 Original line number Diff line number Diff line Loading @@ -116,15 +116,7 @@ public abstract class AutofillService extends Service { final IFillCallback callback = (IFillCallback) args.arg3; final FillCallback fillCallback = new FillCallback(callback, request.getId()); args.recycle(); // TODO(b/37563972): temporary try-catch hack to support old method try { onFillRequest(request, cancellation, fillCallback); } catch (AbstractMethodError e) { final List<FillContext> contexts = request.getFillContexts(); onFillRequest(contexts.get(contexts.size() - 1).getStructure(), request.getClientState(), request.getFlags(), cancellation, fillCallback); } break; } case MSG_ON_SAVE_REQUEST: { final SomeArgs args = (SomeArgs) msg.obj; Loading @@ -132,14 +124,7 @@ public abstract class AutofillService extends Service { final ISaveCallback callback = (ISaveCallback) args.arg2; final SaveCallback saveCallback = new SaveCallback(callback); args.recycle(); // TODO(b/37563972): temporary try-catch hack to support old method try { onSaveRequest(request, saveCallback); } catch (AbstractMethodError e) { final List<FillContext> contexts = request.getFillContexts(); onSaveRequest(contexts.get(contexts.size() - 1).getStructure(), request.getClientState(), saveCallback); } break; } case MSG_DISCONNECT: { onDisconnected(); Loading Loading @@ -200,37 +185,6 @@ public abstract class AutofillService extends Service { public abstract void onFillRequest(@NonNull FillRequest request, @NonNull CancellationSignal cancellationSignal, @NonNull FillCallback callback); /** * Called by the Android system do decide if an {@link Activity} can be autofilled by the * service. * * <p>Service must call one of the {@link FillCallback} methods (like * {@link FillCallback#onSuccess(FillResponse)} * or {@link FillCallback#onFailure(CharSequence)}) * to notify the result of the request. * * @param structure {@link Activity}'s view structure. * @param data bundle containing data passed by the service in a last call to * {@link FillResponse.Builder#setExtras(Bundle)}, if any. This bundle allows your * service to keep state between fill and save requests as well as when filling different * sections of the UI as the system will try to aggressively unbind from the service to * conserve resources. * See {@link FillResponse} for examples of multiple-sections requests. * @param flags either {@code 0} or {@link AutofillManager#FLAG_MANUAL_REQUEST}. * @param cancellationSignal signal for observing cancellation requests. The system will use * this to notify you that the fill result is no longer needed and you should stop * handling this fill request in order to save resources. * @param callback object used to notify the result of the request. * * @hide */ @Deprecated public void onFillRequest(@NonNull AssistStructure structure, @Nullable Bundle data, int flags, @NonNull CancellationSignal cancellationSignal, @NonNull FillCallback callback) { } /** * Called when user requests service to save the fields of an {@link Activity}. * Loading @@ -245,30 +199,6 @@ public abstract class AutofillService extends Service { public abstract void onSaveRequest(@NonNull SaveRequest request, @NonNull SaveCallback callback); /** * Called when user requests service to save the fields of an {@link Activity}. * * <p>Service must call one of the {@link SaveCallback} methods (like * {@link SaveCallback#onSuccess()} or {@link SaveCallback#onFailure(CharSequence)}) * to notify the result of the request. * * @param structure {@link Activity}'s view structure. * @param data bundle containing data passed by the service in a last call to * {@link FillResponse.Builder#setExtras(Bundle)}, if any. This bundle allows your * service to keep state between fill and save requests as well as when filling different * sections of the UI as the system will try to aggressively unbind from the service to * conserve resources. * See {@link FillResponse} for examples of multiple-sections requests. * @param callback object used to notify the result of the request. * * @hide */ @Deprecated public void onSaveRequest(@NonNull AssistStructure structure, @Nullable Bundle data, @NonNull SaveCallback callback) { } /** * Called when the Android system disconnects from the service. * Loading
core/java/android/service/autofill/SaveInfo.java +0 −9 Original line number Diff line number Diff line Loading @@ -326,15 +326,6 @@ public final class SaveInfo implements Parcelable { return this; } /** @hide */ // TODO (b/37563972): Remove when callers migrate public @NonNull Builder setNegativeAction(@Nullable CharSequence title, @Nullable IntentSender listener) { throwIfDestroyed(); setNegativeAction(NEGATIVE_BUTTON_STYLE_CANCEL, listener); return this; } /** * Sets the style and listener for the negative save action. * Loading
core/java/android/view/autofill/AutofillManager.java +1 −8 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view.autofill; import static android.service.autofill.FillRequest.FLAG_MANUAL_REQUEST; import static android.view.autofill.Helper.sDebug; import static android.view.autofill.Helper.sVerbose; Loading Loading @@ -99,14 +100,6 @@ public final class AutofillManager { static final String SESSION_ID_TAG = "android:sessionId"; static final String LAST_AUTOFILLED_DATA_TAG = "android:lastAutoFilledData"; /** * @deprecated Use {@link android.service.autofill.FillRequest#FLAG_MANUAL_REQUEST} * @hide */ // TODO(b/37563972): remove (and change value of private flags) @Deprecated public static final int FLAG_MANUAL_REQUEST = 0x1; /** @hide */ public static final int ACTION_START_SESSION = 1; /** @hide */ public static final int ACTION_VIEW_ENTERED = 2; /** @hide */ public static final int ACTION_VIEW_EXITED = 3; Loading