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:
| Field | Mask | Value | Means |
|---|---|---|---|
| Group | 0xf0000000 | 0x10000000 | SYSTEM |
| Area | 0x0f000000 | 0x01000000 | GLOBAL |
| Type | 0x00ff0000 | 0x00100000 | STRING |
| Ordinal | 0x0000ffff | 0x00000f21 | 0xf21 |
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.

