Driving Restriction Development Guide
Apps on Pleos Connect must apply in-vehicle UX restrictions based on the platform-provided CarUxRestrictions state. This guide explains how to integrate CarUxRestrictions and the key implementation considerations. 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.
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.
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