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

Commit 932d7b50 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Added android.service.contentcapture.ActivityEvent.TYPE_ACTIVITY_STOPPED"

parents 054834f1 77670596
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6430,6 +6430,7 @@ package android.service.contentcapture {
    field @NonNull public static final android.os.Parcelable.Creator<android.service.contentcapture.ActivityEvent> CREATOR;
    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
  }
  public abstract class ContentCaptureService extends android.app.Service {
+1 −0
Original line number Diff line number Diff line
@@ -2396,6 +2396,7 @@ package android.service.contentcapture {
    field @NonNull public static final android.os.Parcelable.Creator<android.service.contentcapture.ActivityEvent> CREATOR;
    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
  }

  public abstract class ContentCaptureService extends android.app.Service {
+9 −1
Original line number Diff line number Diff line
@@ -47,10 +47,16 @@ public final class ActivityEvent implements Parcelable {
     */
    public static final int TYPE_ACTIVITY_PAUSED = Event.ACTIVITY_PAUSED;

    /**
     * The activity stopped.
     */
    public static final int TYPE_ACTIVITY_STOPPED = Event.ACTIVITY_STOPPED;

    /** @hide */
    @IntDef(prefix = { "TYPE_" }, value = {
            TYPE_ACTIVITY_RESUMED,
            TYPE_ACTIVITY_PAUSED
            TYPE_ACTIVITY_PAUSED,
            TYPE_ACTIVITY_STOPPED
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface ActivityEventType{}
@@ -89,6 +95,8 @@ public final class ActivityEvent implements Parcelable {
                return "ACTIVITY_RESUMED";
            case TYPE_ACTIVITY_PAUSED:
                return "ACTIVITY_PAUSED";
            case TYPE_ACTIVITY_STOPPED:
                return "ACTIVITY_STOPPED";
            default:
                return "UKNOWN_TYPE: " + type;
        }
+2 −2
Original line number Diff line number Diff line
@@ -2934,8 +2934,8 @@ public class ActivityManagerService extends IActivityManager.Stub
                        taskRoot);
            }
        }
        if (mContentCaptureService != null
                && (event == Event.ACTIVITY_PAUSED || event == Event.ACTIVITY_RESUMED)) {
        if (mContentCaptureService != null && (event == Event.ACTIVITY_PAUSED
                || event == Event.ACTIVITY_RESUMED || event == Event.ACTIVITY_STOPPED)) {
            mContentCaptureService.notifyActivityEvent(userId, activity, event);
        }
    }