blob: 86e31d0940db2bad5b948c1e7738820f34fac522 [file] [log] [blame]
Kweku Adams2f73ecd2017-09-27 16:59:19 -07001/*
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 = "proto3";
18
19option java_multiple_files = true;
20
21package android.os;
22
23message BatteryStatsProto {
24 int32 report_version = 1;
25 int64 parcel_version = 2;
26 string start_platform_version = 3;
27 string end_platform_version = 4;
28 BatteryHistoryProto history = 5;
29 repeated UidProto uids = 6;
30 SystemProto system = 7;
31}
32
33message BatteryHistoryProto {
34}
35
36message ControllerActivityProto {
37 // Time (milliseconds) spent in the idle state.
38 int64 idle_duration_ms = 1;
39 // Time (milliseconds) spent in the receive state.
40 int64 rx_duration_ms = 2;
41 // Total power (mAh) consumed by the controller in all states. The value may
42 // always be 0 if the device doesn't support power calculations.
43 int64 power_mah = 3;
44
45 // Represents a transmit level, where each level may draw a different amount
46 // of power. The levels themselves are controller-specific (and may possibly
47 // be device specific...yet to be confirmed).
48 message TxLevel {
49 // Transmit level. Higher levels draw more power.
50 int32 level = 1;
51 // Time spent in this specific transmit level state.
52 int64 duration_ms = 2;
53 }
54 repeated TxLevel tx = 4;
55}
56
57message SystemProto {
58}
59
60message TimerProto {
61 int64 duration_ms = 1;
62 int64 count = 2;
63}
64
65message UidProto {
66 // Combination of app ID and user ID.
67 int32 uid = 1;
68 repeated string package_names = 2;
69}