summaryrefslogtreecommitdiff
path: root/emulator/multi-display-dynamic/CarServiceMultiDisplayOverlayEmulator/res/xml/car_ux_restrictions_map.xml
blob: 798873f5cc2b64d5d93c231ef6ace347be95162c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2023 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.
-->

<UxRestrictions xmlns:car="http://schemas.android.com/apk/res-auto">
    <!-- Map the driving states to UX restrictions here -->
    <!-- Note - The platform takes a fully restricted approach when there is no information or if
    the information is malformed.  As a result,
    1. Default values for requiresDistractionOptimization is true, and uxr is fully_restricted.
    2. If uxr != baseline, then requiresDistractionOptimization is automatically promoted to true,
    even if it is declared as false.  Because it doesn't make sense to have an non baseline UX
    restriction without requiresDistractionOptimization set to true.
    So if we don't want any restrictions, requiresDistractionOptimization should be explicitly
    marked as false and uxr should be explicitly set to baseline. -->

    <RestrictionMapping physicalPort="0">
        <DrivingState state="parked">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="idling">
            <Restrictions requiresDistractionOptimization="true" uxr="no_video"/>
        </DrivingState>

        <!-- This is restrictions for moving and speed [0,5m/s) -->
        <DrivingState state="moving" minSpeed="0" maxSpeed="5.0">
            <Restrictions requiresDistractionOptimization="true" uxr="no_dialpad|no_filtering|limit_string_length|no_keyboard|no_video|limit_content|no_setup|no_text_message"/>
        </DrivingState>

        <!-- Restrictions for speed >=5 -->
        <DrivingState state="moving" minSpeed="5.0">
            <Restrictions requiresDistractionOptimization="true" uxr="no_dialpad|no_filtering|limit_string_length|no_keyboard|no_video|limit_content|no_setup|no_text_message"/>
        </DrivingState>

    </RestrictionMapping>

    <!--Setting baseline restrictions for all dynamically added virtual displays -->
    <RestrictionMapping occupantZoneId="1" displayType="1">
        <DrivingState state="parked">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="idling">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="moving">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

    </RestrictionMapping>

    <RestrictionMapping occupantZoneId="2" displayType="1">
        <DrivingState state="parked">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="idling">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="moving">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

    </RestrictionMapping>

    <RestrictionMapping occupantZoneId="3" displayType="1">
        <DrivingState state="parked">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="idling">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="moving">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

    </RestrictionMapping>

    <RestrictionMapping occupantZoneId="4" displayType="1">
        <DrivingState state="parked">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="idling">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

        <DrivingState state="moving">
            <Restrictions requiresDistractionOptimization="false" uxr="baseline"/>
        </DrivingState>

    </RestrictionMapping>

    <!-- Configure restriction parameters here-->
    <RestrictionParameters>
        <!-- Parameters to express displayed String related restrictions -->
        <!-- Max allowed length of general purpose strings when limit_string_length is imposed-->
        <StringRestrictions maxLength="120"/>
        <!-- Parameters to express content related restrictions -->
        <!-- Max number of cumulative content items allowed to be displayed when
        limit_content is imposed. -->
        <!-- Maximum levels deep that the user can navigate to when limit_content is imposed. -->
        <ContentRestrictions maxCumulativeItems="21" maxDepth="3"/>
    </RestrictionParameters>

</UxRestrictions>