mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Added standby bucket names
This commit is contained in:
@@ -26,6 +26,7 @@ import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.KeyguardManager;
|
||||
import android.app.usage.UsageStatsManager;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentResolver;
|
||||
@@ -546,6 +547,23 @@ public class Helper {
|
||||
}
|
||||
}
|
||||
|
||||
static String getStandbyBucketName(int bucket) {
|
||||
switch (bucket) {
|
||||
case UsageStatsManager.STANDBY_BUCKET_ACTIVE:
|
||||
return "active";
|
||||
case UsageStatsManager.STANDBY_BUCKET_WORKING_SET:
|
||||
return "workingset";
|
||||
case UsageStatsManager.STANDBY_BUCKET_FREQUENT:
|
||||
return "frequent";
|
||||
case UsageStatsManager.STANDBY_BUCKET_RARE:
|
||||
return "rare";
|
||||
case UsageStatsManager.STANDBY_BUCKET_RESTRICTED:
|
||||
return "restricted";
|
||||
default:
|
||||
return Integer.toString(bucket);
|
||||
}
|
||||
}
|
||||
|
||||
// View
|
||||
|
||||
static Intent getChooser(Context context, Intent intent) {
|
||||
|
||||
Reference in New Issue
Block a user