• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4** Copyright 2018, The Android Open Source Project
5**
6** Licensed under the Apache License, Version 2.0 (the "License");
7** you may not use this file except in compliance with the License.
8** You may obtain a copy of the License at
9**
10**     http://www.apache.org/licenses/LICENSE-2.0
11**
12** Unless required by applicable law or agreed to in writing, software
13** distributed under the License is distributed on an "AS IS" BASIS,
14** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15** See the License for the specific language governing permissions and
16** limitations under the License.
17*/
18-->
19
20<resources>
21    <!-- Defines the attributes and values used in res/xml/car_volume_groups.xml -->
22    <declare-styleable name="volumeGroups">
23        <attr name="isDeprecated" format="boolean"/>
24    </declare-styleable>
25    <declare-styleable name="volumeGroups_group"/>
26    <declare-styleable name="volumeGroups_context">
27        <!-- Align with hardware/interfaces/automotive/audiocontrol/1.0/types.hal:ContextNumber -->
28        <attr name="context">
29            <enum name="music" value="1"/>
30            <enum name="navigation" value="2"/>
31            <enum name="voice_command" value="3"/>
32            <enum name="call_ring" value="4"/>
33            <enum name="call" value="5"/>
34            <enum name="alarm" value="6"/>
35            <enum name="notification" value="7"/>
36            <enum name="system_sound" value="8"/>
37        </attr>
38    </declare-styleable>
39
40    <!--
41      Defines the attributes and values used in car_audio_configuration.xml
42      This is a superset of car_volume_groups.xml
43    -->
44    <declare-styleable name="carAudioConfiguration">
45        <attr name="version" format="integer"/>
46        <attr name="isPrimary" format="boolean"/>
47        <attr name="name" format="string"/>
48        <attr name="address" format="string"/>
49        <attr name="display" format="string"/>
50    </declare-styleable>
51
52    <!-- Defines the UX restrictions to be imposed for different driving states of a vehicle -->
53    <declare-styleable name="UxRestrictions"/>
54    <!-- 1. UX restriction Mapping from a driving state of the vehicle-->
55    <declare-styleable name="UxRestrictions_RestrictionMapping">
56        <!-- Physical port that connects to a display. Restrictions defined will apply to the
57             display that connects to this port.
58             Only the lowest byte in the integer value is used. The value should be represented
59             as an signed int, namely the supported range is [-128, 127].
60             Optional field. Defaults to primary display. -->
61        <attr name="physicalPort" format="integer"/>
62    </declare-styleable>
63
64    <!-- 1.a. Driving states supported -->
65    <declare-styleable name="UxRestrictions_DrivingState">
66        <!-- Align with the driving states (@CarDrivingState) defined in
67        packages/services/Car/car-lib/src/android/car/drivingstate/CarDrivingStateEvent.java-->
68        <attr name="state">
69            <enum name="parked" value="0"/>
70            <enum name="idling" value="1"/>
71            <enum name="moving" value="2"/>
72        </attr>
73        <!-- Minimum and Maximum speed attributes useful to provide different restrictions
74        for different speed ranges -->
75        <attr name="minSpeed" format="float"/>
76        <attr name="maxSpeed" format="float"/>
77    </declare-styleable>
78
79    <!-- 1.b. UX restriction types-->
80    <declare-styleable name="UxRestrictions_Restrictions">
81        <!-- This corresponds to what CarUxRestrictions#mRequiresDistractionOptimization needs to
82         be set to. This means that apps will have to follow the general baseline
83         distraction optimization rules defined in the Driver Distraction Guidelines.  -->
84        <attr name="requiresDistractionOptimization" format="boolean"/>
85        <!-- These are the additional UX restrictions that OEMs can configure in addition to
86        the baseline restrictions defined in the above requiresDistractionOptimization.
87        The values here have to align with the UX  Restrictions defined in
88        packages/services/Car/car-lib/src/android/car/drivingstate/CarUxRestrictions.java-->
89        <attr name="uxr">
90            <flag name="baseline" value="0"/>
91            <flag name="no_dialpad" value="1"/>
92            <flag name="no_filtering" value="2"/>
93            <flag name="limit_string_length" value="4"/>
94            <flag name="no_keyboard" value="8"/>
95            <flag name="no_video" value="16"/>
96            <flag name="limit_content" value="32"/>
97            <flag name="no_setup" value="64"/>
98            <flag name="no_text_message" value="128"/>
99            <flag name="no_voice_transcription" value="256"/>
100            <flag name="fully_restricted" value="511"/>
101        </attr>
102        <!-- UX restrictions service supports returning different sets of UX restrictions for
103        the same driving state, through configurations for each "mode". -->
104        <attr name="mode">
105            <!-- Default mode. -->
106            <flag name="baseline" value="0"/>
107            <!-- Mode for passenger to interact with system. -->
108            <flag name="passenger" value="1"/>
109        </attr>
110    </declare-styleable>
111
112    <!-- 2. Some of UX restrictions can be parametrized. -->
113    <declare-styleable name="UxRestrictions_RestrictionParameters"/>
114
115    <!-- 2.a Parameters to express displayed String related restrictions -->
116    <declare-styleable name="UxRestrictions_StringRestrictions">
117        <!-- Max allowed length of general purpose strings when limit_string_length is imposed-->
118        <attr name="maxLength" format="integer"/>
119    </declare-styleable>
120
121    <!-- 2.b. Parameters to express content related restrictions -->
122    <declare-styleable name="UxRestrictions_ContentRestrictions">
123        <!-- Max number of cumulative content items allowed to be displayed when
124        limit_content is imposed. -->
125        <attr name="maxCumulativeItems" format="integer"/>
126        <!-- Maximum levels deep that the user can navigate to when limit_content is imposed. -->
127        <attr name="maxDepth" format="integer"/>
128    </declare-styleable>
129
130</resources>
131