Stay organized with collections
Save and categorize content based on your preferences.
CarPowerPolicy
public
final
class
CarPowerPolicy
extends Object
implements
Parcelable
java.lang.Object
|
↳ |
android.car.hardware.power.CarPowerPolicy
|
Car power policy definition.
Summary
Inherited constants |
From interface
android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR
|
int |
PARCELABLE_ELIDE_DUPLICATES
|
int |
PARCELABLE_STABILITY_LOCAL
|
int |
PARCELABLE_STABILITY_VINTF
|
int |
PARCELABLE_WRITE_RETURN_VALUE
|
|
Inherited methods |
From class
java.lang.Object
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()
|
|
From interface
android.os.Parcelable
abstract
int
|
describeContents()
|
default
int
|
getStability()
|
abstract
void
|
writeToParcel(Parcel arg0, int arg1)
|
|
Fields
Public methods
describeContents
public int describeContents ()
getDisabledComponents
public int[] getDisabledComponents ()
List of disabled componentst. Components are one of
android.frameworks.automotive.powerpolicy.PowerComponent
.
getEnabledComponents
public int[] getEnabledComponents ()
List of enabled componentst. Components are one of
android.frameworks.automotive.powerpolicy.PowerComponent
.
getPolicyId
public String getPolicyId ()
ID of power policy.
isComponentEnabled
public boolean isComponentEnabled (int component)
Returns true
if the given component is enabled in the power policy. Otherwise,
false
.
toString
public String toString ()
writeToParcel
public void writeToParcel (Parcel dest,
int flags)
Parameters |
dest |
Parcel |
flags |
int |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-17 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-17 UTC."],[],[],null,["# CarPowerPolicy\n\nSummary: [Inherited Constants](#inhconstants) \\| [Fields](#lfields) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nCarPowerPolicy\n==============\n\n\n`\npublic\n\nfinal\n\nclass\nCarPowerPolicy\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\nParcelable\n\n\n`\n\n|---|-------------------------------------------|\n| java.lang.Object ||\n| ↳ | android.car.hardware.power.CarPowerPolicy |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCar power policy definition.\n\nSummary\n-------\n\n| ### Inherited constants |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| From interface `android.os.Parcelable` |-------|---------------------------------| | `int` | `CONTENTS_FILE_DESCRIPTOR` | | `int` | `PARCELABLE_ELIDE_DUPLICATES` | | `int` | `PARCELABLE_STABILITY_LOCAL` | | `int` | `PARCELABLE_STABILITY_VINTF` | | `int` | `PARCELABLE_WRITE_RETURN_VALUE` | |\n\n| ### Fields ||\n|----------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|\n| ` public static final Creator\u003c`[CarPowerPolicy](/reference/android/car/hardware/power/CarPowerPolicy)`\u003e` | [CREATOR](/reference/android/car/hardware/power/CarPowerPolicy#CREATOR) |\n\n| ### Public methods ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` int` | ` `[describeContents](/reference/android/car/hardware/power/CarPowerPolicy#describeContents())`() ` |\n| ` int[]` | ` `[getDisabledComponents](/reference/android/car/hardware/power/CarPowerPolicy#getDisabledComponents())`() ` List of disabled componentst. |\n| ` int[]` | ` `[getEnabledComponents](/reference/android/car/hardware/power/CarPowerPolicy#getEnabledComponents())`() ` List of enabled componentst. |\n| ` String` | ` `[getPolicyId](/reference/android/car/hardware/power/CarPowerPolicy#getPolicyId())`() ` ID of power policy. |\n| ` boolean` | ` `[isComponentEnabled](/reference/android/car/hardware/power/CarPowerPolicy#isComponentEnabled(int))`(int component) ` Returns `true` if the given component is enabled in the power policy. |\n| ` String` | ` `[toString](/reference/android/car/hardware/power/CarPowerPolicy#toString())`() ` |\n| ` void` | ` `[writeToParcel](/reference/android/car/hardware/power/CarPowerPolicy#writeToParcel(android.os.Parcel,%20int))`(Parcel dest, int flags) ` |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` 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() ` | ||\n| From interface ` android.os.Parcelable ` |------------------|------------------------------------------| | ` abstract int` | ` describeContents() ` | | ` default int` | ` getStability() ` | | ` abstract void` | ` writeToParcel(Parcel arg0, int arg1) ` | ||\n\nFields\n------\n\n### CREATOR\n\n```\npublic static final Creator\u003cCarPowerPolicy\u003e CREATOR\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### describeContents\n\n```\npublic int describeContents ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getDisabledComponents\n\n```\npublic int[] getDisabledComponents ()\n```\n\nList of disabled componentst. Components are one of\n`android.frameworks.automotive.powerpolicy.PowerComponent`.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|--------|\n| `int[]` | \u003cbr /\u003e |\n\n### getEnabledComponents\n\n```\npublic int[] getEnabledComponents ()\n```\n\nList of enabled componentst. Components are one of\n`android.frameworks.automotive.powerpolicy.PowerComponent`.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|--------|\n| `int[]` | \u003cbr /\u003e |\n\n### getPolicyId\n\n```\npublic String getPolicyId ()\n```\n\nID of power policy.\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |\n\n### isComponentEnabled\n\n```\npublic boolean isComponentEnabled (int component)\n```\n\nReturns `true` if the given component is enabled in the power policy. Otherwise,\n`false`.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|--------------|\n| `component` | `int` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |\n\n### toString\n\n```\npublic String toString ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |\n\n### writeToParcel\n\n```\npublic void writeToParcel (Parcel dest, \n int flags)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|-----------------|\n| `dest` | `Parcel` \u003cbr /\u003e |\n| `flags` | `int` \u003cbr /\u003e |"]]