Added standby bucket names

This commit is contained in:
M66B
2021-08-18 20:43:25 +02:00
parent 03e2013ab1
commit 5657b35069
2 changed files with 21 additions and 1 deletions

View File

@@ -1766,7 +1766,9 @@ public class Log {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
UsageStatsManager usm = (UsageStatsManager) context.getSystemService(Context.USAGE_STATS_SERVICE);
int bucket = usm.getAppStandbyBucket();
sb.append(String.format("Standby bucket: %d\r\n", bucket));
boolean inactive = usm.isAppInactive(BuildConfig.APPLICATION_ID);
sb.append(String.format("Standby bucket: %d-%s;p inactive: %b\r\n",
bucket, Helper.getStandbyBucketName(bucket), inactive));
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)