Skip to content
Vehicle properties
Power & shutdown

POWER_POLICY_REQ

What it is

Defines a request to apply power policy.

VHAL sets this property to change car power policy. Car power policy service subscribes to this property and actually changes the power policy. The request is made by setting the VehiclePropValue with the ID of a power policy which is defined at /vendor/etc/automotive/power_policy.xml. If the given ID is not defined, car power policy service ignores the request and the current power policy is maintained.

  string: "sample_policy_id" // power policy ID

How the ID is built

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

FieldMaskValueMeans
Group0xf00000000x10000000SYSTEM
Area0x0f0000000x01000000GLOBAL
Type0x00ff00000x00100000STRING
Ordinal0x0000ffff0x00000f210xf21

Reading it from an app

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

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

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