Loading services/core/java/com/android/server/power/stats/processor/PhoneCallPowerStatsProcessor.java +17 −10 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,21 @@ class PhoneCallPowerStatsProcessor extends PowerStatsProcessor { mTmpDeviceStats = new long[mDescriptor.statsArrayLength]; mTmpDeviceStats = new long[mDescriptor.statsArrayLength]; } } private boolean unpackMobileRadioStatsDescriptor(PowerStats.Descriptor descriptor) { if (descriptor == null) { return false; } if (descriptor.equals(mMobileRadioStatsDescriptor)) { return true; } mMobileRadioStatsDescriptor = descriptor; mMobileRadioStatsLayout = new MobileRadioPowerStatsLayout(mMobileRadioStatsDescriptor); mTmpMobileRadioDeviceStats = new long[mMobileRadioStatsDescriptor.statsArrayLength]; return true; } @Override @Override void finish(PowerComponentAggregatedPowerStats stats, long timestampMs) { void finish(PowerComponentAggregatedPowerStats stats, long timestampMs) { stats.setPowerStatsDescriptor(mDescriptor); stats.setPowerStatsDescriptor(mDescriptor); Loading @@ -50,18 +65,10 @@ class PhoneCallPowerStatsProcessor extends PowerStatsProcessor { return; return; } } if (mMobileRadioStatsDescriptor == null) { if (!unpackMobileRadioStatsDescriptor(mobileRadioStats.getPowerStatsDescriptor())) { mMobileRadioStatsDescriptor = mobileRadioStats.getPowerStatsDescriptor(); if (mMobileRadioStatsDescriptor == null) { return; return; } } mMobileRadioStatsLayout = new MobileRadioPowerStatsLayout( mMobileRadioStatsDescriptor); mTmpMobileRadioDeviceStats = new long[mMobileRadioStatsDescriptor.statsArrayLength]; } MultiStateStats.States[] deviceStateConfig = MultiStateStats.States[] deviceStateConfig = mobileRadioStats.getConfig().getDeviceStateConfig(); mobileRadioStats.getConfig().getDeviceStateConfig(); Loading Loading
services/core/java/com/android/server/power/stats/processor/PhoneCallPowerStatsProcessor.java +17 −10 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,21 @@ class PhoneCallPowerStatsProcessor extends PowerStatsProcessor { mTmpDeviceStats = new long[mDescriptor.statsArrayLength]; mTmpDeviceStats = new long[mDescriptor.statsArrayLength]; } } private boolean unpackMobileRadioStatsDescriptor(PowerStats.Descriptor descriptor) { if (descriptor == null) { return false; } if (descriptor.equals(mMobileRadioStatsDescriptor)) { return true; } mMobileRadioStatsDescriptor = descriptor; mMobileRadioStatsLayout = new MobileRadioPowerStatsLayout(mMobileRadioStatsDescriptor); mTmpMobileRadioDeviceStats = new long[mMobileRadioStatsDescriptor.statsArrayLength]; return true; } @Override @Override void finish(PowerComponentAggregatedPowerStats stats, long timestampMs) { void finish(PowerComponentAggregatedPowerStats stats, long timestampMs) { stats.setPowerStatsDescriptor(mDescriptor); stats.setPowerStatsDescriptor(mDescriptor); Loading @@ -50,18 +65,10 @@ class PhoneCallPowerStatsProcessor extends PowerStatsProcessor { return; return; } } if (mMobileRadioStatsDescriptor == null) { if (!unpackMobileRadioStatsDescriptor(mobileRadioStats.getPowerStatsDescriptor())) { mMobileRadioStatsDescriptor = mobileRadioStats.getPowerStatsDescriptor(); if (mMobileRadioStatsDescriptor == null) { return; return; } } mMobileRadioStatsLayout = new MobileRadioPowerStatsLayout( mMobileRadioStatsDescriptor); mTmpMobileRadioDeviceStats = new long[mMobileRadioStatsDescriptor.statsArrayLength]; } MultiStateStats.States[] deviceStateConfig = MultiStateStats.States[] deviceStateConfig = mobileRadioStats.getConfig().getDeviceStateConfig(); mobileRadioStats.getConfig().getDeviceStateConfig(); Loading