Added in API level 31

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

abstract void onPolicyChanged(CarPowerPolicy policy)

Called with CarPowerPolicy when power policy changes.

Public methods

onPolicyChanged

Added in API level 31
public abstract void onPolicyChanged (CarPowerPolicy policy)

Called with CarPowerPolicy when power policy changes.

Parameters
policy CarPowerPolicy: The current power policy.