Driving Restriction Development Guide
Apps on Pleos Connect must implement in-vehicle UX limits according to the platform CarUxRestrictions state. This guide covers the integration architecture and implementation notes. For regional feature limits and when restrictions turn ON/OFF, see Driving Restriction Policy by Region. For UX design principles while driving, see Design Considering Driving Safety.
HMG CarUxRestrictions architecture (OEM Custom)
Pleos Connect provides AAOS CarUxRestrictions as OEM Custom aligned with HMG vehicle specifications. The platform does not use the default logic of CarDrivingStateService; HmgCarDrivingStateService injects driving-state values that match HMG specifications into AAOS. Apps use only CarUxRestrictionsManager and CarDrivingStateManager in the Application layer.

In the diagram, the HMG OEM Custom portion is where HmgCarDrivingStateService derives driving state per HMG specifications. Driving-restriction ON/OFF (speed, gear, brakes, and so on) is handled inside the platform; apps only receive driving state and UX limits through the Manager APIs.
CarUxRestrictions integration
Apps obtain CarUxRestrictions through AAOS CarUxRestrictionsManager, check driving-restriction state, and implement behavior per specification.
After registering with CarUxRestrictionsManager, receive CarUxRestrictions updates via Notify. You can also refer to driving state using CarDrivingStateManager.
Sample code
if (mCurrentCarUxRestrictions.isRequiresDistractionOptimization()
&& (mCurrentCarUxRestrictions.getActiveRestrictions()
& CarUxRestrictions.UX_RESTRICTIONS_NO_VIDEO) != 0) {
stopPlayingVideo();
}
Mapping UX rules to CarUxRestrictions
Apply feature-specific CarUxRestrictions flags based on the CarUxRestrictions API and ActiveRestrictions received via Notify.
- Example: for video (DMB), use
CarUxRestrictions.UX_RESTRICTIONS_NO_VIDEOto determine whether playback must be restricted while driving. - The UX restriction Figma specification is not published on Pleos Playground.
The platform delivers ActiveRestrictions aligned with the regional restriction specification. Apps must not change CarUxRestrictions based on product.sw.target_region; apply only the CarUxRestrictions received via Notify. For regional allow/lock rules and flag mapping (QR, keyboard, search, and similar), see Driving Restriction Policy by Region.
HMG extension constants marked @hide, such as UX_RESTRICTIONS_NO_SETUP_QR_SCAN, may not be in the public SDK. In that case, use the android-car.jar distributed by the platform team. See the HMG CFI Libs documentation or contact the platform team.
Driving-restriction testing
You can inject VHAL events to simulate driving-restriction ON/OFF during development and verification. For Connect-W and other platform-specific steps, see ADB Command Reference — Driving restrictions.
Turn restrictions ON (Connect-S/L/W)
Running the commands below turns restrictions on; they turn off automatically after -t seconds (for example, 60).
adb shell "dumpsys activity service com.android.car inject-vhal-event 0x21408A93 1; dumpsys activity service com.android.car inject-vhal-event 0x11600207 30 -t 60"
adb shell "dumpsys activity service com.android.car inject-vhal-event 0x21408209 1; dumpsys activity service com.android.car inject-vhal-event 0x11600207 30 -t 60"
adb shell "dumpsys activity service com.android.car inject-vhal-event 0x214081A4 1; dumpsys activity service com.android.car inject-vhal-event 0x11600207 30 -t 60"
Turn restrictions OFF (Connect-S/L/W, manual)
To turn restrictions off manually before auto-off, inject only the Engine Running signal as 0 (OFF) per powertrain.
# ICE
adb shell dumpsys activity service com.android.car inject-vhal-event 0x21408A93 0
# HEV
adb shell dumpsys activity service com.android.car inject-vhal-event 0x21408209 0
# EV
adb shell dumpsys activity service com.android.car inject-vhal-event 0x214081A4 0