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

Commit 0552f41c authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Add new ContentCapture APIs to let apps change the ContentCaptureContext."

parents 2b00ad1e 4eecbe6e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -53476,6 +53476,7 @@ package android.view.contentcapture {
    method public void close();
    method @NonNull public final android.view.contentcapture.ContentCaptureSession createContentCaptureSession(@NonNull android.view.contentcapture.ContentCaptureContext);
    method public final void destroy();
    method @Nullable public final android.view.contentcapture.ContentCaptureContext getContentCaptureContext();
    method public final android.view.contentcapture.ContentCaptureSessionId getContentCaptureSessionId();
    method @NonNull public android.view.autofill.AutofillId newAutofillId(@NonNull android.view.autofill.AutofillId, long);
    method @NonNull public final android.view.ViewStructure newVirtualViewStructure(@NonNull android.view.autofill.AutofillId, long);
@@ -53483,6 +53484,7 @@ package android.view.contentcapture {
    method public final void notifyViewDisappeared(@NonNull android.view.autofill.AutofillId);
    method public final void notifyViewTextChanged(@NonNull android.view.autofill.AutofillId, @Nullable CharSequence);
    method public final void notifyViewsDisappeared(@NonNull android.view.autofill.AutofillId, @NonNull long[]);
    method public final void setContentCaptureContext(@Nullable android.view.contentcapture.ContentCaptureContext);
  }
  public final class ContentCaptureSessionId implements android.os.Parcelable {
+2 −0
Original line number Diff line number Diff line
@@ -9327,6 +9327,7 @@ package android.view.contentcapture {
  public final class ContentCaptureEvent implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public android.view.contentcapture.ContentCaptureContext getContentCaptureContext();
    method public long getEventTime();
    method @Nullable public android.view.autofill.AutofillId getId();
    method @Nullable public java.util.List<android.view.autofill.AutofillId> getIds();
@@ -9335,6 +9336,7 @@ package android.view.contentcapture {
    method @Nullable public android.view.contentcapture.ViewNode getViewNode();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.contentcapture.ContentCaptureEvent> CREATOR;
    field public static final int TYPE_CONTEXT_UPDATED = 6; // 0x6
    field public static final int TYPE_INITIAL_VIEW_TREE_APPEARED = 5; // 0x5
    field public static final int TYPE_INITIAL_VIEW_TREE_APPEARING = 4; // 0x4
    field public static final int TYPE_VIEW_APPEARED = 1; // 0x1
+2 −0
Original line number Diff line number Diff line
@@ -2726,6 +2726,7 @@ package android.view.contentcapture {

  public final class ContentCaptureEvent implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public android.view.contentcapture.ContentCaptureContext getContentCaptureContext();
    method public long getEventTime();
    method @Nullable public android.view.autofill.AutofillId getId();
    method @Nullable public java.util.List<android.view.autofill.AutofillId> getIds();
@@ -2734,6 +2735,7 @@ package android.view.contentcapture {
    method @Nullable public android.view.contentcapture.ViewNode getViewNode();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.view.contentcapture.ContentCaptureEvent> CREATOR;
    field public static final int TYPE_CONTEXT_UPDATED = 6; // 0x6
    field public static final int TYPE_INITIAL_VIEW_TREE_APPEARED = 5; // 0x5
    field public static final int TYPE_INITIAL_VIEW_TREE_APPEARING = 4; // 0x4
    field public static final int TYPE_VIEW_APPEARED = 1; // 0x1
+3 −3
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ public abstract class ContentCaptureService extends Service {
            }
            switch (event.getType()) {
                case ContentCaptureEvent.TYPE_SESSION_STARTED:
                    final ContentCaptureContext clientContext = event.getClientContext();
                    final ContentCaptureContext clientContext = event.getContentCaptureContext();
                    clientContext.setParentSessionId(event.getParentSessionId());
                    mSessionUids.put(sessionIdString, uid);
                    onCreateContentCaptureSession(clientContext, sessionId);
@@ -383,8 +383,8 @@ public abstract class ContentCaptureService extends Service {
        }
        final Integer rightUid = mSessionUids.get(sessionId);
        if (rightUid == null) {
            if (DEBUG) {
                Log.d(TAG, "handleIsRightCallerFor(" + event + "): no session for " + sessionId
            if (VERBOSE) {
                Log.v(TAG, "handleIsRightCallerFor(" + event + "): no session for " + sessionId
                        + ": " + mSessionUids);
            }
            // Just ignore, as the session could have been finished already
+1 −1
Original line number Diff line number Diff line
@@ -9487,7 +9487,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * Gets the session used to notify Content Capture events.
     *
     * @return session explicitly set by {@link #setContentCaptureSession(ContentCaptureSession)},
     * inherited by ancestore, default session or {@code null} if content capture is disabled for
     * inherited by ancestors, default session or {@code null} if content capture is disabled for
     * this view.
     */
    @Nullable
Loading