Add isSmallBatteryDevice flag to ActivityManager.

Bug: 37351903
Change-Id: I6fed08c35474b10987388070eafb7b16e6944638
(cherry picked from commit 15eb998e65)
This commit is contained in:
Michael Kwan
2017-04-14 12:34:46 -07:00
parent dfdcc65dc3
commit 10efdc0abf
2 changed files with 14 additions and 0 deletions

View File

@@ -1111,6 +1111,18 @@ public class ActivityManager {
return RoSystemProperties.CONFIG_LOW_RAM;
}
/**
* Returns true if this is a small battery device. Exactly whether a device is considered to be
* small battery is ultimately up to the device configuration, but currently it generally means
* something in the class of a device with 1000 mAh or less. This is mostly intended to be used
* to determine whether certain features should be altered to account for a drastically smaller
* battery.
* @hide
*/
public static boolean isSmallBatteryDevice() {
return RoSystemProperties.CONFIG_SMALL_BATTERY;
}
/**
* Used by persistent processes to determine if they are running on a
* higher-end device so should be okay using hardware drawing acceleration