Loading core/java/android/app/ActivityManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -1063,6 +1063,18 @@ public class ActivityManager { (Build.IS_DEBUGGABLE && DEVELOPMENT_FORCE_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 Loading core/java/com/android/internal/os/RoSystemProperties.java +2 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ public class RoSystemProperties { // ------ ro.config.* -------- // public static final boolean CONFIG_LOW_RAM = SystemProperties.getBoolean("ro.config.low_ram", false); public static final boolean CONFIG_SMALL_BATTERY = SystemProperties.getBoolean("ro.config.small_battery", false); // ------ ro.fw.* ------------ // public static final boolean FW_SYSTEM_USER_SPLIT = Loading Loading
core/java/android/app/ActivityManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -1063,6 +1063,18 @@ public class ActivityManager { (Build.IS_DEBUGGABLE && DEVELOPMENT_FORCE_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 Loading
core/java/com/android/internal/os/RoSystemProperties.java +2 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ public class RoSystemProperties { // ------ ro.config.* -------- // public static final boolean CONFIG_LOW_RAM = SystemProperties.getBoolean("ro.config.low_ram", false); public static final boolean CONFIG_SMALL_BATTERY = SystemProperties.getBoolean("ro.config.small_battery", false); // ------ ro.fw.* ------------ // public static final boolean FW_SYSTEM_USER_SPLIT = Loading