Loading api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -37082,13 +37082,14 @@ package android.service.autofill { public final class FillEventHistory implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); method public deprecated android.os.Bundle getClientState(); method public java.util.List<android.service.autofill.FillEventHistory.Event> getEvents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.service.autofill.FillEventHistory> CREATOR; } public static final class FillEventHistory.Event { method public android.os.Bundle getClientState(); method public java.lang.String getDatasetId(); method public int getType(); field public static final int TYPE_AUTHENTICATION_SELECTED = 2; // 0x2 api/system-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -40173,13 +40173,14 @@ package android.service.autofill { public final class FillEventHistory implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); method public deprecated android.os.Bundle getClientState(); method public java.util.List<android.service.autofill.FillEventHistory.Event> getEvents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.service.autofill.FillEventHistory> CREATOR; } public static final class FillEventHistory.Event { method public android.os.Bundle getClientState(); method public java.lang.String getDatasetId(); method public int getType(); field public static final int TYPE_AUTHENTICATION_SELECTED = 2; // 0x2 api/test-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -37280,13 +37280,14 @@ package android.service.autofill { public final class FillEventHistory implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); method public deprecated android.os.Bundle getClientState(); method public java.util.List<android.service.autofill.FillEventHistory.Event> getEvents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.service.autofill.FillEventHistory> CREATOR; } public static final class FillEventHistory.Event { method public android.os.Bundle getClientState(); method public java.lang.String getDatasetId(); method public int getType(); field public static final int TYPE_AUTHENTICATION_SELECTED = 2; // 0x2 core/java/android/service/autofill/FillEventHistory.java +23 −4 Original line number Diff line number Diff line Loading @@ -81,10 +81,13 @@ public final class FillEventHistory implements Parcelable { /** * Returns the client state set in the previous {@link FillResponse}. * * <p><b>NOTE: </b>the state is associated with the app that was autofilled in the previous * <p><b>Note: </b>the state is associated with the app that was autofilled in the previous * {@link AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)} * , which is not necessary the same app being autofilled now. * * @deprecated use {@link #getEvents()} then {@link Event#getClientState()} instead. */ @Deprecated @Nullable public Bundle getClientState() { return mClientState; } Loading Loading @@ -126,7 +129,6 @@ public final class FillEventHistory implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeBundle(mClientState); if (mEvents == null) { dest.writeInt(0); } else { Loading @@ -137,6 +139,7 @@ public final class FillEventHistory implements Parcelable { Event event = mEvents.get(i); dest.writeInt(event.getType()); dest.writeString(event.getDatasetId()); dest.writeBundle(event.getClientState()); } } } Loading Loading @@ -177,6 +180,7 @@ public final class FillEventHistory implements Parcelable { @EventIds private final int mEventType; @Nullable private final String mDatasetId; @Nullable private final Bundle mClientState; /** * Returns the type of the event. Loading @@ -196,19 +200,33 @@ public final class FillEventHistory implements Parcelable { return mDatasetId; } /** * Returns the client state from the {@link FillResponse} used to generate this event. * * <p><b>Note: </b>the state is associated with the app that was autofilled in the previous * {@link * AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)}, * which is not necessary the same app being autofilled now. */ @Nullable public Bundle getClientState() { return mClientState; } /** * Creates a new event. * * @param eventType The type of the event * @param datasetId The dataset the event was on, or {@code null} if the event was on the * whole response. * @param clientState The client state associated with the event. * * @hide */ public Event(int eventType, String datasetId) { public Event(int eventType, @Nullable String datasetId, @Nullable Bundle clientState) { mEventType = Preconditions.checkArgumentInRange(eventType, 0, TYPE_SAVE_SHOWN, "eventType"); mDatasetId = datasetId; mClientState = clientState; } } Loading @@ -220,7 +238,8 @@ public final class FillEventHistory implements Parcelable { int numEvents = parcel.readInt(); for (int i = 0; i < numEvents; i++) { selection.addEvent(new Event(parcel.readInt(), parcel.readString())); selection.addEvent(new Event(parcel.readInt(), parcel.readString(), parcel.readBundle())); } return selection; Loading services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java +13 −8 Original line number Diff line number Diff line Loading @@ -522,10 +522,11 @@ final class AutofillManagerServiceImpl { /** * Updates the last fill selection when an authentication was selected. */ void setAuthenticationSelected(int sessionId) { void setAuthenticationSelected(int sessionId, @Nullable Bundle clientState) { synchronized (mLock) { if (isValidEventLocked("setAuthenticationSelected()", sessionId)) { mEventHistory.addEvent(new Event(Event.TYPE_AUTHENTICATION_SELECTED, null)); mEventHistory .addEvent(new Event(Event.TYPE_AUTHENTICATION_SELECTED, null, clientState)); } } } Loading @@ -533,11 +534,13 @@ final class AutofillManagerServiceImpl { /** * Updates the last fill selection when an dataset authentication was selected. */ void setDatasetAuthenticationSelected(@Nullable String selectedDataset, int sessionId) { void setDatasetAuthenticationSelected(@Nullable String selectedDataset, int sessionId, @Nullable Bundle clientState) { synchronized (mLock) { if (isValidEventLocked("setDatasetAuthenticationSelected()", sessionId)) { mEventHistory.addEvent( new Event(Event.TYPE_DATASET_AUTHENTICATION_SELECTED, selectedDataset)); new Event(Event.TYPE_DATASET_AUTHENTICATION_SELECTED, selectedDataset, clientState)); } } } Loading @@ -545,10 +548,10 @@ final class AutofillManagerServiceImpl { /** * Updates the last fill selection when an save Ui is shown. */ void setSaveShown(int sessionId) { void setSaveShown(int sessionId, @Nullable Bundle clientState) { synchronized (mLock) { if (isValidEventLocked("setSaveShown()", sessionId)) { mEventHistory.addEvent(new Event(Event.TYPE_SAVE_SHOWN, null)); mEventHistory.addEvent(new Event(Event.TYPE_SAVE_SHOWN, null, clientState)); } } } Loading @@ -556,10 +559,12 @@ final class AutofillManagerServiceImpl { /** * Updates the last fill response when a dataset was selected. */ void setDatasetSelected(@Nullable String selectedDataset, int sessionId) { void setDatasetSelected(@Nullable String selectedDataset, int sessionId, @Nullable Bundle clientState) { synchronized (mLock) { if (isValidEventLocked("setDatasetSelected()", sessionId)) { mEventHistory.addEvent(new Event(Event.TYPE_DATASET_SELECTED, selectedDataset)); mEventHistory.addEvent( new Event(Event.TYPE_DATASET_SELECTED, selectedDataset, clientState)); } } } Loading Loading
api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -37082,13 +37082,14 @@ package android.service.autofill { public final class FillEventHistory implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); method public deprecated android.os.Bundle getClientState(); method public java.util.List<android.service.autofill.FillEventHistory.Event> getEvents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.service.autofill.FillEventHistory> CREATOR; } public static final class FillEventHistory.Event { method public android.os.Bundle getClientState(); method public java.lang.String getDatasetId(); method public int getType(); field public static final int TYPE_AUTHENTICATION_SELECTED = 2; // 0x2
api/system-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -40173,13 +40173,14 @@ package android.service.autofill { public final class FillEventHistory implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); method public deprecated android.os.Bundle getClientState(); method public java.util.List<android.service.autofill.FillEventHistory.Event> getEvents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.service.autofill.FillEventHistory> CREATOR; } public static final class FillEventHistory.Event { method public android.os.Bundle getClientState(); method public java.lang.String getDatasetId(); method public int getType(); field public static final int TYPE_AUTHENTICATION_SELECTED = 2; // 0x2
api/test-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -37280,13 +37280,14 @@ package android.service.autofill { public final class FillEventHistory implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); method public deprecated android.os.Bundle getClientState(); method public java.util.List<android.service.autofill.FillEventHistory.Event> getEvents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.service.autofill.FillEventHistory> CREATOR; } public static final class FillEventHistory.Event { method public android.os.Bundle getClientState(); method public java.lang.String getDatasetId(); method public int getType(); field public static final int TYPE_AUTHENTICATION_SELECTED = 2; // 0x2
core/java/android/service/autofill/FillEventHistory.java +23 −4 Original line number Diff line number Diff line Loading @@ -81,10 +81,13 @@ public final class FillEventHistory implements Parcelable { /** * Returns the client state set in the previous {@link FillResponse}. * * <p><b>NOTE: </b>the state is associated with the app that was autofilled in the previous * <p><b>Note: </b>the state is associated with the app that was autofilled in the previous * {@link AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)} * , which is not necessary the same app being autofilled now. * * @deprecated use {@link #getEvents()} then {@link Event#getClientState()} instead. */ @Deprecated @Nullable public Bundle getClientState() { return mClientState; } Loading Loading @@ -126,7 +129,6 @@ public final class FillEventHistory implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeBundle(mClientState); if (mEvents == null) { dest.writeInt(0); } else { Loading @@ -137,6 +139,7 @@ public final class FillEventHistory implements Parcelable { Event event = mEvents.get(i); dest.writeInt(event.getType()); dest.writeString(event.getDatasetId()); dest.writeBundle(event.getClientState()); } } } Loading Loading @@ -177,6 +180,7 @@ public final class FillEventHistory implements Parcelable { @EventIds private final int mEventType; @Nullable private final String mDatasetId; @Nullable private final Bundle mClientState; /** * Returns the type of the event. Loading @@ -196,19 +200,33 @@ public final class FillEventHistory implements Parcelable { return mDatasetId; } /** * Returns the client state from the {@link FillResponse} used to generate this event. * * <p><b>Note: </b>the state is associated with the app that was autofilled in the previous * {@link * AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)}, * which is not necessary the same app being autofilled now. */ @Nullable public Bundle getClientState() { return mClientState; } /** * Creates a new event. * * @param eventType The type of the event * @param datasetId The dataset the event was on, or {@code null} if the event was on the * whole response. * @param clientState The client state associated with the event. * * @hide */ public Event(int eventType, String datasetId) { public Event(int eventType, @Nullable String datasetId, @Nullable Bundle clientState) { mEventType = Preconditions.checkArgumentInRange(eventType, 0, TYPE_SAVE_SHOWN, "eventType"); mDatasetId = datasetId; mClientState = clientState; } } Loading @@ -220,7 +238,8 @@ public final class FillEventHistory implements Parcelable { int numEvents = parcel.readInt(); for (int i = 0; i < numEvents; i++) { selection.addEvent(new Event(parcel.readInt(), parcel.readString())); selection.addEvent(new Event(parcel.readInt(), parcel.readString(), parcel.readBundle())); } return selection; Loading
services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java +13 −8 Original line number Diff line number Diff line Loading @@ -522,10 +522,11 @@ final class AutofillManagerServiceImpl { /** * Updates the last fill selection when an authentication was selected. */ void setAuthenticationSelected(int sessionId) { void setAuthenticationSelected(int sessionId, @Nullable Bundle clientState) { synchronized (mLock) { if (isValidEventLocked("setAuthenticationSelected()", sessionId)) { mEventHistory.addEvent(new Event(Event.TYPE_AUTHENTICATION_SELECTED, null)); mEventHistory .addEvent(new Event(Event.TYPE_AUTHENTICATION_SELECTED, null, clientState)); } } } Loading @@ -533,11 +534,13 @@ final class AutofillManagerServiceImpl { /** * Updates the last fill selection when an dataset authentication was selected. */ void setDatasetAuthenticationSelected(@Nullable String selectedDataset, int sessionId) { void setDatasetAuthenticationSelected(@Nullable String selectedDataset, int sessionId, @Nullable Bundle clientState) { synchronized (mLock) { if (isValidEventLocked("setDatasetAuthenticationSelected()", sessionId)) { mEventHistory.addEvent( new Event(Event.TYPE_DATASET_AUTHENTICATION_SELECTED, selectedDataset)); new Event(Event.TYPE_DATASET_AUTHENTICATION_SELECTED, selectedDataset, clientState)); } } } Loading @@ -545,10 +548,10 @@ final class AutofillManagerServiceImpl { /** * Updates the last fill selection when an save Ui is shown. */ void setSaveShown(int sessionId) { void setSaveShown(int sessionId, @Nullable Bundle clientState) { synchronized (mLock) { if (isValidEventLocked("setSaveShown()", sessionId)) { mEventHistory.addEvent(new Event(Event.TYPE_SAVE_SHOWN, null)); mEventHistory.addEvent(new Event(Event.TYPE_SAVE_SHOWN, null, clientState)); } } } Loading @@ -556,10 +559,12 @@ final class AutofillManagerServiceImpl { /** * Updates the last fill response when a dataset was selected. */ void setDatasetSelected(@Nullable String selectedDataset, int sessionId) { void setDatasetSelected(@Nullable String selectedDataset, int sessionId, @Nullable Bundle clientState) { synchronized (mLock) { if (isValidEventLocked("setDatasetSelected()", sessionId)) { mEventHistory.addEvent(new Event(Event.TYPE_DATASET_SELECTED, selectedDataset)); mEventHistory.addEvent( new Event(Event.TYPE_DATASET_SELECTED, selectedDataset, clientState)); } } } Loading