Loading Android.bp +4 −8 Original line number Diff line number Diff line Loading @@ -100,6 +100,10 @@ filegroup { ":android.hardware.gnss-V2-java-source", ":android.hardware.graphics.common-V3-java-source", ":android.hardware.keymaster-V4-java-source", ":android.hardware.radio-V3-java-source", ":android.hardware.radio.data-V3-java-source", ":android.hardware.radio.network-V3-java-source", ":android.hardware.radio.voice-V3-java-source", ":android.hardware.security.keymint-V3-java-source", ":android.hardware.security.secureclock-V1-java-source", ":android.hardware.thermal-V1-java-source", Loading Loading @@ -212,12 +216,6 @@ java_library { "android.hardware.gnss-V1.0-java", "android.hardware.gnss-V2.1-java", "android.hardware.health-V1.0-java-constants", "android.hardware.radio-V1.0-java", "android.hardware.radio-V1.1-java", "android.hardware.radio-V1.2-java", "android.hardware.radio-V1.3-java", "android.hardware.radio-V1.4-java", "android.hardware.radio-V1.5-java", "android.hardware.radio-V1.6-java", "android.hardware.radio.data-V3-java", "android.hardware.radio.ims-V2-java", Loading Loading @@ -650,8 +648,6 @@ stubs_defaults { libs: [ "android.hardware.cas-V1.2-java", "android.hardware.health-V1.0-java-constants", "android.hardware.radio-V1.5-java", "android.hardware.radio-V1.6-java", "android.hardware.thermal-V1.0-java-constants", "android.hardware.thermal-V2.0-java", "android.hardware.tv.input-V1.0-java-constants", Loading services/tests/servicestests/src/com/android/server/power/stats/BatteryStatsNoteTest.java +22 −12 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import static org.mockito.Mockito.mock; import android.app.ActivityManager; import android.app.usage.NetworkStatsManager; import android.hardware.radio.V1_5.AccessNetwork; import android.os.BatteryStats; import android.os.BatteryStats.HistoryItem; import android.os.BatteryStats.Uid.Sensor; Loading Loading @@ -1727,27 +1726,38 @@ public class BatteryStatsNoteTest extends TestCase { } } specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.UNKNOWN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.UNKNOWN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.GERAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.GERAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.UTRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.UTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.EUTRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.CDMA2000, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.IWLAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.IWLAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MID, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, new int[txLevelCount], 0)); final ActivityStatsTechSpecificInfo[] specificInfos = specificInfoList.toArray( Loading services/tests/servicestests/src/com/android/server/power/stats/MobileRadioPowerCalculatorTest.java +17 −13 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import android.app.usage.NetworkStatsManager; import android.hardware.radio.V1_5.AccessNetwork; import android.net.NetworkCapabilities; import android.net.NetworkStats; import android.os.BatteryConsumer; Loading @@ -35,6 +34,7 @@ import android.os.BatteryStats; import android.os.BatteryUsageStatsQuery; import android.os.Process; import android.os.UidBatteryConsumer; import android.telephony.AccessNetworkConstants; import android.telephony.ActivityStatsTechSpecificInfo; import android.telephony.CellSignalStrength; import android.telephony.DataConnectionRealTimeInfo; Loading Loading @@ -248,22 +248,24 @@ public class MobileRadioPowerCalculatorTest { mStatsRule.setNetworkStats(networkStats); ActivityStatsTechSpecificInfo cdmaInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, AccessNetworkConstants.AccessNetworkType.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[]{10, 11, 12, 13, 14}, 15); ActivityStatsTechSpecificInfo lteInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, AccessNetworkConstants.AccessNetworkType.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[]{20, 21, 22, 23, 24}, 25); ActivityStatsTechSpecificInfo nrLowFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, new int[]{30, 31, 32, 33, 34}, 35); ActivityStatsTechSpecificInfo nrMidFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_MID, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MID, new int[]{40, 41, 42, 43, 44}, 45); ActivityStatsTechSpecificInfo nrHighFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, new int[]{50, 51, 52, 53, 54}, 55); ActivityStatsTechSpecificInfo nrMmwaveFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, new int[]{60, 61, 62, 63, 64}, 65); ActivityStatsTechSpecificInfo[] ratInfos = Loading Loading @@ -719,22 +721,24 @@ public class MobileRadioPowerCalculatorTest { mStatsRule.setNetworkStats(networkStats); ActivityStatsTechSpecificInfo cdmaInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, AccessNetworkConstants.AccessNetworkType.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[]{10, 11, 12, 13, 14}, 15); ActivityStatsTechSpecificInfo lteInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, AccessNetworkConstants.AccessNetworkType.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[]{20, 21, 22, 23, 24}, 25); ActivityStatsTechSpecificInfo nrLowFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, new int[]{30, 31, 32, 33, 34}, 35); ActivityStatsTechSpecificInfo nrMidFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_MID, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MID, new int[]{40, 41, 42, 43, 44}, 45); ActivityStatsTechSpecificInfo nrHighFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, new int[]{50, 51, 52, 53, 54}, 55); ActivityStatsTechSpecificInfo nrMmwaveFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, new int[]{60, 61, 62, 63, 64}, 65); ActivityStatsTechSpecificInfo[] ratInfos = Loading Loading
Android.bp +4 −8 Original line number Diff line number Diff line Loading @@ -100,6 +100,10 @@ filegroup { ":android.hardware.gnss-V2-java-source", ":android.hardware.graphics.common-V3-java-source", ":android.hardware.keymaster-V4-java-source", ":android.hardware.radio-V3-java-source", ":android.hardware.radio.data-V3-java-source", ":android.hardware.radio.network-V3-java-source", ":android.hardware.radio.voice-V3-java-source", ":android.hardware.security.keymint-V3-java-source", ":android.hardware.security.secureclock-V1-java-source", ":android.hardware.thermal-V1-java-source", Loading Loading @@ -212,12 +216,6 @@ java_library { "android.hardware.gnss-V1.0-java", "android.hardware.gnss-V2.1-java", "android.hardware.health-V1.0-java-constants", "android.hardware.radio-V1.0-java", "android.hardware.radio-V1.1-java", "android.hardware.radio-V1.2-java", "android.hardware.radio-V1.3-java", "android.hardware.radio-V1.4-java", "android.hardware.radio-V1.5-java", "android.hardware.radio-V1.6-java", "android.hardware.radio.data-V3-java", "android.hardware.radio.ims-V2-java", Loading Loading @@ -650,8 +648,6 @@ stubs_defaults { libs: [ "android.hardware.cas-V1.2-java", "android.hardware.health-V1.0-java-constants", "android.hardware.radio-V1.5-java", "android.hardware.radio-V1.6-java", "android.hardware.thermal-V1.0-java-constants", "android.hardware.thermal-V2.0-java", "android.hardware.tv.input-V1.0-java-constants", Loading
services/tests/servicestests/src/com/android/server/power/stats/BatteryStatsNoteTest.java +22 −12 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import static org.mockito.Mockito.mock; import android.app.ActivityManager; import android.app.usage.NetworkStatsManager; import android.hardware.radio.V1_5.AccessNetwork; import android.os.BatteryStats; import android.os.BatteryStats.HistoryItem; import android.os.BatteryStats.Uid.Sensor; Loading Loading @@ -1727,27 +1726,38 @@ public class BatteryStatsNoteTest extends TestCase { } } specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.UNKNOWN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.UNKNOWN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.GERAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.GERAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.UTRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.UTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.EUTRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.CDMA2000, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.IWLAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.IWLAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MID, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, new int[txLevelCount], 0)); specificInfoList.add(new ActivityStatsTechSpecificInfo(AccessNetwork.NGRAN, specificInfoList.add(new ActivityStatsTechSpecificInfo( AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, new int[txLevelCount], 0)); final ActivityStatsTechSpecificInfo[] specificInfos = specificInfoList.toArray( Loading
services/tests/servicestests/src/com/android/server/power/stats/MobileRadioPowerCalculatorTest.java +17 −13 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import android.app.usage.NetworkStatsManager; import android.hardware.radio.V1_5.AccessNetwork; import android.net.NetworkCapabilities; import android.net.NetworkStats; import android.os.BatteryConsumer; Loading @@ -35,6 +34,7 @@ import android.os.BatteryStats; import android.os.BatteryUsageStatsQuery; import android.os.Process; import android.os.UidBatteryConsumer; import android.telephony.AccessNetworkConstants; import android.telephony.ActivityStatsTechSpecificInfo; import android.telephony.CellSignalStrength; import android.telephony.DataConnectionRealTimeInfo; Loading Loading @@ -248,22 +248,24 @@ public class MobileRadioPowerCalculatorTest { mStatsRule.setNetworkStats(networkStats); ActivityStatsTechSpecificInfo cdmaInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, AccessNetworkConstants.AccessNetworkType.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[]{10, 11, 12, 13, 14}, 15); ActivityStatsTechSpecificInfo lteInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, AccessNetworkConstants.AccessNetworkType.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[]{20, 21, 22, 23, 24}, 25); ActivityStatsTechSpecificInfo nrLowFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, new int[]{30, 31, 32, 33, 34}, 35); ActivityStatsTechSpecificInfo nrMidFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_MID, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MID, new int[]{40, 41, 42, 43, 44}, 45); ActivityStatsTechSpecificInfo nrHighFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, new int[]{50, 51, 52, 53, 54}, 55); ActivityStatsTechSpecificInfo nrMmwaveFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, new int[]{60, 61, 62, 63, 64}, 65); ActivityStatsTechSpecificInfo[] ratInfos = Loading Loading @@ -719,22 +721,24 @@ public class MobileRadioPowerCalculatorTest { mStatsRule.setNetworkStats(networkStats); ActivityStatsTechSpecificInfo cdmaInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, AccessNetworkConstants.AccessNetworkType.CDMA2000, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[]{10, 11, 12, 13, 14}, 15); ActivityStatsTechSpecificInfo lteInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, AccessNetworkConstants.AccessNetworkType.EUTRAN, ServiceState.FREQUENCY_RANGE_UNKNOWN, new int[]{20, 21, 22, 23, 24}, 25); ActivityStatsTechSpecificInfo nrLowFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_LOW, new int[]{30, 31, 32, 33, 34}, 35); ActivityStatsTechSpecificInfo nrMidFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_MID, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MID, new int[]{40, 41, 42, 43, 44}, 45); ActivityStatsTechSpecificInfo nrHighFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_HIGH, new int[]{50, 51, 52, 53, 54}, 55); ActivityStatsTechSpecificInfo nrMmwaveFreqInfo = new ActivityStatsTechSpecificInfo( AccessNetwork.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, AccessNetworkConstants.AccessNetworkType.NGRAN, ServiceState.FREQUENCY_RANGE_MMWAVE, new int[]{60, 61, 62, 63, 64}, 65); ActivityStatsTechSpecificInfo[] ratInfos = Loading