Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb900813 authored by Catherine Liu's avatar Catherine Liu
Browse files

Fix wrong count return for getPhoneSignalStrengthCount

Test report for the time spent in each signal strength bin, along
with the number of times that bin was entered showed the result
as Bin=3 Time=3211926000 Count=0. With a non-zero Time, the Count
value 0 was wrong.

The cause of the problem was that getPhoneSignalStrengthCount() used
mPhoneDataConnectionsTimer, instead of mPhoneSignalStrengthsTimer,
to get the count.

Change-Id: I55ac1125abfcfdc105605d76d1c706ac315b90cc
parent 3c04cc44
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2302,8 +2302,8 @@ public final class BatteryStatsImpl extends BatteryStats {
                batteryRealtime, which);
    }

    @Override public int getPhoneSignalStrengthCount(int dataType, int which) {
        return mPhoneDataConnectionsTimer[dataType].getCountLocked(which);
    @Override public int getPhoneSignalStrengthCount(int strengthBin, int which) {
        return mPhoneSignalStrengthsTimer[strengthBin].getCountLocked(which);
    }

    @Override public long getPhoneDataConnectionTime(int dataType,