/**@class android.service.autofill.FillEventHistory.Event @extends java.lang.Object Description of an event that occured after the latest call to {@link android.service.autofill.FillCallback#onSuccess(FillResponse)}. */ var Event = { /** A dataset was selected. The dataset selected can be read from {@link #getDatasetId}(). <p><b>Note: </b>on Android {@link android.os.Build.VERSION_CODES#O}, this event was also incorrectly reported after a {@link android.service.autofill.Dataset.Builder#setAuthentication(IntentSender) dataset authentication} was selected and the service returned a dataset in the {@link AutofillManager#EXTRA_AUTHENTICATION_RESULT} of the activity launched from that {@link IntentSender}. This behavior was fixed on Android {@link android.os.Build.VERSION_CODES#O_MR1}. */ TYPE_DATASET_SELECTED : "0", /** A {@link android.service.autofill.Dataset.Builder#setAuthentication(IntentSender) dataset authentication} was selected. The dataset authenticated can be read from {@link #getDatasetId}(). */ TYPE_DATASET_AUTHENTICATION_SELECTED : "1", /** A {@link android.service.autofill.FillResponse.Builder#setAuthentication(android.view.autofill.AutofillId[], IntentSender, android.widget.RemoteViews) fill response authentication} was selected. */ TYPE_AUTHENTICATION_SELECTED : "2", /**A save UI was shown. */ TYPE_SAVE_SHOWN : "3", /** A committed autofill context for which the autofill service provided datasets. <p>This event is useful to track: <ul> <li>Which datasets (if any) were selected by the user ({@link #getSelectedDatasetIds}()). <li>Which datasets (if any) were NOT selected by the user ({@link #getIgnoredDatasetIds}()). <li>Which fields in the selected datasets were changed by the user after the dataset was selected ({@link #getChangedFields}(). <li>Which fields match the {@link android.service.autofill.UserData} set by the service. </ul> <p><b>Note: </b>This event is only generated when: <ul> <li>The autofill context is committed. <li>The service provides at least one dataset in the {@link android.service.autofill.FillResponse fill responses} associated with the context. <li>The last {@link android.service.autofill.FillResponse fill responses} associated with the context has the {@link android.service.autofill.FillResponse#FLAG_TRACK_CONTEXT_COMMITED} flag. </ul> <p>See {@link android.view.autofill.AutofillManager} for more information about autofill contexts. */ TYPE_CONTEXT_COMMITTED : "4", /**Returns the type of the event. @return {Number} The type of the event */ getType : function( ) {}, /**Returns the id of dataset the id was on. @return {String} The id of dataset, or {@code null} the event is not associated with a dataset. */ getDatasetId : function( ) {}, /**Returns the client state from the {@link android.service.autofill.FillResponse} used to generate this event. <p><b>Note: </b>the state is associated with the app that was autofilled in the previous {@link android.service.autofill.AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal, FillCallback)}, which is not necessary the same app being autofilled now. */ getClientState : function( ) {}, /**Returns which datasets were selected by the user. <p><b>Note: </b>Only set on events of type {@link #TYPE_CONTEXT_COMMITTED}. */ getSelectedDatasetIds : function( ) {}, /**Returns which datasets were NOT selected by the user. <p><b>Note: </b>Only set on events of type {@link #TYPE_CONTEXT_COMMITTED}. */ getIgnoredDatasetIds : function( ) {}, /**Returns which fields in the selected datasets were changed by the user after the dataset was selected. <p>For example, server provides: <pre class="prettyprint"> FillResponse response = new FillResponse.Builder() .addDataset(new Dataset.Builder(presentation1) .setId("4815") .setValue(usernameId, AutofillValue.forText("MrPlow")) .build()) .addDataset(new Dataset.Builder(presentation2) .setId("162342") .setValue(passwordId, AutofillValue.forText("D'OH")) .build()) .build(); </pre> <p>User select both datasets (for username and password) but after the fields are autofilled, user changes them to: <pre class="prettyprint"> username = "ElBarto"; password = "AyCaramba"; </pre> <p>Then the result is the following map: <pre class="prettyprint"> usernameId => "4815" passwordId => "162342" </pre> <p><b>Note: </b>Only set on events of type {@link #TYPE_CONTEXT_COMMITTED}. @return {Object {java.util.Map}} map map whose key is the id of the change fields, and value is the id of dataset that has that field and was selected by the user. */ getChangedFields : function( ) {}, /**Gets the <a href="AutofillService.html#FieldClassification">field classification</a> results. <p><b>Note: </b>Only set on events of type {@link #TYPE_CONTEXT_COMMITTED}, when the service requested {@link android.service.autofill.FillResponse.Builder#setFieldClassificationIds(AutofillId...) field classification}. */ getFieldsClassification : function( ) {}, /**Returns which fields were available on datasets provided by the service but manually entered by the user. <p>For example, server provides: <pre class="prettyprint"> FillResponse response = new FillResponse.Builder() .addDataset(new Dataset.Builder(presentation1) .setId("4815") .setValue(usernameId, AutofillValue.forText("MrPlow")) .setValue(passwordId, AutofillValue.forText("AyCaramba")) .build()) .addDataset(new Dataset.Builder(presentation2) .setId("162342") .setValue(usernameId, AutofillValue.forText("ElBarto")) .setValue(passwordId, AutofillValue.forText("D'OH")) .build()) .addDataset(new Dataset.Builder(presentation3) .setId("108") .setValue(usernameId, AutofillValue.forText("MrPlow")) .setValue(passwordId, AutofillValue.forText("D'OH")) .build()) .build(); </pre> <p>User doesn't select a dataset but manually enters: <pre class="prettyprint"> username = "MrPlow"; password = "D'OH"; </pre> <p>Then the result is the following map: <pre class="prettyprint"> usernameId => { "4815", "108"} passwordId => { "162342", "108" } </pre> <p><b>Note: </b>Only set on events of type {@link #TYPE_CONTEXT_COMMITTED}. @return {Object {java.util.Map}} map map whose key is the id of the manually-entered field, and value is the ids of the datasets that have that value but were not selected by the user. */ getManuallyEnteredField : function( ) {}, /** */ toString : function( ) {}, };