Home | History | Annotate | Download | only in service
      1 /*
      2  * Copyright (C) 2017 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 = "proto3";
     18 
     19 package android.service.battery;
     20 
     21 option java_multiple_files = true;
     22 option java_outer_classname = "BatteryServiceProto";
     23 
     24 message BatteryServiceDumpProto {
     25     enum BatteryPlugged {
     26         BATTERY_PLUGGED_NONE = 0;
     27         BATTERY_PLUGGED_AC = 1;
     28         BATTERY_PLUGGED_USB = 2;
     29         BATTERY_PLUGGED_WIRELESS = 4;
     30     }
     31     enum BatteryStatus {
     32         BATTERY_STATUS_INVALID = 0;
     33         BATTERY_STATUS_UNKNOWN = 1;
     34         BATTERY_STATUS_CHARGING = 2;
     35         BATTERY_STATUS_DISCHARGING = 3;
     36         BATTERY_STATUS_NOT_CHARGING = 4;
     37         BATTERY_STATUS_FULL = 5;
     38     }
     39     enum BatteryHealth {
     40         BATTERY_HEALTH_INVALID = 0;
     41         BATTERY_HEALTH_UNKNOWN = 1;
     42         BATTERY_HEALTH_GOOD = 2;
     43         BATTERY_HEALTH_OVERHEAT = 3;
     44         BATTERY_HEALTH_DEAD = 4;
     45         BATTERY_HEALTH_OVER_VOLTAGE = 5;
     46         BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6;
     47         BATTERY_HEALTH_COLD = 7;
     48     }
     49 
     50     // If true: UPDATES STOPPED -- use 'reset' to restart
     51     bool are_updates_stopped = 1;
     52     // Plugged status of power sources
     53     BatteryPlugged plugged = 2;
     54     // Max current in microamperes
     55     int32 max_charging_current = 3;
     56     // Max voltage
     57     int32 max_charging_voltage = 4;
     58     // Battery capacity in microampere-hours
     59     int32 charge_counter = 5;
     60     // Charging status
     61     BatteryStatus status = 6;
     62     // Battery health
     63     BatteryHealth health = 7;
     64     // True if the battery is present
     65     bool is_present = 8;
     66     // Charge level, from 0 through "scale" inclusive
     67     int32 level = 9;
     68     // The maximum value for the charge level
     69     int32 scale = 10;
     70     // Battery voltage in millivolts
     71     int32 voltage = 11;
     72     // Battery temperature in tenths of a degree Centigrade
     73     int32 temperature = 12;
     74     // The type of battery installed, e.g. "Li-ion"
     75     string technology = 13;
     76 }
     77