Stay organized with collections
Save and categorize content based on your preferences.
CarPowerManager.CarPowerPolicyListener
public
static
interface
CarPowerManager.CarPowerPolicyListener
android.car.hardware.power.CarPowerManager.CarPowerPolicyListener
|
Listeners to receive power policy change.
Applications interested in power policy change register
CarPowerPolicyListener
and will be notified when power policy changes.
Summary
Public methods
onPolicyChanged
public abstract void onPolicyChanged (CarPowerPolicy policy)
Called with CarPowerPolicy
when power policy changes.
Parameters |
policy |
CarPowerPolicy : The current power policy. |
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,["# CarPowerManager.CarPowerPolicyListener\n======================================\n\n\n`\npublic\nstatic\n\n\ninterface\nCarPowerManager.CarPowerPolicyListener\n`\n\n\n`\n\n\n`\n\n|-------------------------------------------------------------------|\n| android.car.hardware.power.CarPowerManager.CarPowerPolicyListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nListeners to receive power policy change.\n\nApplications interested in power policy change register\n`CarPowerPolicyListener` and will be notified when power policy changes.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onPolicyChanged](/reference/android/car/hardware/power/CarPowerManager.CarPowerPolicyListener#onPolicyChanged(android.car.hardware.power.CarPowerPolicy))`(`[CarPowerPolicy](/reference/android/car/hardware/power/CarPowerPolicy)` policy) ` Called with [CarPowerPolicy](/reference/android/car/hardware/power/CarPowerPolicy) when power policy changes. |\n\nPublic methods\n--------------\n\n### onPolicyChanged\n\n```\npublic abstract void onPolicyChanged (CarPowerPolicy policy)\n```\n\nCalled with [CarPowerPolicy](/reference/android/car/hardware/power/CarPowerPolicy) when power policy changes.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------------------------------------|\n| `policy` | `CarPowerPolicy`: The current power policy. \u003cbr /\u003e |"]]