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

Commit 0a437342 authored by TYM Tsai's avatar TYM Tsai Committed by Automerger Merge Worker
Browse files

Merge "Logging UI type within TYPE_AUTHENTICATION_SELECTED" into tm-qpr-dev...

Merge "Logging UI type within TYPE_AUTHENTICATION_SELECTED" into tm-qpr-dev am: 8185a70f am: a3a76dad

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19660673



Change-Id: I0d862cfe2a1c9cfe8a34563b3a357ff8952d49ab
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e005e68a a3a76dad
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -770,12 +770,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));
            }
        }
    }
@@ -784,12 +786,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));
            }
        }
    }
@@ -810,13 +813,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));
            }
        }
    }
@@ -824,13 +827,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));
            }
        }
    }
+6 −5
Original line number Diff line number Diff line
@@ -1482,7 +1482,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);
@@ -1501,12 +1501,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
@@ -3591,7 +3592,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
@@ -4131,7 +4132,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) {
+3 −3
Original line number Diff line number Diff line
@@ -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);
                            }
                        }