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

Commit 5ca0261d authored by Sarah Chin's avatar Sarah Chin Committed by Gerrit Code Review
Browse files

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

parents 5700d095 fb3919b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -431,7 +431,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
@@ -2820,16 +2820,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);