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

Commit ce4a7401 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "incidentd: Removing history from batterystats dump."

parents c87e8b19 6ccebf23
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -6742,7 +6742,7 @@ public abstract class BatteryStats implements Parcelable {

    /** Dump #STATS_SINCE_CHARGED batterystats data to a proto. @hide */
    public void dumpProtoLocked(Context context, FileDescriptor fd, List<ApplicationInfo> apps,
            int flags, long historyStart) {
            int flags) {
        final ProtoOutputStream proto = new ProtoOutputStream(fd);
        final long bToken = proto.start(BatteryStatsServiceDumpProto.BATTERYSTATS);
        prepareForDumpLocked();
@@ -6752,13 +6752,7 @@ public abstract class BatteryStats implements Parcelable {
        proto.write(BatteryStatsProto.START_PLATFORM_VERSION, getStartPlatformVersion());
        proto.write(BatteryStatsProto.END_PLATFORM_VERSION, getEndPlatformVersion());

        long now = getHistoryBaseTime() + SystemClock.elapsedRealtime();

        if ((flags & (DUMP_INCLUDE_HISTORY | DUMP_HISTORY_ONLY)) != 0) {
            if (startIteratingHistoryLocked()) {
                // TODO: implement dumpProtoHistoryLocked(proto);
            }
        }
        // History intentionally not included in proto dump.

        if ((flags & (DUMP_HISTORY_ONLY | DUMP_DAILY_ONLY)) == 0) {
            final BatteryStatsHelper helper = new BatteryStatsHelper(context, false,
+2 −6
Original line number Diff line number Diff line
@@ -28,12 +28,8 @@ message BatteryStatsProto {
  optional int64 parcel_version = 2;
  optional string start_platform_version = 3;
  optional string end_platform_version = 4;
  optional BatteryHistoryProto history = 5;
  repeated UidProto uids = 6;
  optional SystemProto system = 7;
}

message BatteryHistoryProto {
  repeated UidProto uids = 5;
  optional SystemProto system = 6;
}

message ControllerActivityProto {
+2 −3
Original line number Diff line number Diff line
@@ -1335,8 +1335,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
                                        null, mStats.mHandler, null, mUserManagerUserInfoProvider);
                                checkinStats.readSummaryFromParcel(in);
                                in.recycle();
                                checkinStats.dumpProtoLocked(mContext, fd, apps, flags,
                                        historyStart);
                                checkinStats.dumpProtoLocked(mContext, fd, apps, flags);
                                mStats.mCheckinFile.delete();
                                return;
                            }
@@ -1349,7 +1348,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
            }
            if (DBG) Slog.d(TAG, "begin dumpProtoLocked from UID " + Binder.getCallingUid());
            synchronized (mStats) {
                mStats.dumpProtoLocked(mContext, fd, apps, flags, historyStart);
                mStats.dumpProtoLocked(mContext, fd, apps, flags);
                if (writeData) {
                    mStats.writeAsyncLocked();
                }