CarPowerPolicy

public final class CarPowerPolicy
extends Object implements Parcelable

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


Car power policy definition.

Summary

Inherited constants

int CONTENTS_FILE_DESCRIPTOR

int PARCELABLE_ELIDE_DUPLICATES

int PARCELABLE_STABILITY_LOCAL

int PARCELABLE_STABILITY_VINTF

int PARCELABLE_WRITE_RETURN_VALUE

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.

String toString()
void writeToParcel(Parcel dest, int flags)

Inherited methods

Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()
abstract int describeContents()
default int getStability()
abstract void writeToParcel(Parcel arg0, int arg1)

Fields

CREATOR

public static final Creator<CarPowerPolicy> CREATOR

Public methods

describeContents

public int describeContents ()

Returns
int

getDisabledComponents

public int[] getDisabledComponents ()

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

Returns
int[]

getEnabledComponents

public int[] getEnabledComponents ()

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

Returns
int[]

getPolicyId

public String getPolicyId ()

ID of power policy.

Returns
String

isComponentEnabled

public boolean isComponentEnabled (int component)

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

Parameters
component int

Returns
boolean

toString

public String toString ()

Returns
String

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int