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

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

Merge "New ContentCapture constant: ActivityEvent.TYPE_ACTIVITY_DESTROYED"

parents 0e6c7c9d 29eb0bc2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6429,6 +6429,7 @@ package android.service.contentcapture {
    method public int getEventType();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.contentcapture.ActivityEvent> CREATOR;
    field public static final int TYPE_ACTIVITY_DESTROYED = 24; // 0x18
    field public static final int TYPE_ACTIVITY_PAUSED = 2; // 0x2
    field public static final int TYPE_ACTIVITY_RESUMED = 1; // 0x1
    field public static final int TYPE_ACTIVITY_STOPPED = 23; // 0x17
+1 −0
Original line number Diff line number Diff line
@@ -2394,6 +2394,7 @@ package android.service.contentcapture {
    method public int getEventType();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.contentcapture.ActivityEvent> CREATOR;
    field public static final int TYPE_ACTIVITY_DESTROYED = 24; // 0x18
    field public static final int TYPE_ACTIVITY_PAUSED = 2; // 0x2
    field public static final int TYPE_ACTIVITY_RESUMED = 1; // 0x1
    field public static final int TYPE_ACTIVITY_STOPPED = 23; // 0x17
+11 −2
Original line number Diff line number Diff line
@@ -52,11 +52,17 @@ public final class ActivityEvent implements Parcelable {
     */
    public static final int TYPE_ACTIVITY_STOPPED = Event.ACTIVITY_STOPPED;

    /**
     * The activity was destroyed.
     */
    public static final int TYPE_ACTIVITY_DESTROYED = Event.ACTIVITY_DESTROYED;

    /** @hide */
    @IntDef(prefix = { "TYPE_" }, value = {
            TYPE_ACTIVITY_RESUMED,
            TYPE_ACTIVITY_PAUSED,
            TYPE_ACTIVITY_STOPPED
            TYPE_ACTIVITY_STOPPED,
            TYPE_ACTIVITY_DESTROYED
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface ActivityEventType{}
@@ -81,7 +87,8 @@ public final class ActivityEvent implements Parcelable {
    /**
     * Gets the event type.
     *
     * @return either {@link #TYPE_ACTIVITY_RESUMED} or {@value #TYPE_ACTIVITY_PAUSED}.
     * @return either {@link #TYPE_ACTIVITY_RESUMED}, {@value #TYPE_ACTIVITY_PAUSED},
     * {@value #TYPE_ACTIVITY_STOPPED}, or {@value #TYPE_ACTIVITY_DESTROYED}.
     */
    @ActivityEventType
    public int getEventType() {
@@ -97,6 +104,8 @@ public final class ActivityEvent implements Parcelable {
                return "ACTIVITY_PAUSED";
            case TYPE_ACTIVITY_STOPPED:
                return "ACTIVITY_STOPPED";
            case TYPE_ACTIVITY_DESTROYED:
                return "ACTIVITY_DESTROYED";
            default:
                return "UKNOWN_TYPE: " + type;
        }
+2 −1
Original line number Diff line number Diff line
@@ -2937,7 +2937,8 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
        }
        if (mContentCaptureService != null && (event == Event.ACTIVITY_PAUSED
                || event == Event.ACTIVITY_RESUMED || event == Event.ACTIVITY_STOPPED)) {
                || event == Event.ACTIVITY_RESUMED || event == Event.ACTIVITY_STOPPED
                || event == Event.ACTIVITY_DESTROYED)) {
            mContentCaptureService.notifyActivityEvent(userId, activity, event);
        }
    }