Skip to content
Vehicle properties
Users & security

CREATE_USER

What it is

Called by the Android System after an Android user was created.

The HAL can use this property to create its equivalent user.

This is an async request: Android makes the request by setting a VehiclePropValue, and HAL must respond with a property change indicating whether the request succeeded or failed. If it failed, the Android system will remove the user.

The format of the request is defined by CreateUserRequest and the format of the response by CreateUserResponse.

For example, if system had 2 users (0 and 10) and a 3rd one (which is an ephemeral guest) was created, the request would be:

int32[0]: 42 // request id int32[1]: 11 // Android id of the created user int32[2]: 6 // Android flags (ephemeral guest) of the created user int32[3]: 10 // current user int32[4]: 0 // current user flags (none) int32[5]: 3 // number of users int32[6]: 0 // 1st user (user 0) int32[7]: 0 // 1st user flags (none) int32[8]: 10 // 2nd user (user 10) int32[9]: 0 // 2nd user flags (none) int32[19]: 11 // 3rd user (user 11) int32[11]: 6 // 3rd user flags (ephemeral guest) string: "ElGuesto" // name of the new user

Then if the request succeeded, the HAL would return:

int32[0]: 42 // request id int32[1]: 1 // CreateUserStatus::SUCCESS

But if it failed:

int32[0]: 42 // request id int32[1]: 2 // CreateUserStatus::FAILURE string: "D'OH!" // The meaning is a blackbox - it's passed to the caller (like Settings UI), // which in turn can take the proper action.

How the ID is built

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

FieldMaskValueMeans
Group0xf00000000x10000000SYSTEM
Area0x0f0000000x01000000GLOBAL
Type0x00ff00000x00e00000MIXED
Ordinal0x0000ffff0x00000f090xf09

Reading it from an app

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

CarPropertyValue<Object> value =
        mgr.getProperty(VehiclePropertyIds.CREATE_USER, 0);

This property can be read and written, though an OEM may implement it as read-only. It fires a callback whenever the value changes.