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

Commit 2dcdd649 authored by Hall Liu's avatar Hall Liu Committed by Android (Google) Code Review
Browse files

Merge "Use getter method for number of TX power levels"

parents 7bab035b 02a4d545
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -418,7 +418,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
        switch(rr.mRequest) {
            case RIL_REQUEST_GET_ACTIVITY_INFO:
                timeoutResponse = new ModemActivityInfo(
                        0, 0, 0, new int [ModemActivityInfo.TX_POWER_LEVELS], 0);
                        0, 0, 0, new int [ModemActivityInfo.getNumTxPowerLevels()], 0);
                break;
        };
        return timeoutResponse;
+4 −4
Original line number Diff line number Diff line
@@ -2453,16 +2453,16 @@ public class RadioResponse extends IRadioResponse.Stub {
            if (responseInfo.error == RadioError.NONE) {
                final int sleepModeTimeMs = activityInfo.sleepModeTimeMs;
                final int idleModeTimeMs = activityInfo.idleModeTimeMs;
                int [] txModeTimeMs = new int[ModemActivityInfo.TX_POWER_LEVELS];
                for (int i = 0; i < ModemActivityInfo.TX_POWER_LEVELS; i++) {
                int [] txModeTimeMs = new int[ModemActivityInfo.getNumTxPowerLevels()];
                for (int i = 0; i < ModemActivityInfo.getNumTxPowerLevels(); i++) {
                    txModeTimeMs[i] = activityInfo.txmModetimeMs[i];
                }
                final int rxModeTimeMs = activityInfo.rxModeTimeMs;
                ret = new ModemActivityInfo(SystemClock.elapsedRealtime(), sleepModeTimeMs,
                        idleModeTimeMs, txModeTimeMs, rxModeTimeMs);
            } else {
                ret = new ModemActivityInfo(0, 0, 0, new int [ModemActivityInfo.TX_POWER_LEVELS],
                        0);
                ret = new ModemActivityInfo(0, 0, 0,
                        new int[ModemActivityInfo.getNumTxPowerLevels()], 0);
                responseInfo.error = RadioError.NONE;
            }
            sendMessageResponse(rr.mResult, ret);
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class ModemPowerMetrics {
            m.rxTimeMs = stats.getRxTimeMillis();

            List<Long> txTimeMillis = new ArrayList<>();
            for (int i = 0; i < ModemActivityInfo.TX_POWER_LEVELS; i++) {
            for (int i = 0; i < ModemActivityInfo.getNumTxPowerLevels(); i++) {
                long t = stats.getTxTimeMillis(i);
                if (t >= 0) {
                    txTimeMillis.add(t);