blob: 8db7406298d22eb7501db13dfb18c7e4e1a6c6df [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2018, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources>
<!-- Defines the attributes and values used in res/xml/car_volume_groups.xml -->
<declare-styleable name="volumeGroups">
<attr name="isDeprecated" format="boolean"/>
</declare-styleable>
<declare-styleable name="volumeGroups_group"/>
<declare-styleable name="volumeGroups_context">
<!-- Align with CarAudioContext -->
<attr name="context">
<enum name="music" value="1"/>
<enum name="navigation" value="2"/>
<enum name="voice_command" value="3"/>
<enum name="call_ring" value="4"/>
<enum name="call" value="5"/>
<enum name="alarm" value="6"/>
<enum name="notification" value="7"/>
<enum name="system_sound" value="8"/>
<enum name="emergency" value="9"/>
<enum name="safety" value="10"/>
<enum name="vehicle_status" value="11"/>
<enum name="announcement" value="12"/>
</attr>
</declare-styleable>
<!--
Defines the attributes and values used in car_audio_configuration.xml
This is a superset of car_volume_groups.xml
-->
<declare-styleable name="carAudioConfiguration">
<attr name="version" format="integer"/>
<attr name="isPrimary" format="boolean"/>
<attr name="name" format="string"/>
<attr name="address" format="string"/>
<attr name="display" format="string"/>
</declare-styleable>
<!-- Defines the UX restrictions to be imposed for different driving states of a vehicle -->
<declare-styleable name="UxRestrictions"/>
<!-- 1. UX restriction Mapping from a driving state of the vehicle-->
<declare-styleable name="UxRestrictions_RestrictionMapping">
<!-- Physical port that connects to a display. Restrictions defined will apply to the
display that connects to this port.
Only the lowest byte in the integer value is used. The value should be represented
as an signed int, namely the supported range is [-128, 127].
Optional field. Defaults to primary display. -->
<attr name="physicalPort" format="integer"/>
</declare-styleable>
<!-- 1.a. Driving states supported -->
<declare-styleable name="UxRestrictions_DrivingState">
<!-- Align with the driving states (@CarDrivingState) defined in
packages/services/Car/car-lib/src/android/car/drivingstate/CarDrivingStateEvent.java-->
<attr name="state">
<enum name="parked" value="0"/>
<enum name="idling" value="1"/>
<enum name="moving" value="2"/>
</attr>
<!-- Minimum and Maximum speed attributes useful to provide different restrictions
for different speed ranges -->
<attr name="minSpeed" format="float"/>
<attr name="maxSpeed" format="float"/>
</declare-styleable>
<!-- 1.b. UX restriction types-->
<declare-styleable name="UxRestrictions_Restrictions">
<!-- This corresponds to what CarUxRestrictions#mRequiresDistractionOptimization needs to
be set to. This means that apps will have to follow the general baseline
distraction optimization rules defined in the Driver Distraction Guidelines. -->
<attr name="requiresDistractionOptimization" format="boolean"/>
<!-- These are the additional UX restrictions that OEMs can configure in addition to
the baseline restrictions defined in the above requiresDistractionOptimization.
The values here have to align with the UX Restrictions defined in
packages/services/Car/car-lib/src/android/car/drivingstate/CarUxRestrictions.java-->
<attr name="uxr">
<flag name="baseline" value="0"/>
<flag name="no_dialpad" value="1"/>
<flag name="no_filtering" value="2"/>
<flag name="limit_string_length" value="4"/>
<flag name="no_keyboard" value="8"/>
<flag name="no_video" value="16"/>
<flag name="limit_content" value="32"/>
<flag name="no_setup" value="64"/>
<flag name="no_text_message" value="128"/>
<flag name="no_voice_transcription" value="256"/>
<flag name="fully_restricted" value="511"/>
</attr>
<!-- UX restrictions service supports returning different sets of UX restrictions for the
same driving state, through configurations for each "mode". These modes can be
specified by any string name, for example, "passenger". "baseline" is the default
value. -->
<attr name="mode" format="string"/>
</declare-styleable>
<!-- 2. Some of UX restrictions can be parametrized. -->
<declare-styleable name="UxRestrictions_RestrictionParameters"/>
<!-- 2.a Parameters to express displayed String related restrictions -->
<declare-styleable name="UxRestrictions_StringRestrictions">
<!-- Max allowed length of general purpose strings when limit_string_length is imposed-->
<attr name="maxLength" format="integer"/>
</declare-styleable>
<!-- 2.b. Parameters to express content related restrictions -->
<declare-styleable name="UxRestrictions_ContentRestrictions">
<!-- Max number of cumulative content items allowed to be displayed when
limit_content is imposed. -->
<attr name="maxCumulativeItems" format="integer"/>
<!-- Maximum levels deep that the user can navigate to when limit_content is imposed. -->
<attr name="maxDepth" format="integer"/>
</declare-styleable>
</resources>