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

Commit 8197e2de authored by Adam Lesinski's avatar Adam Lesinski Committed by Android Git Automerger
Browse files

am ffc6ce00: Merge "Fix asymmetry in parceling/unparceling code for...

am ffc6ce00: Merge "Fix asymmetry in parceling/unparceling code for BatteryStats summary" into mnc-dr-dev

* commit 'ffc6ce00':
  Fix asymmetry in parceling/unparceling code for BatteryStats summary
parents 3de2d53a ffc6ce00
Loading
Loading
Loading
Loading
+11 −6
Original line number Original line Diff line number Diff line
@@ -5704,6 +5704,8 @@ public final class BatteryStatsImpl extends BatteryStats {
                                cpuSpeeds[speed] = new LongSamplingCounter(mOnBatteryTimeBase, in);
                                cpuSpeeds[speed] = new LongSamplingCounter(mOnBatteryTimeBase, in);
                            }
                            }
                        }
                        }
                    } else {
                        mCpuClusterSpeed[cluster] = null;
                    }
                    }
                }
                }
            } else {
            } else {
@@ -9382,13 +9384,14 @@ public final class BatteryStatsImpl extends BatteryStats {


                u.mCpuClusterSpeed = new LongSamplingCounter[numClusters][];
                u.mCpuClusterSpeed = new LongSamplingCounter[numClusters][];
                for (int cluster = 0; cluster < numClusters; cluster++) {
                for (int cluster = 0; cluster < numClusters; cluster++) {
                    int NSB = in.readInt();
                    if (in.readInt() != 0) {
                        final int NSB = in.readInt();
                        if (mPowerProfile != null &&
                        if (mPowerProfile != null &&
                                mPowerProfile.getNumSpeedStepsInCpuCluster(cluster) != NSB) {
                                mPowerProfile.getNumSpeedStepsInCpuCluster(cluster) != NSB) {
                        throw new ParcelFormatException("File corrupt: too many speed bins " + NSB);
                            throw new ParcelFormatException("File corrupt: too many speed bins " +
                                    NSB);
                        }
                        }


                    if (in.readInt() != 0) {
                        u.mCpuClusterSpeed[cluster] = new LongSamplingCounter[NSB];
                        u.mCpuClusterSpeed[cluster] = new LongSamplingCounter[NSB];
                        for (int speed = 0; speed < NSB; speed++) {
                        for (int speed = 0; speed < NSB; speed++) {
                            if (in.readInt() != 0) {
                            if (in.readInt() != 0) {
@@ -9397,6 +9400,8 @@ public final class BatteryStatsImpl extends BatteryStats {
                                u.mCpuClusterSpeed[cluster][speed].readSummaryFromParcelLocked(in);
                                u.mCpuClusterSpeed[cluster][speed].readSummaryFromParcelLocked(in);
                            }
                            }
                        }
                        }
                    } else {
                        u.mCpuClusterSpeed[cluster] = null;
                    }
                    }
                }
                }
            } else {
            } else {