Merge "Logging UI type within TYPE_AUTHENTICATION_SELECTED" into tm-qpr-dev
This commit is contained in:
@@ -766,12 +766,14 @@ final class AutofillManagerServiceImpl
|
||||
/**
|
||||
* Updates the last fill selection when an authentication was selected.
|
||||
*/
|
||||
void setAuthenticationSelected(int sessionId, @Nullable Bundle clientState) {
|
||||
void setAuthenticationSelected(int sessionId, @Nullable Bundle clientState,
|
||||
int uiType) {
|
||||
synchronized (mLock) {
|
||||
if (isValidEventLocked("setAuthenticationSelected()", sessionId)) {
|
||||
mEventHistory.addEvent(
|
||||
new Event(Event.TYPE_AUTHENTICATION_SELECTED, null, clientState, null, null,
|
||||
null, null, null, null, null, null));
|
||||
null, null, null, null, null, null,
|
||||
NO_SAVE_UI_REASON_NONE, uiType));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -780,12 +782,13 @@ final class AutofillManagerServiceImpl
|
||||
* Updates the last fill selection when an dataset authentication was selected.
|
||||
*/
|
||||
void logDatasetAuthenticationSelected(@Nullable String selectedDataset, int sessionId,
|
||||
@Nullable Bundle clientState) {
|
||||
@Nullable Bundle clientState, int uiType) {
|
||||
synchronized (mLock) {
|
||||
if (isValidEventLocked("logDatasetAuthenticationSelected()", sessionId)) {
|
||||
mEventHistory.addEvent(
|
||||
new Event(Event.TYPE_DATASET_AUTHENTICATION_SELECTED, selectedDataset,
|
||||
clientState, null, null, null, null, null, null, null, null));
|
||||
clientState, null, null, null, null, null, null, null, null,
|
||||
NO_SAVE_UI_REASON_NONE, uiType));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -806,13 +809,13 @@ final class AutofillManagerServiceImpl
|
||||
* Updates the last fill response when a dataset was selected.
|
||||
*/
|
||||
void logDatasetSelected(@Nullable String selectedDataset, int sessionId,
|
||||
@Nullable Bundle clientState, int presentationType) {
|
||||
@Nullable Bundle clientState, int uiType) {
|
||||
synchronized (mLock) {
|
||||
if (isValidEventLocked("logDatasetSelected()", sessionId)) {
|
||||
mEventHistory.addEvent(
|
||||
new Event(Event.TYPE_DATASET_SELECTED, selectedDataset, clientState, null,
|
||||
null, null, null, null, null, null, null, NO_SAVE_UI_REASON_NONE,
|
||||
presentationType));
|
||||
uiType));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -820,13 +823,13 @@ final class AutofillManagerServiceImpl
|
||||
/**
|
||||
* Updates the last fill response when a dataset is shown.
|
||||
*/
|
||||
void logDatasetShown(int sessionId, @Nullable Bundle clientState, int presentationType) {
|
||||
void logDatasetShown(int sessionId, @Nullable Bundle clientState, int uiType) {
|
||||
synchronized (mLock) {
|
||||
if (isValidEventLocked("logDatasetShown", sessionId)) {
|
||||
mEventHistory.addEvent(
|
||||
new Event(Event.TYPE_DATASETS_SHOWN, null, clientState, null, null, null,
|
||||
null, null, null, null, null, NO_SAVE_UI_REASON_NONE,
|
||||
presentationType));
|
||||
uiType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1396,7 +1396,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
|
||||
// AutoFillUiCallback
|
||||
@Override
|
||||
public void authenticate(int requestId, int datasetIndex, IntentSender intent, Bundle extras,
|
||||
boolean authenticateInline) {
|
||||
int uiType) {
|
||||
if (sDebug) {
|
||||
Slog.d(TAG, "authenticate(): requestId=" + requestId + "; datasetIdx=" + datasetIndex
|
||||
+ "; intentSender=" + intent);
|
||||
@@ -1415,12 +1415,13 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
|
||||
}
|
||||
}
|
||||
|
||||
mService.setAuthenticationSelected(id, mClientState);
|
||||
mService.setAuthenticationSelected(id, mClientState, uiType);
|
||||
|
||||
final int authenticationId = AutofillManager.makeAuthenticationId(requestId, datasetIndex);
|
||||
mHandler.sendMessage(obtainMessage(
|
||||
Session::startAuthentication,
|
||||
this, authenticationId, intent, fillInIntent, authenticateInline));
|
||||
this, authenticationId, intent, fillInIntent,
|
||||
/* authenticateInline= */ uiType == UI_TYPE_INLINE));
|
||||
}
|
||||
|
||||
// AutoFillUiCallback
|
||||
@@ -3455,7 +3456,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
|
||||
public void authenticate(int requestId, int datasetIndex) {
|
||||
Session.this.authenticate(response.getRequestId(), datasetIndex,
|
||||
response.getAuthentication(), response.getClientState(),
|
||||
/* authenticateInline= */ true);
|
||||
UI_TYPE_INLINE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -3995,7 +3996,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
|
||||
}
|
||||
|
||||
// ...or handle authentication.
|
||||
mService.logDatasetAuthenticationSelected(dataset.getId(), id, mClientState);
|
||||
mService.logDatasetAuthenticationSelected(dataset.getId(), id, mClientState, uiType);
|
||||
setViewStatesLocked(null, dataset, ViewState.STATE_WAITING_DATASET_AUTH, false);
|
||||
final Intent fillInIntent = createAuthFillInIntentLocked(requestId, mClientState);
|
||||
if (fillInIntent == null) {
|
||||
|
||||
@@ -84,7 +84,7 @@ public final class AutoFillUI {
|
||||
|
||||
public interface AutoFillUiCallback {
|
||||
void authenticate(int requestId, int datasetIndex, @NonNull IntentSender intent,
|
||||
@Nullable Bundle extras, boolean authenticateInline);
|
||||
@Nullable Bundle extras, int uiType);
|
||||
void fill(int requestId, int datasetIndex, @NonNull Dataset dataset,
|
||||
@FillEventHistory.Event.UiType int uiType);
|
||||
void save();
|
||||
@@ -232,7 +232,7 @@ public final class AutoFillUI {
|
||||
mCallback.authenticate(response.getRequestId(),
|
||||
AutofillManager.AUTHENTICATION_ID_DATASET_ID_UNDEFINED,
|
||||
response.getAuthentication(), response.getClientState(),
|
||||
/* authenticateInline= */ false);
|
||||
UI_TYPE_MENU);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ public final class AutoFillUI {
|
||||
mCallback.authenticate(response.getRequestId(),
|
||||
AutofillManager.AUTHENTICATION_ID_DATASET_ID_UNDEFINED,
|
||||
response.getAuthentication(), response.getClientState(),
|
||||
/* authenticateInline= */ false);
|
||||
UI_TYPE_DIALOG);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user