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

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

Merge "Unhiding APIs in UsageEvents for public use" into pi-dev

parents c6556e7c 4e12de81
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7419,12 +7419,14 @@ package android.app.usage {
    method public int getEventType();
    method public java.lang.String getPackageName();
    method public java.lang.String getShortcutId();
    method public int getStandbyBucket();
    method public long getTimeStamp();
    field public static final int CONFIGURATION_CHANGE = 5; // 0x5
    field public static final int MOVE_TO_BACKGROUND = 2; // 0x2
    field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
    field public static final int NONE = 0; // 0x0
    field public static final int SHORTCUT_INVOCATION = 8; // 0x8
    field public static final int STANDBY_BUCKET_CHANGED = 11; // 0xb
    field public static final int USER_INTERACTION = 7; // 0x7
  }
+0 −2
Original line number Diff line number Diff line
@@ -719,10 +719,8 @@ package android.app.usage {

  public static final class UsageEvents.Event {
    method public java.lang.String getNotificationChannelId();
    method public int getStandbyBucket();
    field public static final int NOTIFICATION_INTERRUPTION = 12; // 0xc
    field public static final int NOTIFICATION_SEEN = 10; // 0xa
    field public static final int STANDBY_BUCKET_CHANGED = 11; // 0xb
  }

  public final class UsageStatsManager {
+10 −8
Original line number Diff line number Diff line
@@ -109,11 +109,11 @@ public final class UsageEvents implements Parcelable {
        public static final int NOTIFICATION_SEEN = 10;

        /**
         * An event type denoting a change in App Standby Bucket. Additional bucket information
         * is contained in mBucketAndReason.
         * @hide
         * An event type denoting a change in App Standby Bucket. The new bucket can be
         * retrieved by calling {@link #getStandbyBucket()}.
         *
         * @see UsageStatsManager#getAppStandbyBucket()
         */
        @SystemApi
        public static final int STANDBY_BUCKET_CHANGED = 11;

        /**
@@ -254,8 +254,11 @@ public final class UsageEvents implements Parcelable {
        /**
         * The event type.
         *
         * See {@link #MOVE_TO_BACKGROUND}
         * See {@link #MOVE_TO_FOREGROUND}
         * @see #MOVE_TO_BACKGROUND
         * @see #MOVE_TO_FOREGROUND
         * @see #CONFIGURATION_CHANGE
         * @see #USER_INTERACTION
         * @see #STANDBY_BUCKET_CHANGED
         */
        public int getEventType() {
            return mEventType;
@@ -283,9 +286,8 @@ public final class UsageEvents implements Parcelable {
         * Returns the standby bucket of the app, if the event is of type
         * {@link #STANDBY_BUCKET_CHANGED}, otherwise returns 0.
         * @return the standby bucket associated with the event.
         * @hide
         *
         */
        @SystemApi
        public int getStandbyBucket() {
            return (mBucketAndReason & 0xFFFF0000) >>> 16;
        }