Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interfaces: add google_battery AIDL interface
Change-Id: I960c96c2abe7b472972095ce30c00a030fd7b7b3
- Loading branch information
1 parent
a2aa550
commit 501fe49
Showing
23 changed files
with
586 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: [], | ||
}, | ||
], | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
interfaces/google_battery/aidl_api/vendor.google.google_battery/1/.hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
54f883291e33c1f57833025a120210142cf2368c |
27 changes: 27 additions & 0 deletions
27
..._api/vendor.google.google_battery/1/vendor/google/google_battery/BatteryHealthStatus.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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, | ||
} |
24 changes: 24 additions & 0 deletions
24
...y/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStage.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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; | ||
} |
36 changes: 36 additions & 0 deletions
36
.../aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingStatus.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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, | ||
} |
29 changes: 29 additions & 0 deletions
29
...ry/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/ChargingType.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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, | ||
} |
26 changes: 26 additions & 0 deletions
26
...idl_api/vendor.google.google_battery/1/vendor/google/google_battery/DockDefendStatus.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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, | ||
} |
33 changes: 33 additions & 0 deletions
33
...battery/aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/Feature.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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, | ||
} |
40 changes: 40 additions & 0 deletions
40
.../aidl_api/vendor.google.google_battery/1/vendor/google/google_battery/IGoogleBattery.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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; | ||
} |
27 changes: 27 additions & 0 deletions
27
...endor.google.google_battery/current/vendor/google/google_battery/BatteryHealthStatus.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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, | ||
} |
24 changes: 24 additions & 0 deletions
24
..._api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStage.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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; | ||
} |
36 changes: 36 additions & 0 deletions
36
...api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingStatus.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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, | ||
} |
29 changes: 29 additions & 0 deletions
29
...l_api/vendor.google.google_battery/current/vendor/google/google_battery/ChargingType.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <name>-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, | ||
} |
Oops, something went wrong.