• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?><!--
2Copyright 2014 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<restrictions xmlns:android="http://schemas.android.com/apk/res/android">
17
18    <!--
19    Refer to the javadoc of RestrictionsManager for detail of this file.
20    https://developer.android.com/reference/android/content/RestrictionsManager.html
21    -->
22
23    <!-- Boolean restriction -->
24    <restriction
25        android:defaultValue="@bool/default_can_say_hello"
26        android:description="@string/description_can_say_hello"
27        android:key="can_say_hello"
28        android:restrictionType="bool"
29        android:title="@string/title_can_say_hello"/>
30
31    <!-- String restriction -->
32    <restriction
33        android:defaultValue="@string/default_message"
34        android:description="@string/description_message"
35        android:key="message"
36        android:restrictionType="string"
37        android:title="@string/title_message"/>
38
39    <!-- Integer restriction -->
40    <restriction
41        android:defaultValue="@integer/default_number"
42        android:description="@string/description_number"
43        android:key="number"
44        android:restrictionType="integer"
45        android:title="@string/title_number"/>
46
47    <!-- Choice restriction -->
48    <restriction
49        android:defaultValue="@string/default_rank"
50        android:description="@string/description_rank"
51        android:entries="@array/entries_rank"
52        android:entryValues="@array/entry_values_rank"
53        android:key="rank"
54        android:restrictionType="choice"
55        android:title="@string/title_rank"/>
56
57    <!-- Multi-select restriction -->
58    <restriction
59        android:defaultValue="@array/default_approvals"
60        android:description="@string/description_approvals"
61        android:entries="@array/entries_approvals"
62        android:entryValues="@array/entry_values_approvals"
63        android:key="approvals"
64        android:restrictionType="multi-select"
65        android:title="@string/title_approvals"/>
66
67    <!-- Hidden restriction -->
68    <restriction
69        android:defaultValue="@string/default_secret_code"
70        android:description="@string/description_secret_code"
71        android:key="secret_code"
72        android:restrictionType="hidden"
73        android:title="@string/title_secret_code"/>
74
75    <!-- Bundle restriction; useful for grouping restrictions -->
76    <restriction
77        android:description="@string/description_profile"
78        android:key="profile"
79        android:restrictionType="bundle"
80        android:title="@string/title_profile">
81        <restriction
82            android:defaultValue="@string/default_profile_name"
83            android:description="@string/description_profile_name"
84            android:key="name"
85            android:restrictionType="string"
86            android:title="@string/title_profile_name"/>
87        <restriction
88            android:defaultValue="@integer/default_profile_age"
89            android:description="@string/description_profile_age"
90            android:key="age"
91            android:restrictionType="integer"
92            android:title="@string/title_profile_age"/>
93    </restriction>
94
95    <!-- Bundle array restriction -->
96    <restriction
97        android:description="@string/description_items"
98        android:key="items"
99        android:restrictionType="bundle_array"
100        android:title="@string/title_items">
101        <!-- Bundle array must have one bundle restriction -->
102        <restriction
103            android:key="item"
104            android:restrictionType="bundle"
105            android:title="@string/title_item">
106            <restriction
107                android:key="key"
108                android:restrictionType="string"
109                android:title="@string/title_key"/>
110            <restriction
111                android:key="value"
112                android:restrictionType="string"
113                android:title="@string/title_value"/>
114        </restriction>
115    </restriction>
116
117</restrictions>
118