Debian Codegraph @

core/proto/android/os/appbatterystats.proto

raw
1 /*
2 * Copyright (C) 2022 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
17 syntax = "proto2";
18 package android.os;
19
20 option java_multiple_files = true;
21
22 message AppBatteryStatsProto {
23 message UidStats {
24 optional int32 uid = 1;
25
26 message ProcessStateStats {
27 enum ProcessState {
28 UNSPECIFIED = 0;
29 FOREGROUND = 1;
30 BACKGROUND = 2;
31 FOREGROUND_SERVICE = 3;
32 CACHED = 4;
33 }
34
35 optional ProcessState process_state = 1;
36
37 // Time spent in this state in the past 24 hours
38 optional int64 duration_ms = 2;
39 // Estimated power consumed in this state in the past 24 hours
40 optional double power_mah = 3;
41 }
42
43 repeated ProcessStateStats process_state_stats = 2;
44 }
45
46 repeated UidStats uid_stats = 1;
47 }