Calculate cellular radio value from modem.controller values.
Recently cellular radio related values {"radio.active", "radio.scanning", "radio.on"} are removed from power_profile.xml, which causes inaccurate radio power usage. We use following formula to calculate radio values from modem.controller values. radio.active = average of modem.controller.rx and modem.controller.tx values radio.scanning = 0 (since this is already included in radio.on bin 0) <array name="radio.on"> <!-- Strength 0 to BINS-1 --> <value>modem.controller.idle * 25 / 180 </value> <!-- none --> <value>max(1, modem.controller.idle/256) </value> <!-- poor --> <value>max(1, modem.controller.idle/256) </value> <!-- moderate --> <value>max(1, modem.controller.idle/256) </value> <!-- good --> <value>max(1, modem.controller.idle/256) </value> <!-- great --> </array> Bug: 79379255 Test: use debugger to observe correct mPowerRadioOn, mPowerBins, mPowerScan are calculated. "adb shell dumpsys batterystats", looking for "radio=" in "Estimated power use" section. Change-Id: Ic65a5c8a35a5b1f4ba05ddc150e29b00bc62689f
Loading
Please register or sign in to comment