1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18package android.service.batterystats;
19
20option java_multiple_files = true;
21option java_outer_classname = "BatteryStatsServiceProto";
22
23import "frameworks/base/core/proto/android/os/batterystats.proto";
24import "frameworks/base/core/proto/android/privacy.proto";
25
26// Dump of batterystats aggregate data (dumpsys batterystats --proto).
27message BatteryStatsServiceDumpProto {
28    option (android.msg_privacy).dest = DEST_AUTOMATIC;
29
30    optional android.os.BatteryStatsProto batterystats = 1;
31}
32
33// Dump of batterystats history data (dumpsys batterystats --proto --history).
34message BatteryStatsServiceDumpHistoryProto {
35    option (android.msg_privacy).dest = DEST_AUTOMATIC;
36
37    optional int32 report_version = 1;
38    optional int64 parcel_version = 2;
39    optional string start_platform_version = 3;
40    optional string end_platform_version = 4;
41
42    // HistoryStringPool data
43    message Key {
44        option (android.msg_privacy).dest = DEST_AUTOMATIC;
45
46        optional int32 index = 1;
47        // Not valid for all keys.
48        optional int32 uid = 2;
49        optional string tag = 3;
50    }
51    repeated Key keys = 5;
52
53    // Dump of battery history in csv format (equivalent of
54    // 'batterystats -c --history', with the hsp lines extracted).
55    repeated string csv_lines = 6;
56}
57