* commit 'f0e5501e093c688cd293308e0aafc2b55326c255': Fix issue #22989030: Separate battery whitelists
This commit is contained in:
@@ -76,6 +76,13 @@ public abstract class UsageStatsManagerInternal {
|
||||
*/
|
||||
public abstract boolean isAppIdle(String packageName, int userId);
|
||||
|
||||
/**
|
||||
* Returns all of the uids for a given user where all packages associating with that uid
|
||||
* are in the app idle state -- there are no associated apps that are not idle. This means
|
||||
* all of the returned uids can be safely considered app idle.
|
||||
*/
|
||||
public abstract int[] getIdleUidsForUser(int userId);
|
||||
|
||||
/**
|
||||
* @return True if currently app idle parole mode is on. This means all idle apps are allow to
|
||||
* run for a short period of time.
|
||||
|
||||
@@ -22,10 +22,14 @@ import android.os.UserHandle;
|
||||
interface IDeviceIdleController {
|
||||
void addPowerSaveWhitelistApp(String name);
|
||||
void removePowerSaveWhitelistApp(String name);
|
||||
String[] getSystemPowerWhitelistExceptIdle();
|
||||
String[] getSystemPowerWhitelist();
|
||||
String[] getFullPowerWhitelistExceptIdle();
|
||||
String[] getFullPowerWhitelist();
|
||||
int[] getAppIdWhitelistExceptIdle();
|
||||
int[] getAppIdWhitelist();
|
||||
int[] getAppIdTempWhitelist();
|
||||
boolean isPowerSaveWhitelistExceptIdleApp(String name);
|
||||
boolean isPowerSaveWhitelistApp(String name);
|
||||
void addPowerSaveTempWhitelistApp(String name, long duration, int userId, String reason);
|
||||
long addPowerSaveTempWhitelistAppForMms(String name, int userId, String reason);
|
||||
|
||||
@@ -183,6 +183,14 @@ public class SparseIntArray implements Cloneable {
|
||||
return mValues[index];
|
||||
}
|
||||
|
||||
/**
|
||||
* Directly set the value at a particular index.
|
||||
* @hide
|
||||
*/
|
||||
public void setValueAt(int index, int value) {
|
||||
mValues[index] = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the index for which {@link #keyAt} would return the
|
||||
* specified key, or a negative number if the specified
|
||||
|
||||
Reference in New Issue
Block a user