diff --git a/sdk/src/java/lineageos/health/HealthInterface.java b/sdk/src/java/lineageos/health/HealthInterface.java index 7cb41543..d5d76e32 100644 --- a/sdk/src/java/lineageos/health/HealthInterface.java +++ b/sdk/src/java/lineageos/health/HealthInterface.java @@ -119,6 +119,21 @@ public class HealthInterface { return false; } + /** + * Returns whether charging control is supported + * + * @return true if charging control is supported + */ + public static boolean isChargingControlSupported(Context context) { + try { + return getInstance(context).isChargingControlSupported(); + } catch (RuntimeException e) { + Log.e(TAG, e.getLocalizedMessage(), e); + } + + return false; + } + /** * Returns the charging control enabled status *