aospa: LineageHealth: Uprev to V2.
Change-Id: I9775e21ec771d106c6e098fdf3f6638ade0a2985 Signed-off-by: Fazil Sheik <fazil.sheik96@gmail.com>
This commit is contained in:
parent
627824c134
commit
d2ffe41f87
|
@ -1 +1 @@
|
|||
33fe8d162b07b2c4b66feccb70a5e45628e9e241
|
||||
1fdc8ed3c63df6d1444b17cd4d1ba6e6833c7337
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022-2023 The LineageOS Project
|
||||
* Copyright (C) 2022-2025 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -24,7 +24,8 @@
|
|||
package vendor.lineage.health;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum ChargingControlSupportedMode {
|
||||
TOGGLE = 1,
|
||||
BYPASS = 2,
|
||||
DEADLINE = 4,
|
||||
TOGGLE = (1 << 0) /* 1 */,
|
||||
BYPASS = (1 << 1) /* 2 */,
|
||||
DEADLINE = (1 << 2) /* 4 */,
|
||||
LIMIT = (1 << 3) /* 8 */,
|
||||
}
|
||||
|
|
29
interfaces/health/aidl_api/vendor.lineage.health/1/vendor/lineage/health/ChargingLimitInfo.aidl
vendored
Normal file
29
interfaces/health/aidl_api/vendor.lineage.health/1/vendor/lineage/health/ChargingLimitInfo.aidl
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (C) 2023-2025 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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.lineage.health;
|
||||
@JavaDerive(toString=true) @VintfStability
|
||||
parcelable ChargingLimitInfo {
|
||||
int max;
|
||||
int min;
|
||||
}
|
|
@ -28,4 +28,7 @@ interface IChargingControl {
|
|||
void setChargingEnabled(in boolean enabled);
|
||||
void setChargingDeadline(in long deadline);
|
||||
int getSupportedMode();
|
||||
long getChargingDeadline();
|
||||
vendor.lineage.health.ChargingLimitInfo getChargingLimit();
|
||||
void setChargingLimit(in vendor.lineage.health.ChargingLimitInfo limit);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022-2023 The LineageOS Project
|
||||
* Copyright (C) 2022-2025 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -24,7 +24,8 @@
|
|||
package vendor.lineage.health;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum ChargingControlSupportedMode {
|
||||
TOGGLE = 1,
|
||||
BYPASS = 2,
|
||||
DEADLINE = 4,
|
||||
TOGGLE = (1 << 0) /* 1 */,
|
||||
BYPASS = (1 << 1) /* 2 */,
|
||||
DEADLINE = (1 << 2) /* 4 */,
|
||||
LIMIT = (1 << 3) /* 8 */,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (C) 2023-2025 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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.lineage.health;
|
||||
@JavaDerive(toString=true) @VintfStability
|
||||
parcelable ChargingLimitInfo {
|
||||
int max;
|
||||
int min;
|
||||
}
|
|
@ -28,4 +28,7 @@ interface IChargingControl {
|
|||
void setChargingEnabled(in boolean enabled);
|
||||
void setChargingDeadline(in long deadline);
|
||||
int getSupportedMode();
|
||||
long getChargingDeadline();
|
||||
vendor.lineage.health.ChargingLimitInfo getChargingLimit();
|
||||
void setChargingLimit(in vendor.lineage.health.ChargingLimitInfo limit);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022-2023 The LineageOS Project
|
||||
* Copyright (C) 2022-2025 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -22,4 +22,9 @@ enum ChargingControlSupportedMode {
|
|||
* The device supports control charging by specifying the deadline
|
||||
*/
|
||||
DEADLINE = 1 << 2,
|
||||
|
||||
/**
|
||||
* The device supports control charging by specifying the limit
|
||||
*/
|
||||
LIMIT = 1 << 3,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright (C) 2023-2025 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.lineage.health;
|
||||
|
||||
@JavaDerive(toString=true) @VintfStability
|
||||
parcelable ChargingLimitInfo {
|
||||
int max;
|
||||
int min;
|
||||
}
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
package vendor.lineage.health;
|
||||
|
||||
import vendor.lineage.health.ChargingLimitInfo;
|
||||
|
||||
@VintfStability
|
||||
interface IChargingControl {
|
||||
/**
|
||||
|
@ -48,4 +50,38 @@ interface IChargingControl {
|
|||
* @return a bitmask of ChargingControlSupportedMode.
|
||||
*/
|
||||
int getSupportedMode();
|
||||
|
||||
/**
|
||||
* Get the charging control deadline, if deadline mode is supported.
|
||||
*
|
||||
* @return the deadline in seconds.
|
||||
* If error:
|
||||
* - Return exception with code EX_ILLEGAL_STATE
|
||||
* if the value can't be determined from the driver.
|
||||
* - Return service specific error with code STATUS_UNKNOWN
|
||||
* for other errors.
|
||||
*/
|
||||
long getChargingDeadline();
|
||||
|
||||
/**
|
||||
* Get the charging control limit, if limit mode is supported.
|
||||
*
|
||||
* @return the charging control limit.
|
||||
* If error:
|
||||
* - Return exception with code EX_ILLEGAL_STATE
|
||||
* if the value can't be determined from the driver.
|
||||
* - Return service specific error with code STATUS_UNKNOWN
|
||||
* for other errors.
|
||||
*/
|
||||
ChargingLimitInfo getChargingLimit();
|
||||
|
||||
/**
|
||||
* Set the charging control limit, if limit mode is supported.
|
||||
*
|
||||
* @return nothing if successful.
|
||||
* If error:
|
||||
* - Return service specific error with code STATUS_UNKNOWN
|
||||
* for other errors.
|
||||
*/
|
||||
void setChargingLimit(in ChargingLimitInfo limit);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue