summaryrefslogtreecommitdiff
path: root/android/app/usage/UsageEvents.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/app/usage/UsageEvents.java')
-rw-r--r--android/app/usage/UsageEvents.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/android/app/usage/UsageEvents.java b/android/app/usage/UsageEvents.java
index 84f57a30..503ca6c3 100644
--- a/android/app/usage/UsageEvents.java
+++ b/android/app/usage/UsageEvents.java
@@ -111,7 +111,7 @@ public final class UsageEvents implements Parcelable {
/**
* An event type denoting a change in App Standby Bucket. The new bucket can be
- * retrieved by calling {@link #getStandbyBucket()}.
+ * retrieved by calling {@link #getAppStandbyBucket()}.
*
* @see UsageStatsManager#getAppStandbyBucket()
*/
@@ -326,13 +326,23 @@ 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
*/
public int getStandbyBucket() {
return (mBucketAndReason & 0xFFFF0000) >>> 16;
}
/**
+ * 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.
+ *
+ */
+ public int getAppStandbyBucket() {
+ return (mBucketAndReason & 0xFFFF0000) >>> 16;
+ }
+
+ /**
* Returns the reason for the bucketing, if the event is of type
* {@link #STANDBY_BUCKET_CHANGED}, otherwise returns 0. Reason values include
* the main reason which is one of REASON_MAIN_*, OR'ed with REASON_SUB_*, if there