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

Commit f2afe453 authored by Scott Anderson's avatar Scott Anderson
Browse files

Fix OOBE

Change-Id: I44bbf86b3dbe1655acd50c872b9d01d7d941cd96
parent 3be6795f
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -500,12 +500,12 @@ public class ProcessStats {
    }

    private long[] getCpuSpeedTimes(long[] out) {
        long[] tempTimes = out;
        long[] tempSpeeds = mCpuSpeeds;
        final int MAX_SPEEDS = 30;
        if (out == null) {
            tempTimes = new long[MAX_SPEEDS]; // Hopefully no more than that
            tempSpeeds = new long[MAX_SPEEDS];
        long[] tempTimes = new long[MAX_SPEEDS]; // Hopefully no more than that
        long[] tempSpeeds = new long[MAX_SPEEDS];
        if (out != null) {
            System.arraycopy(out, 0, tempTimes, 0, out.length);
            System.arraycopy(mCpuSpeeds, 0, tempSpeeds, 0, mCpuSpeeds.length);
        }
        int speed = 0;
        String file = readFile("/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state", '\0');
@@ -535,10 +535,10 @@ public class ProcessStats {
        }
        if (out == null) {
            out = new long[speed];
            mCpuSpeeds = new long[speed];
            System.arraycopy(tempSpeeds, 0, mCpuSpeeds, 0, speed);
            System.arraycopy(tempTimes, 0, out, 0, speed);
        }
        mCpuSpeeds = new long[speed];
        System.arraycopy(tempSpeeds, 0, mCpuSpeeds, 0, speed);
        return out;
    }