From 501fe49a8df0a8dc99dac162feb2eb9b2d7a0952 Mon Sep 17 00:00:00 2001 From: Anay Wadhera Date: Wed, 7 Dec 2022 11:07:52 -0500 Subject: [PATCH] interfaces: add google_battery AIDL interface Change-Id: I960c96c2abe7b472972095ce30c00a030fd7b7b3 --- interfaces/google_battery/Android.bp | 30 ++++++++++++ .../vendor.google.google_battery/1/.hash | 1 + .../google_battery/BatteryHealthStatus.aidl | 27 +++++++++++ .../google/google_battery/ChargingStage.aidl | 24 ++++++++++ .../google/google_battery/ChargingStatus.aidl | 36 ++++++++++++++ .../google/google_battery/ChargingType.aidl | 29 ++++++++++++ .../google_battery/DockDefendStatus.aidl | 26 ++++++++++ .../vendor/google/google_battery/Feature.aidl | 33 +++++++++++++ .../google/google_battery/IGoogleBattery.aidl | 40 ++++++++++++++++ .../google_battery/BatteryHealthStatus.aidl | 27 +++++++++++ .../google/google_battery/ChargingStage.aidl | 24 ++++++++++ .../google/google_battery/ChargingStatus.aidl | 36 ++++++++++++++ .../google/google_battery/ChargingType.aidl | 29 ++++++++++++ .../google_battery/DockDefendStatus.aidl | 26 ++++++++++ .../vendor/google/google_battery/Feature.aidl | 33 +++++++++++++ .../google/google_battery/IGoogleBattery.aidl | 40 ++++++++++++++++ .../google_battery/BatteryHealthStatus.aidl | 11 +++++ .../google/google_battery/ChargingStage.aidl | 7 +++ .../google/google_battery/ChargingStatus.aidl | 20 ++++++++ .../google/google_battery/ChargingType.aidl | 13 +++++ .../google_battery/DockDefendStatus.aidl | 10 ++++ .../vendor/google/google_battery/Feature.aidl | 17 +++++++ .../google/google_battery/IGoogleBattery.aidl | 47 +++++++++++++++++++ 23 files changed, 586 insertions(+) create mode 100644 interfaces/google_battery/Android.bp create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/1/.hash create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/BatteryHealthStatus.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStage.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStatus.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingType.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/DockDefendStatus.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/Feature.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/IGoogleBattery.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/BatteryHealthStatus.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStage.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStatus.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingType.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/DockDefendStatus.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/Feature.aidl create mode 100644 interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/IGoogleBattery.aidl create mode 100644 interfaces/google_battery/vendor/google/google_battery/BatteryHealthStatus.aidl create mode 100644 interfaces/google_battery/vendor/google/google_battery/ChargingStage.aidl create mode 100644 interfaces/google_battery/vendor/google/google_battery/ChargingStatus.aidl create mode 100644 interfaces/google_battery/vendor/google/google_battery/ChargingType.aidl create mode 100644 interfaces/google_battery/vendor/google/google_battery/DockDefendStatus.aidl create mode 100644 interfaces/google_battery/vendor/google/google_battery/Feature.aidl create mode 100644 interfaces/google_battery/vendor/google/google_battery/IGoogleBattery.aidl diff --git a/interfaces/google_battery/Android.bp b/interfaces/google_battery/Android.bp new file mode 100644 index 0000000..0521f95 --- /dev/null +++ b/interfaces/google_battery/Android.bp @@ -0,0 +1,30 @@ +aidl_interface { + name: "vendor.google.google_battery", + + srcs: [ + "vendor/google/google_battery/*.aidl", + ], + + stability: "vintf", + owner: "google", + + backend: { + cpp: { + enabled: false, + }, + java: { + enabled: true, + platform_apis: true, + }, + ndk: { + enabled: false, + }, + }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/.hash b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/.hash new file mode 100644 index 0000000..e2668c0 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/.hash @@ -0,0 +1 @@ +54f883291e33c1f57833025a120210142cf2368c diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/BatteryHealthStatus.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/BatteryHealthStatus.aidl new file mode 100644 index 0000000..153cff3 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/BatteryHealthStatus.aidl @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum BatteryHealthStatus { + UNKNOWN = -1, + NOMINAL = 0, + MARGINAL = 1, + NEEDS_REPLACEMENT = 2, + FAILED = 3, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStage.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStage.aidl new file mode 100644 index 0000000..cbd6976 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStage.aidl @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@VintfStability +parcelable ChargingStage { + String stage; + int deadlineSecs; +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStatus.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStatus.aidl new file mode 100644 index 0000000..4eeabd7 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStatus.aidl @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum ChargingStatus { + UNKNOWN = -1, + HEALTH_COLD = 10, + HEALTH_HOT = 11, + SYSTEM_THERMAL = 20, + SYSTEM_LOAD = 21, + ADAPTER_AUTH = 30, + ADAPTER_POWER = 31, + ADAPTER_QUALITY = 32, + DEFENDER_TEMP = 40, + DEFENDER_DWELL = 41, + DEFENDER_TRICKLE = 42, + DEFENDER_DOCK = 43, + NOT_CHARGING = 100, + CHARGING = 200, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingType.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingType.aidl new file mode 100644 index 0000000..a5981e8 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingType.aidl @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum ChargingType { + UNKNOWN = -1, + NONE = 0, + FAULT = 1, + JEITA = 2, + LONG_LIFE = 3, + ADAPTIVE = 4, + NORMAL = 5, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/DockDefendStatus.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/DockDefendStatus.aidl new file mode 100644 index 0000000..be1e78b --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/DockDefendStatus.aidl @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum DockDefendStatus { + OVERRIDE_DISABLED = -2, + SETTINGS_DISABLED = -1, + ENABLED = 0, + TRIGGERED = 1, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/Feature.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/Feature.aidl new file mode 100644 index 0000000..148e012 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/Feature.aidl @@ -0,0 +1,33 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum Feature { + ADAPTIVE_CHARGING = 0, + TEMP_DEFEND = 1, + TRICKLE_DEFEND = 2, + DWELL_DEFEND = 3, + DREAM_DEFEND = 4, + DC_CHARGING = 5, + AGE_ADJUSTED_CHARGE_RATE = 6, + DOCK_DEFEND = 7, + BATTERY_HEALTH_INDEX = 8, + CHARGING_SPEED_INDICATOR = 9, + FEATURE_MAX = 10, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/IGoogleBattery.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/IGoogleBattery.aidl new file mode 100644 index 0000000..6d44ccc --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/IGoogleBattery.aidl @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@VintfStability +interface IGoogleBattery { + void setEnable(in vendor.google.google_battery.Feature feature, in boolean enabled); + void setChargingDeadline(in int seconds); + vendor.google.google_battery.ChargingStage getChargingStageAndDeadline(); + void setHealthAlwaysOn(in int soc); + int getProperty(in vendor.google.google_battery.Feature feature, in int property); + void setProperty(in vendor.google.google_battery.Feature feature, in int property, in int value); + void clearBatteryDefender(); + int getAdapterId(); + int getAdapterType(); + int getChargingSpeed(); + vendor.google.google_battery.ChargingStatus getChargingStatus(); + vendor.google.google_battery.ChargingType getChargingType(); + int getHealthCapacityIndex(); + int getHealthImpedanceIndex(); + int getHealthIndex(); + vendor.google.google_battery.BatteryHealthStatus getHealthStatus(); + vendor.google.google_battery.DockDefendStatus getDockDefendStatus(); + const int RESULT_IO_ERROR = 1; +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/BatteryHealthStatus.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/BatteryHealthStatus.aidl new file mode 100644 index 0000000..153cff3 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/BatteryHealthStatus.aidl @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum BatteryHealthStatus { + UNKNOWN = -1, + NOMINAL = 0, + MARGINAL = 1, + NEEDS_REPLACEMENT = 2, + FAILED = 3, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStage.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStage.aidl new file mode 100644 index 0000000..cbd6976 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStage.aidl @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@VintfStability +parcelable ChargingStage { + String stage; + int deadlineSecs; +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStatus.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStatus.aidl new file mode 100644 index 0000000..4eeabd7 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStatus.aidl @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum ChargingStatus { + UNKNOWN = -1, + HEALTH_COLD = 10, + HEALTH_HOT = 11, + SYSTEM_THERMAL = 20, + SYSTEM_LOAD = 21, + ADAPTER_AUTH = 30, + ADAPTER_POWER = 31, + ADAPTER_QUALITY = 32, + DEFENDER_TEMP = 40, + DEFENDER_DWELL = 41, + DEFENDER_TRICKLE = 42, + DEFENDER_DOCK = 43, + NOT_CHARGING = 100, + CHARGING = 200, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingType.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingType.aidl new file mode 100644 index 0000000..a5981e8 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingType.aidl @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum ChargingType { + UNKNOWN = -1, + NONE = 0, + FAULT = 1, + JEITA = 2, + LONG_LIFE = 3, + ADAPTIVE = 4, + NORMAL = 5, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/DockDefendStatus.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/DockDefendStatus.aidl new file mode 100644 index 0000000..be1e78b --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/DockDefendStatus.aidl @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum DockDefendStatus { + OVERRIDE_DISABLED = -2, + SETTINGS_DISABLED = -1, + ENABLED = 0, + TRIGGERED = 1, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/Feature.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/Feature.aidl new file mode 100644 index 0000000..148e012 --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/Feature.aidl @@ -0,0 +1,33 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@Backing(type="int") @VintfStability +enum Feature { + ADAPTIVE_CHARGING = 0, + TEMP_DEFEND = 1, + TRICKLE_DEFEND = 2, + DWELL_DEFEND = 3, + DREAM_DEFEND = 4, + DC_CHARGING = 5, + AGE_ADJUSTED_CHARGE_RATE = 6, + DOCK_DEFEND = 7, + BATTERY_HEALTH_INDEX = 8, + CHARGING_SPEED_INDICATOR = 9, + FEATURE_MAX = 10, +} diff --git a/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/IGoogleBattery.aidl b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/IGoogleBattery.aidl new file mode 100644 index 0000000..6d44ccc --- /dev/null +++ b/interfaces/google_battery/aidl_api/vendor.google.google_battery/current/vendor/google/google_battery/IGoogleBattery.aidl @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.google.google_battery; +@VintfStability +interface IGoogleBattery { + void setEnable(in vendor.google.google_battery.Feature feature, in boolean enabled); + void setChargingDeadline(in int seconds); + vendor.google.google_battery.ChargingStage getChargingStageAndDeadline(); + void setHealthAlwaysOn(in int soc); + int getProperty(in vendor.google.google_battery.Feature feature, in int property); + void setProperty(in vendor.google.google_battery.Feature feature, in int property, in int value); + void clearBatteryDefender(); + int getAdapterId(); + int getAdapterType(); + int getChargingSpeed(); + vendor.google.google_battery.ChargingStatus getChargingStatus(); + vendor.google.google_battery.ChargingType getChargingType(); + int getHealthCapacityIndex(); + int getHealthImpedanceIndex(); + int getHealthIndex(); + vendor.google.google_battery.BatteryHealthStatus getHealthStatus(); + vendor.google.google_battery.DockDefendStatus getDockDefendStatus(); + const int RESULT_IO_ERROR = 1; +} diff --git a/interfaces/google_battery/vendor/google/google_battery/BatteryHealthStatus.aidl b/interfaces/google_battery/vendor/google/google_battery/BatteryHealthStatus.aidl new file mode 100644 index 0000000..292a0ab --- /dev/null +++ b/interfaces/google_battery/vendor/google/google_battery/BatteryHealthStatus.aidl @@ -0,0 +1,11 @@ +package vendor.google.google_battery; + +@VintfStability +@Backing(type="int") +enum BatteryHealthStatus { + UNKNOWN = -1, + NOMINAL = 0, + MARGINAL = 1, + NEEDS_REPLACEMENT = 2, + FAILED = 3, +} diff --git a/interfaces/google_battery/vendor/google/google_battery/ChargingStage.aidl b/interfaces/google_battery/vendor/google/google_battery/ChargingStage.aidl new file mode 100644 index 0000000..96ed838 --- /dev/null +++ b/interfaces/google_battery/vendor/google/google_battery/ChargingStage.aidl @@ -0,0 +1,7 @@ +package vendor.google.google_battery; + +@VintfStability +parcelable ChargingStage { + String stage; + int deadlineSecs; +} diff --git a/interfaces/google_battery/vendor/google/google_battery/ChargingStatus.aidl b/interfaces/google_battery/vendor/google/google_battery/ChargingStatus.aidl new file mode 100644 index 0000000..7975891 --- /dev/null +++ b/interfaces/google_battery/vendor/google/google_battery/ChargingStatus.aidl @@ -0,0 +1,20 @@ +package vendor.google.google_battery; + +@VintfStability +@Backing(type="int") +enum ChargingStatus { + UNKNOWN = -1, + HEALTH_COLD = 10, // Battery temperature too cold + HEALTH_HOT = 11, // Battery temperature too hot + SYSTEM_THERMAL = 20, // Thermal engine + SYSTEM_LOAD = 21, // Load might eventually become thermals + ADAPTER_AUTH = 30, // During authentication (if supported) or failed authentication + ADAPTER_POWER = 31, // Low power adapter + ADAPTER_QUALITY = 32, // Adapter or cable (low voltage) + DEFENDER_TEMP = 40, + DEFENDER_DWELL = 41, + DEFENDER_TRICKLE = 42, + DEFENDER_DOCK = 43, + NOT_CHARGING = 100, // plugged, not charging + CHARGING = 200, // All good +} diff --git a/interfaces/google_battery/vendor/google/google_battery/ChargingType.aidl b/interfaces/google_battery/vendor/google/google_battery/ChargingType.aidl new file mode 100644 index 0000000..6599db7 --- /dev/null +++ b/interfaces/google_battery/vendor/google/google_battery/ChargingType.aidl @@ -0,0 +1,13 @@ +package vendor.google.google_battery; + +@VintfStability +@Backing(type="int") +enum ChargingType { + UNKNOWN = -1, + NONE = 0, // Disconnected + FAULT = 1, // Internal Failures + JEITA = 2, // HW limits + LONG_LIFE = 3, // Defender Conditions + ADAPTIVE = 4, // Adaptive Charging + NORMAL = 5, +} diff --git a/interfaces/google_battery/vendor/google/google_battery/DockDefendStatus.aidl b/interfaces/google_battery/vendor/google/google_battery/DockDefendStatus.aidl new file mode 100644 index 0000000..7252ac2 --- /dev/null +++ b/interfaces/google_battery/vendor/google/google_battery/DockDefendStatus.aidl @@ -0,0 +1,10 @@ +package vendor.google.google_battery; + +@VintfStability +@Backing(type="int") +enum DockDefendStatus { + OVERRIDE_DISABLED = -2, + SETTINGS_DISABLED = -1, + ENABLED = 0, + TRIGGERED = 1, +} diff --git a/interfaces/google_battery/vendor/google/google_battery/Feature.aidl b/interfaces/google_battery/vendor/google/google_battery/Feature.aidl new file mode 100644 index 0000000..bae9b69 --- /dev/null +++ b/interfaces/google_battery/vendor/google/google_battery/Feature.aidl @@ -0,0 +1,17 @@ +package vendor.google.google_battery; + +@VintfStability +@Backing(type="int") +enum Feature { + ADAPTIVE_CHARGING = 0, + TEMP_DEFEND = 1, + TRICKLE_DEFEND = 2, + DWELL_DEFEND = 3, + DREAM_DEFEND = 4, + DC_CHARGING = 5, + AGE_ADJUSTED_CHARGE_RATE = 6, + DOCK_DEFEND = 7, + BATTERY_HEALTH_INDEX = 8, + CHARGING_SPEED_INDICATOR = 9, + FEATURE_MAX, +} diff --git a/interfaces/google_battery/vendor/google/google_battery/IGoogleBattery.aidl b/interfaces/google_battery/vendor/google/google_battery/IGoogleBattery.aidl new file mode 100644 index 0000000..294a01e --- /dev/null +++ b/interfaces/google_battery/vendor/google/google_battery/IGoogleBattery.aidl @@ -0,0 +1,47 @@ +package vendor.google.google_battery; + +import vendor.google.google_battery.BatteryHealthStatus; +import vendor.google.google_battery.ChargingStage; +import vendor.google.google_battery.ChargingStatus; +import vendor.google.google_battery.ChargingType; +import vendor.google.google_battery.DockDefendStatus; +import vendor.google.google_battery.Feature; + +@VintfStability +interface IGoogleBattery { + const int RESULT_IO_ERROR = 1; + + void setEnable(in Feature feature, in boolean enabled); + + void setChargingDeadline(in int seconds); + + ChargingStage getChargingStageAndDeadline(); + + void setHealthAlwaysOn(in int soc); + + int getProperty(in Feature feature, in int property); + + void setProperty(in Feature feature, in int property, in int value); + + void clearBatteryDefender(); + + int getAdapterId(); + + int getAdapterType(); + + int getChargingSpeed(); + + ChargingStatus getChargingStatus(); + + ChargingType getChargingType(); + + int getHealthCapacityIndex(); + + int getHealthImpedanceIndex(); + + int getHealthIndex(); + + BatteryHealthStatus getHealthStatus(); + + DockDefendStatus getDockDefendStatus(); +}