Loading core/java/android/os/AggregateBatteryConsumer.java +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import java.io.PrintWriter; * * {@hide} */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public final class AggregateBatteryConsumer extends BatteryConsumer { static final int CONSUMER_TYPE_AGGREGATE = 0; Loading core/java/android/os/BatteryStats.java +62 −6 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.server.ServerProtoEnums; import android.service.batterystats.BatteryStatsServiceDumpHistoryProto; import android.service.batterystats.BatteryStatsServiceDumpProto; import android.telephony.CellSignalStrength; import android.telephony.ModemActivityInfo; import android.telephony.ServiceState; import android.telephony.TelephonyManager; import android.text.format.DateFormat; Loading Loading @@ -83,6 +84,7 @@ import java.util.Map; * except where indicated otherwise. * @hide */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public abstract class BatteryStats { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) Loading Loading @@ -463,6 +465,7 @@ public abstract class BatteryStats { /** * State for keeping track of long counting information. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public static abstract class LongCounter { /** Loading Loading @@ -2724,12 +2727,6 @@ public abstract class BatteryStats { */ public abstract int getMobileRadioActiveUnknownCount(int which); public static final int DATA_CONNECTION_OUT_OF_SERVICE = 0; public static final int DATA_CONNECTION_EMERGENCY_SERVICE = TelephonyManager.getAllNetworkTypes().length + 1; public static final int DATA_CONNECTION_OTHER = DATA_CONNECTION_EMERGENCY_SERVICE + 1; static final String[] DATA_CONNECTION_NAMES = { "oos", "gprs", "edge", "umts", "cdma", "evdo_0", "evdo_A", "1xrtt", "hsdpa", "hsupa", "hspa", "iden", "evdo_b", "lte", Loading @@ -2737,9 +2734,28 @@ public abstract class BatteryStats { "emngcy", "other" }; public static final int DATA_CONNECTION_OUT_OF_SERVICE = 0; public static final int DATA_CONNECTION_EMERGENCY_SERVICE = getEmergencyNetworkConnectionType(); public static final int DATA_CONNECTION_OTHER = DATA_CONNECTION_EMERGENCY_SERVICE + 1; @UnsupportedAppUsage public static final int NUM_DATA_CONNECTION_TYPES = DATA_CONNECTION_OTHER + 1; @android.ravenwood.annotation.RavenwoodReplace private static int getEmergencyNetworkConnectionType() { int count = TelephonyManager.getAllNetworkTypes().length; if (DATA_CONNECTION_NAMES.length != count + 3) { // oos, emngcy, other throw new IllegalStateException( "DATA_CONNECTION_NAMES length does not match network type count. " + "Expected: " + (count + 3) + ", actual:" + DATA_CONNECTION_NAMES.length); } return count + 1; } private static int getEmergencyNetworkConnectionType$ravenwood() { return DATA_CONNECTION_NAMES.length - 2; } /** * Returns the time in microseconds that the phone has been running with * the given data connection. Loading Loading @@ -9015,4 +9031,44 @@ public abstract class BatteryStats { (lhs, rhs) -> Double.compare(rhs.millisecondsPerPacket, lhs.millisecondsPerPacket)); return uidMobileRadioStats; } @android.ravenwood.annotation.RavenwoodReplace @VisibleForTesting protected static boolean isLowRamDevice() { return ActivityManager.isLowRamDeviceStatic(); } protected static boolean isLowRamDevice$ravenwood() { return false; } @android.ravenwood.annotation.RavenwoodReplace @VisibleForTesting protected static int getCellSignalStrengthLevelCount() { return CellSignalStrength.getNumSignalStrengthLevels(); } protected static int getCellSignalStrengthLevelCount$ravenwood() { return 5; } @android.ravenwood.annotation.RavenwoodReplace @VisibleForTesting protected static int getModemTxPowerLevelCount() { return ModemActivityInfo.getNumTxPowerLevels(); } protected static int getModemTxPowerLevelCount$ravenwood() { return 5; } @android.ravenwood.annotation.RavenwoodReplace @VisibleForTesting protected static boolean isKernelStatsAvailable() { return true; } protected static boolean isKernelStatsAvailable$ravenwood() { return false; } } core/java/android/os/BatteryUsageStats.java +1 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ import java.util.List; * * @hide */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public final class BatteryUsageStats implements Parcelable, Closeable { /** Loading core/java/android/os/BatteryUsageStatsQuery.java +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import java.lang.annotation.RetentionPolicy; * * @hide */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public final class BatteryUsageStatsQuery implements Parcelable { @NonNull Loading core/java/android/os/PowerComponents.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import java.io.PrintWriter; * * @hide */ @android.ravenwood.annotation.RavenwoodKeepWholeClass class PowerComponents { private final BatteryConsumer.BatteryConsumerData mData; Loading Loading
core/java/android/os/AggregateBatteryConsumer.java +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import java.io.PrintWriter; * * {@hide} */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public final class AggregateBatteryConsumer extends BatteryConsumer { static final int CONSUMER_TYPE_AGGREGATE = 0; Loading
core/java/android/os/BatteryStats.java +62 −6 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.server.ServerProtoEnums; import android.service.batterystats.BatteryStatsServiceDumpHistoryProto; import android.service.batterystats.BatteryStatsServiceDumpProto; import android.telephony.CellSignalStrength; import android.telephony.ModemActivityInfo; import android.telephony.ServiceState; import android.telephony.TelephonyManager; import android.text.format.DateFormat; Loading Loading @@ -83,6 +84,7 @@ import java.util.Map; * except where indicated otherwise. * @hide */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public abstract class BatteryStats { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) Loading Loading @@ -463,6 +465,7 @@ public abstract class BatteryStats { /** * State for keeping track of long counting information. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public static abstract class LongCounter { /** Loading Loading @@ -2724,12 +2727,6 @@ public abstract class BatteryStats { */ public abstract int getMobileRadioActiveUnknownCount(int which); public static final int DATA_CONNECTION_OUT_OF_SERVICE = 0; public static final int DATA_CONNECTION_EMERGENCY_SERVICE = TelephonyManager.getAllNetworkTypes().length + 1; public static final int DATA_CONNECTION_OTHER = DATA_CONNECTION_EMERGENCY_SERVICE + 1; static final String[] DATA_CONNECTION_NAMES = { "oos", "gprs", "edge", "umts", "cdma", "evdo_0", "evdo_A", "1xrtt", "hsdpa", "hsupa", "hspa", "iden", "evdo_b", "lte", Loading @@ -2737,9 +2734,28 @@ public abstract class BatteryStats { "emngcy", "other" }; public static final int DATA_CONNECTION_OUT_OF_SERVICE = 0; public static final int DATA_CONNECTION_EMERGENCY_SERVICE = getEmergencyNetworkConnectionType(); public static final int DATA_CONNECTION_OTHER = DATA_CONNECTION_EMERGENCY_SERVICE + 1; @UnsupportedAppUsage public static final int NUM_DATA_CONNECTION_TYPES = DATA_CONNECTION_OTHER + 1; @android.ravenwood.annotation.RavenwoodReplace private static int getEmergencyNetworkConnectionType() { int count = TelephonyManager.getAllNetworkTypes().length; if (DATA_CONNECTION_NAMES.length != count + 3) { // oos, emngcy, other throw new IllegalStateException( "DATA_CONNECTION_NAMES length does not match network type count. " + "Expected: " + (count + 3) + ", actual:" + DATA_CONNECTION_NAMES.length); } return count + 1; } private static int getEmergencyNetworkConnectionType$ravenwood() { return DATA_CONNECTION_NAMES.length - 2; } /** * Returns the time in microseconds that the phone has been running with * the given data connection. Loading Loading @@ -9015,4 +9031,44 @@ public abstract class BatteryStats { (lhs, rhs) -> Double.compare(rhs.millisecondsPerPacket, lhs.millisecondsPerPacket)); return uidMobileRadioStats; } @android.ravenwood.annotation.RavenwoodReplace @VisibleForTesting protected static boolean isLowRamDevice() { return ActivityManager.isLowRamDeviceStatic(); } protected static boolean isLowRamDevice$ravenwood() { return false; } @android.ravenwood.annotation.RavenwoodReplace @VisibleForTesting protected static int getCellSignalStrengthLevelCount() { return CellSignalStrength.getNumSignalStrengthLevels(); } protected static int getCellSignalStrengthLevelCount$ravenwood() { return 5; } @android.ravenwood.annotation.RavenwoodReplace @VisibleForTesting protected static int getModemTxPowerLevelCount() { return ModemActivityInfo.getNumTxPowerLevels(); } protected static int getModemTxPowerLevelCount$ravenwood() { return 5; } @android.ravenwood.annotation.RavenwoodReplace @VisibleForTesting protected static boolean isKernelStatsAvailable() { return true; } protected static boolean isKernelStatsAvailable$ravenwood() { return false; } }
core/java/android/os/BatteryUsageStats.java +1 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ import java.util.List; * * @hide */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public final class BatteryUsageStats implements Parcelable, Closeable { /** Loading
core/java/android/os/BatteryUsageStatsQuery.java +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import java.lang.annotation.RetentionPolicy; * * @hide */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public final class BatteryUsageStatsQuery implements Parcelable { @NonNull Loading
core/java/android/os/PowerComponents.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import java.io.PrintWriter; * * @hide */ @android.ravenwood.annotation.RavenwoodKeepWholeClass class PowerComponents { private final BatteryConsumer.BatteryConsumerData mData; Loading