CarPowerPolicy

public final class CarPowerPolicy
extends Object implements Parcelable

java.lang.Object
   ↳ android.car.hardware.power.CarPowerPolicy


Car power policy definition.

Summary

Inherited constants

Fields

public static final Creator<CarPowerPolicy> CREATOR

Public methods

int describeContents()
int[] getDisabledComponents()

List of disabled componentst.

int[] getEnabledComponents()

List of enabled componentst.

String getPolicyId()

ID of power policy.

boolean isComponentEnabled(int component)

Returns true if the given component is enabled in the power policy.

void writeToParcel(Parcel dest, int flags)

Inherited methods

Fields

CREATOR

Added in API level 31
public static final Creator<CarPowerPolicy> CREATOR

Public methods

describeContents

Added in API level 31
public int describeContents ()

Returns
int

getDisabledComponents

Added in API level 31
public int[] getDisabledComponents ()

List of disabled componentst. Components are one of android.frameworks.automotive.powerpolicy.PowerComponent.

Returns
int[]

getEnabledComponents

Added in API level 31
public int[] getEnabledComponents ()

List of enabled componentst. Components are one of android.frameworks.automotive.powerpolicy.PowerComponent.

Returns
int[]

getPolicyId

Added in API level 31
public String getPolicyId ()

ID of power policy.

Returns
String

isComponentEnabled

Added in API level 31
public boolean isComponentEnabled (int component)

Returns true if the given component is enabled in the power policy. Otherwise, false.

Parameters
component int

Returns
boolean

writeToParcel

Added in API level 31
public void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int