1/* 2 * Copyright (C) 2024 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"; 18 19package android.hardware.health; 20 21option java_outer_classname = "HealthProtoEnums"; 22option java_multiple_files = true; 23 24enum BatteryPartStatus { 25 /* 26 * Device cannot differentiate an original battery from a replaced battery. 27 */ 28 BATTERY_PART_STATUS_UNSUPPORTED = 0; 29 /* 30 * Device has the original battery it was manufactured with. 31 */ 32 BATTERY_PART_STATUS_ORIGINAL = 1; 33 /* 34 * Device has a replaced battery. 35 */ 36 BATTERY_PART_STATUS_REPLACED = 2; 37} 38 39enum BatteryChargingState { 40 BATTERY_CHARGING_STATE_INVALID = 0; 41 /* 42 * Default state. 43 */ 44 BATTERY_CHARGING_STATE_NORMAL = 1; 45 /* 46 * Reported when the battery is too cold to charge at a normal 47 * rate or stopped charging due to low temperature. 48 */ 49 BATTERY_CHARGING_STATE_TOO_COLD = 2; 50 /* 51 * Reported when the battery is too hot to charge at a normal 52 * rate or stopped charging due to hot temperature. 53 */ 54 BATTERY_CHARGING_STATE_TOO_HOT = 3; 55 /* 56 * The device is using a special charging profile that designed 57 * to prevent accelerated aging. 58 */ 59 BATTERY_CHARGING_STATE_LONG_LIFE = 4; 60 /* 61 * The device is using a special charging profile designed to 62 * improve battery cycle life, performances or both. 63 */ 64 BATTERY_CHARGING_STATE_ADAPTIVE = 5; 65} 66 67enum BatteryChargingPolicy { 68 BATTERY_CHARGING_POLICY_INVALID = 0; 69 /* 70 * default policy 71 */ 72 BATTERY_CHARGING_POLICY_DEFAULT = 1; 73 /* 74 * @see BatteryChargingState.LONG_LIFE 75 */ 76 BATTERY_CHARGING_POLICY_LONG_LIFE = 2; 77 /* 78 * @see BatteryChargingState.ADAPTIVE 79 */ 80 BATTERY_CHARGING_POLICY_ADAPTIVE = 3; 81} 82