Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08e69bda authored by Tim Yu's avatar Tim Yu Committed by Android (Google) Code Review
Browse files

Merge "[Autofill] New APIs for metrics targeting W" into main

parents ded7c624 a0630b1a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -40756,6 +40756,7 @@ package android.service.autofill {
    method public int describeContents();
    method @Deprecated @Nullable public android.os.Bundle getClientState();
    method @Nullable public java.util.List<android.service.autofill.FillEventHistory.Event> getEvents();
    method @FlaggedApi("android.service.autofill.autofill_w_metrics") public int getSessionId();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.autofill.FillEventHistory> CREATOR;
  }
@@ -40765,10 +40766,12 @@ package android.service.autofill {
    method @Nullable public android.os.Bundle getClientState();
    method @Nullable public String getDatasetId();
    method @NonNull public java.util.Map<android.view.autofill.AutofillId,android.service.autofill.FieldClassification> getFieldsClassification();
    method @FlaggedApi("android.service.autofill.autofill_w_metrics") @Nullable public android.view.autofill.AutofillId getFocusedId();
    method @NonNull public java.util.Set<java.lang.String> getIgnoredDatasetIds();
    method @NonNull public java.util.Map<android.view.autofill.AutofillId,java.util.Set<java.lang.String>> getManuallyEnteredField();
    method public int getNoSaveUiReason();
    method @NonNull public java.util.Set<java.lang.String> getSelectedDatasetIds();
    method @FlaggedApi("android.service.autofill.autofill_w_metrics") @NonNull public java.util.Set<java.lang.String> getShownDatasetIds();
    method public int getType();
    method public int getUiType();
    field public static final int NO_SAVE_UI_REASON_DATASET_MATCH = 6; // 0x6
@@ -40777,6 +40780,7 @@ package android.service.autofill {
    field public static final int NO_SAVE_UI_REASON_NONE = 0; // 0x0
    field public static final int NO_SAVE_UI_REASON_NO_SAVE_INFO = 1; // 0x1
    field public static final int NO_SAVE_UI_REASON_NO_VALUE_CHANGED = 4; // 0x4
    field @FlaggedApi("android.service.autofill.autofill_w_metrics") public static final int NO_SAVE_UI_REASON_USING_CREDMAN = 7; // 0x7
    field public static final int NO_SAVE_UI_REASON_WITH_DELAY_SAVE_FLAG = 2; // 0x2
    field public static final int TYPE_AUTHENTICATION_SELECTED = 2; // 0x2
    field public static final int TYPE_CONTEXT_COMMITTED = 4; // 0x4
@@ -40785,6 +40789,7 @@ package android.service.autofill {
    field public static final int TYPE_DATASET_SELECTED = 0; // 0x0
    field public static final int TYPE_SAVE_SHOWN = 3; // 0x3
    field public static final int TYPE_VIEW_REQUESTED_AUTOFILL = 6; // 0x6
    field @FlaggedApi("android.service.autofill.autofill_w_metrics") public static final int UI_TYPE_CREDMAN = 4; // 0x4
    field public static final int UI_TYPE_DIALOG = 3; // 0x3
    field public static final int UI_TYPE_INLINE = 2; // 0x2
    field public static final int UI_TYPE_MENU = 1; // 0x1
@@ -54926,6 +54931,8 @@ package android.view {
    method public abstract void setTransformation(android.graphics.Matrix);
    method public abstract void setVisibility(int);
    method public abstract void setWebDomain(@Nullable String);
    field @FlaggedApi("android.service.autofill.autofill_w_metrics") public static final String EXTRA_VIRTUAL_STRUCTURE_TYPE = "android.view.ViewStructure.extra.VIRTUAL_STRUCTURE_TYPE";
    field @FlaggedApi("android.service.autofill.autofill_w_metrics") public static final String EXTRA_VIRTUAL_STRUCTURE_VERSION_NUMBER = "android.view.ViewStructure.extra.VIRTUAL_STRUCTURE_VERSION_NUMBER";
  }
  public abstract static class ViewStructure.HtmlInfo {
@@ -56648,6 +56655,11 @@ package android.view.autofill {
  public final class AutofillId implements android.os.Parcelable {
    method @NonNull public static android.view.autofill.AutofillId create(@NonNull android.view.View, int);
    method public int describeContents();
    method @FlaggedApi("android.service.autofill.autofill_w_metrics") public int getAutofillVirtualId();
    method @FlaggedApi("android.service.autofill.autofill_w_metrics") public int getSessionId();
    method @FlaggedApi("android.service.autofill.autofill_w_metrics") public int getViewId();
    method @FlaggedApi("android.service.autofill.autofill_w_metrics") public boolean isInAutofillSession();
    method @FlaggedApi("android.service.autofill.autofill_w_metrics") public boolean isVirtual();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.view.autofill.AutofillId> CREATOR;
  }
+10 −1
Original line number Diff line number Diff line
// Baseline format: 1.0
ActionValue: android.view.ViewStructure#EXTRA_VIRTUAL_STRUCTURE_TYPE:
    Inconsistent extra value; expected `android.view.extra.VIRTUAL_STRUCTURE_TYPE`, was `android.view.ViewStructure.extra.VIRTUAL_STRUCTURE_TYPE`
ActionValue: android.view.ViewStructure#EXTRA_VIRTUAL_STRUCTURE_VERSION_NUMBER:
    Inconsistent extra value; expected `android.view.extra.VIRTUAL_STRUCTURE_VERSION_NUMBER`, was `android.view.ViewStructure.extra.VIRTUAL_STRUCTURE_VERSION_NUMBER`


BroadcastBehavior: android.app.AlarmManager#ACTION_NEXT_ALARM_CLOCK_CHANGED:
    Field 'ACTION_NEXT_ALARM_CLOCK_CHANGED' is missing @BroadcastBehavior
BroadcastBehavior: android.app.AlarmManager#ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED:
@@ -1185,6 +1191,10 @@ UnflaggedApi: android.R.dimen#system_corner_radius_xlarge:
    New API must be flagged with @FlaggedApi: field android.R.dimen.system_corner_radius_xlarge
UnflaggedApi: android.R.dimen#system_corner_radius_xsmall:
    New API must be flagged with @FlaggedApi: field android.R.dimen.system_corner_radius_xsmall
UnflaggedApi: android.R.integer#status_bar_notification_info_maxnum:
    Changes from not deprecated to deprecated must be flagged with @FlaggedApi: field android.R.integer.status_bar_notification_info_maxnum
UnflaggedApi: android.R.string#status_bar_notification_info_overflow:
    Changes from not deprecated to deprecated must be flagged with @FlaggedApi: field android.R.string.status_bar_notification_info_overflow
UnflaggedApi: android.accessibilityservice.AccessibilityService#OVERLAY_RESULT_INTERNAL_ERROR:
    New API must be flagged with @FlaggedApi: field android.accessibilityservice.AccessibilityService.OVERLAY_RESULT_INTERNAL_ERROR
UnflaggedApi: android.accessibilityservice.AccessibilityService#OVERLAY_RESULT_INVALID:
@@ -1477,7 +1487,6 @@ UnflaggedApi: android.graphics.text.PositionedGlyphs#getItalicOverride(int):
    New API must be flagged with @FlaggedApi: method android.graphics.text.PositionedGlyphs.getItalicOverride(int)
UnflaggedApi: android.graphics.text.PositionedGlyphs#getWeightOverride(int):
    New API must be flagged with @FlaggedApi: method android.graphics.text.PositionedGlyphs.getWeightOverride(int)

UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_CAR:
    New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_CAR
UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_COMPUTER:
+6 −0
Original line number Diff line number Diff line
// Baseline format: 1.0
ActionValue: android.view.contentcapture.ViewNode.ViewStructureImpl#EXTRA_VIRTUAL_STRUCTURE_TYPE:
    Inconsistent extra value; expected `android.view.contentcapture.extra.VIRTUAL_STRUCTURE_TYPE`, was `android.view.ViewStructure.extra.VIRTUAL_STRUCTURE_TYPE`
ActionValue: android.view.contentcapture.ViewNode.ViewStructureImpl#EXTRA_VIRTUAL_STRUCTURE_VERSION_NUMBER:
    Inconsistent extra value; expected `android.view.contentcapture.extra.VIRTUAL_STRUCTURE_VERSION_NUMBER`, was `android.view.ViewStructure.extra.VIRTUAL_STRUCTURE_VERSION_NUMBER`


BannedThrow: android.os.vibrator.persistence.VibrationXmlSerializer#serialize(android.os.VibrationEffect, java.io.Writer):
    Methods must not throw unchecked exceptions

+47 −4
Original line number Diff line number Diff line
@@ -16,8 +16,10 @@

package android.service.autofill;

import static android.service.autofill.Flags.FLAG_AUTOFILL_W_METRICS;
import static android.view.autofill.Helper.sVerbose;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -63,14 +65,21 @@ public final class FillEventHistory implements Parcelable {
    private static final String TAG = "FillEventHistory";

    /**
     * Not in parcel. The ID of the autofill session that created the {@link FillResponse}.
     * The ID of the autofill session that created the {@link FillResponse}.
     *
     * TODO: add this to the parcel.
     */
    private final int mSessionId;

    @Nullable private final Bundle mClientState;
    @Nullable List<Event> mEvents;

    /** @hide */
    /**
     * Returns the unique identifier of this FillEventHistory.
     *
     * <p>This is used to differentiate individual FillEventHistory.
     */
    @FlaggedApi(FLAG_AUTOFILL_W_METRICS)
    public int getSessionId() {
        return mSessionId;
    }
@@ -283,6 +292,13 @@ public final class FillEventHistory implements Parcelable {
        /** All fields matched contents of datasets. */
        public static final int NO_SAVE_UI_REASON_DATASET_MATCH = 6;

        /**
         * Credential Manager is invoked instead of Autofill. When that happens, Save Dialog cannot
         * be shown, and this will be populated in
         */
        @FlaggedApi(FLAG_AUTOFILL_W_METRICS)
        public static final int NO_SAVE_UI_REASON_USING_CREDMAN = 7;

        /** @hide */
        @IntDef(prefix = { "NO_SAVE_UI_REASON_" }, value = {
                NO_SAVE_UI_REASON_NONE,
@@ -311,10 +327,19 @@ public final class FillEventHistory implements Parcelable {

        /**
         * The autofill suggestion is shown os a credman bottom sheet
         *
         * <p>Note, this was introduced as bottom sheet even though it applies to all credman UI
         * types. Instead of exposing this directly to the public, the generic UI_TYPE_CREDMAN is
         * introduced with the same number.
         *
         * @hide
         */
        public static final int UI_TYPE_CREDMAN_BOTTOM_SHEET = 4;

        /** Credential Manager suggestions are shown instead of Autofill suggestion */
        @FlaggedApi(FLAG_AUTOFILL_W_METRICS)
        public static final int UI_TYPE_CREDMAN = 4;

        /** @hide */
        @IntDef(prefix = { "UI_TYPE_" }, value = {
                UI_TYPE_UNKNOWN,
@@ -359,6 +384,13 @@ public final class FillEventHistory implements Parcelable {
            return mEventType;
        }

        /** Gets the {@code AutofillId} that's focused at the time of action */
        @FlaggedApi(FLAG_AUTOFILL_W_METRICS)
        @Nullable
        public AutofillId getFocusedId() {
            return null;
        }

        /**
         * Returns the id of dataset the id was on.
         *
@@ -390,6 +422,17 @@ public final class FillEventHistory implements Parcelable {
                    : new ArraySet<>(mSelectedDatasetIds);
        }

        /**
         * Returns which datasets were shown to the user.
         *
         * <p><b>Note: </b>Only set on events of type {@link #TYPE_DATASETS_SHOWN}.
         */
        @FlaggedApi(FLAG_AUTOFILL_W_METRICS)
        @NonNull
        public Set<String> getShownDatasetIds() {
            return Collections.emptySet();
        }

        /**
         * Returns which datasets were NOT selected by the user.
         *
+7 −9
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.view;

import static android.service.autofill.Flags.FLAG_AUTOFILL_CREDMAN_DEV_INTEGRATION;
import static android.service.autofill.Flags.FLAG_AUTOFILL_W_METRICS;

import android.annotation.FlaggedApi;
import android.annotation.NonNull;
@@ -79,27 +80,24 @@ public abstract class ViewStructure {
     * Key used for writing the type of the view that generated the virtual structure of its
     * children.
     *
     * For example, if the virtual structure is generated by a webview, the value would be
     * <p>For example, if the virtual structure is generated by a webview, the value would be
     * "WebView". If the virtual structure is generated by a compose view, then the value would be
     * "ComposeView". The value is of type String.
     *
     * This value is added to mainly help with debugging purpose.
     *
     * @hide
     * <p>This value is added to mainly help with debugging purpose.
     */
    @FlaggedApi(FLAG_AUTOFILL_W_METRICS)
    public static final String EXTRA_VIRTUAL_STRUCTURE_TYPE =
            "android.view.ViewStructure.extra.VIRTUAL_STRUCTURE_TYPE";


    /**
     * Key used for specifying the version of the view that generated the virtual structure for
     * itself and its children
     *
     * For example, if the virtual structure is generated by a webview of version "104.0.5112.69",
     * then the value should be "104.0.5112.69"
     *
     * @hide
     * <p>For example, if the virtual structure is generated by a webview of version
     * "104.0.5112.69", then the value should be "104.0.5112.69"
     */
    @FlaggedApi(FLAG_AUTOFILL_W_METRICS)
    public static final String EXTRA_VIRTUAL_STRUCTURE_VERSION_NUMBER =
            "android.view.ViewStructure.extra.VIRTUAL_STRUCTURE_VERSION_NUMBER";

Loading