Skip to content
Vehicle properties
Power & shutdown

POWER_POLICY_GROUP_REQ

What it is

Defines a request to set the power polic group used to decide a default power policy per power status transition.

VHAL sets this property with the ID of a power policy group in order to set the default power policy applied at power status transition. Power policy groups are defined at /vendor/etc/power_policy.xml. If the given ID is not defined, car power policy service ignores the request. Car power policy service subscribes to this property and sets the power policy group. The actual application of power policy takes place when the system power status changes and there is a valid mapped power policy for the new power status.

  string: "sample_policy_group_id" // power policy group ID

How the ID is built

A property ID is a 32-bit value packing four fields. Reading 0x11100f22 apart:

FieldMaskValueMeans
Group0xf00000000x10000000SYSTEM
Area0x0f0000000x01000000GLOBAL
Type0x00ff00000x00100000STRING
Ordinal0x0000ffff0x00000f220xf22

Reading it from an app

CarPropertyManager mgr = (CarPropertyManager)
        car.getCarManager(Car.PROPERTY_SERVICE);

CarPropertyValue<String> value =
        mgr.getProperty(VehiclePropertyIds.POWER_POLICY_GROUP_REQ, 0);

This property is read-only — writes are rejected. It fires a callback whenever the value changes.