Kaskader
Kaskader

Reputation: 311

Default measurement system in Android

I'm struggling with setting units in the Android build by default. It's Android Automotive OS 13. Because of def_device_provisioned=true and def_user_setup_complete=true, a user is not asked for personal preferences (which is intended). In my android.mk file, I set the default locale and timezone like that.

PRODUCT_LOCALES := pl_PL
PRODUCT_PROPERTY_OVERRIDES := persist.sys.timezone=Europe/Warsaw

My problem is that the system starts with degrees Fahrenheit for temperature and miles for velocity. I know I can change it in the settings but I want to make the system pre-configured.

Upvotes: 1

Views: 232

Answers (1)

Kaskader
Kaskader

Reputation: 311

I've found it :)!

Basically, it's not just a setting - it is a VHAL parameter. You need to check android.hardware.automotive.vehicle implementation for the default value.

For [email protected] (default in Android 11), the file you're looking for is hardware\interfaces\automotive\vehicle\2.0\default\impl\vhal_v2_0\DefaultConfig.h

For android.hardware.automotive.vehicle@V1-emulator-service (default in Android 11, based on AIDL instead of HIDL), the file is hardware\interfaces\automotive\vehicle\aidl\impl\default_config\include\DefaultConfig.h

Upvotes: 1

Related Questions