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

Commit b3f38c63 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #13095629: Device is in restart mode for long time..."

parents 66d792b6 00e2521d
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.bluetooth.BluetoothHeadset;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkStats;
import android.os.BadParcelableException;
import android.os.BatteryManager;
import android.os.BatteryStats;
import android.os.FileUtils;
@@ -86,7 +87,7 @@ public final class BatteryStatsImpl extends BatteryStats {
    private static final int MAGIC = 0xBA757475; // 'BATSTATS'

    // Current on-disk Parcel version
    private static final int VERSION = 84 + (USE_OLD_HISTORY ? 1000 : 0);
    private static final int VERSION = 85 + (USE_OLD_HISTORY ? 1000 : 0);

    // Maximum number of items we will record in the history.
    private static final int MAX_HISTORY_ITEMS = 2000;
@@ -6026,7 +6027,7 @@ public final class BatteryStatsImpl extends BatteryStats {
            stream.close();

            readSummaryFromParcel(in);
        } catch(java.io.IOException e) {
        } catch(Exception e) {
            Slog.e("BatteryStats", "Error reading battery statistics", e);
        }

@@ -6234,6 +6235,9 @@ public final class BatteryStatsImpl extends BatteryStats {
        }

        sNumSpeedSteps = in.readInt();
        if (sNumSpeedSteps < 0 || sNumSpeedSteps > 100) {
            throw new BadParcelableException("Bad speed steps in data: " + sNumSpeedSteps);
        }

        final int NU = in.readInt();
        if (NU > 10000) {