Loading core/java/android/service/autofill/Dataset.java +10 −2 Original line number Diff line number Diff line Loading @@ -150,8 +150,16 @@ public final class Dataset implements Parcelable { public String toString() { if (!sDebug) return super.toString(); return new StringBuilder("Dataset " + mId + " [") .append("fieldIds=").append(mFieldIds) final StringBuilder builder = new StringBuilder("Dataset[id="); if (mId == null) { builder.append("null"); } else { // Cannot disclose id because it could contain PII. builder.append(mId.length()).append("_chars"); } return builder .append(", fieldIds=").append(mFieldIds) .append(", fieldValues=").append(mFieldValues) .append(", fieldPresentations=") .append(mFieldPresentations == null ? 0 : mFieldPresentations.size()) Loading core/java/android/service/autofill/FillEventHistory.java +5 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,11 @@ public final class FillEventHistory implements Parcelable { mSessionId = sessionId; } @Override public String toString() { return mEvents == null ? "no events" : mEvents.toString(); } @Override public int describeContents() { return 0; Loading core/java/android/service/autofill/FillResponse.java +3 −3 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public final class FillResponse implements Parcelable { private FillResponse(@NonNull Builder builder) { mDatasets = (builder.mDatasets != null) ? new ParceledListSlice<>(builder.mDatasets) : null; mSaveInfo = builder.mSaveInfo; mClientState = builder.mCLientState; mClientState = builder.mClientState; mPresentation = builder.mPresentation; mAuthentication = builder.mAuthentication; mAuthenticationIds = builder.mAuthenticationIds; Loading Loading @@ -145,7 +145,7 @@ public final class FillResponse implements Parcelable { public static final class Builder { private ArrayList<Dataset> mDatasets; private SaveInfo mSaveInfo; private Bundle mCLientState; private Bundle mClientState; private RemoteViews mPresentation; private IntentSender mAuthentication; private AutofillId[] mAuthenticationIds; Loading Loading @@ -288,7 +288,7 @@ public final class FillResponse implements Parcelable { */ public Builder setClientState(@Nullable Bundle clientState) { throwIfDestroyed(); mCLientState = clientState; mClientState = clientState; return this; } Loading services/autofill/java/com/android/server/autofill/Session.java +7 −14 Original line number Diff line number Diff line Loading @@ -846,12 +846,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState * when necessary. */ public void logContextCommittedLocked() { if (mResponses == null) { if (sVerbose) Slog.v(TAG, "logContextCommittedLocked(): skipped (no responses)"); return; } final FillResponse lastResponse = getLastResponseLocked("logContextCommited()"); if (lastResponse == null) return; final FillResponse lastResponse = mResponses.valueAt(mResponses.size() -1); final int flags = lastResponse.getFlags(); if ((flags & FillResponse.FLAG_TRACK_CONTEXT_COMMITED) == 0) { if (sDebug) Slog.d(TAG, "logContextCommittedLocked(): ignored by flags " + flags); Loading Loading @@ -1599,11 +1596,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState * Checks whether a view should be ignored. */ private boolean isIgnoredLocked(AutofillId id) { if (mResponses == null || mResponses.size() == 0) { return false; } // Always check the latest response only final FillResponse response = mResponses.valueAt(mResponses.size() - 1); final FillResponse response = getLastResponseLocked(null); if (response == null) return false; return ArrayUtils.contains(response.getIgnoredIds(), id); } Loading Loading @@ -1680,13 +1676,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } private void updateTrackedIdsLocked() { if (mResponses == null || mResponses.size() == 0) { return; } // Only track the views of the last response as only those are reported back to the // service, see #showSaveLocked final FillResponse response = mResponses.valueAt(getLastResponseIndexLocked()); final FillResponse response = getLastResponseLocked(null); if (response == null) return; ArraySet<AutofillId> trackedViews = null; boolean saveOnAllViewsInvisible = false; Loading Loading
core/java/android/service/autofill/Dataset.java +10 −2 Original line number Diff line number Diff line Loading @@ -150,8 +150,16 @@ public final class Dataset implements Parcelable { public String toString() { if (!sDebug) return super.toString(); return new StringBuilder("Dataset " + mId + " [") .append("fieldIds=").append(mFieldIds) final StringBuilder builder = new StringBuilder("Dataset[id="); if (mId == null) { builder.append("null"); } else { // Cannot disclose id because it could contain PII. builder.append(mId.length()).append("_chars"); } return builder .append(", fieldIds=").append(mFieldIds) .append(", fieldValues=").append(mFieldValues) .append(", fieldPresentations=") .append(mFieldPresentations == null ? 0 : mFieldPresentations.size()) Loading
core/java/android/service/autofill/FillEventHistory.java +5 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,11 @@ public final class FillEventHistory implements Parcelable { mSessionId = sessionId; } @Override public String toString() { return mEvents == null ? "no events" : mEvents.toString(); } @Override public int describeContents() { return 0; Loading
core/java/android/service/autofill/FillResponse.java +3 −3 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public final class FillResponse implements Parcelable { private FillResponse(@NonNull Builder builder) { mDatasets = (builder.mDatasets != null) ? new ParceledListSlice<>(builder.mDatasets) : null; mSaveInfo = builder.mSaveInfo; mClientState = builder.mCLientState; mClientState = builder.mClientState; mPresentation = builder.mPresentation; mAuthentication = builder.mAuthentication; mAuthenticationIds = builder.mAuthenticationIds; Loading Loading @@ -145,7 +145,7 @@ public final class FillResponse implements Parcelable { public static final class Builder { private ArrayList<Dataset> mDatasets; private SaveInfo mSaveInfo; private Bundle mCLientState; private Bundle mClientState; private RemoteViews mPresentation; private IntentSender mAuthentication; private AutofillId[] mAuthenticationIds; Loading Loading @@ -288,7 +288,7 @@ public final class FillResponse implements Parcelable { */ public Builder setClientState(@Nullable Bundle clientState) { throwIfDestroyed(); mCLientState = clientState; mClientState = clientState; return this; } Loading
services/autofill/java/com/android/server/autofill/Session.java +7 −14 Original line number Diff line number Diff line Loading @@ -846,12 +846,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState * when necessary. */ public void logContextCommittedLocked() { if (mResponses == null) { if (sVerbose) Slog.v(TAG, "logContextCommittedLocked(): skipped (no responses)"); return; } final FillResponse lastResponse = getLastResponseLocked("logContextCommited()"); if (lastResponse == null) return; final FillResponse lastResponse = mResponses.valueAt(mResponses.size() -1); final int flags = lastResponse.getFlags(); if ((flags & FillResponse.FLAG_TRACK_CONTEXT_COMMITED) == 0) { if (sDebug) Slog.d(TAG, "logContextCommittedLocked(): ignored by flags " + flags); Loading Loading @@ -1599,11 +1596,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState * Checks whether a view should be ignored. */ private boolean isIgnoredLocked(AutofillId id) { if (mResponses == null || mResponses.size() == 0) { return false; } // Always check the latest response only final FillResponse response = mResponses.valueAt(mResponses.size() - 1); final FillResponse response = getLastResponseLocked(null); if (response == null) return false; return ArrayUtils.contains(response.getIgnoredIds(), id); } Loading Loading @@ -1680,13 +1676,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } private void updateTrackedIdsLocked() { if (mResponses == null || mResponses.size() == 0) { return; } // Only track the views of the last response as only those are reported back to the // service, see #showSaveLocked final FillResponse response = mResponses.valueAt(getLastResponseIndexLocked()); final FillResponse response = getLastResponseLocked(null); if (response == null) return; ArraySet<AutofillId> trackedViews = null; boolean saveOnAllViewsInvisible = false; Loading