aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/proto/Configuration.proto
blob: 6321590649c2e038a7c89e1e145f49f98a779783 (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/*
 * Copyright 2017 The Bazel Authors. All rights reserved.
 *
 * 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.
 */

syntax = "proto3";

package aapt.pb;

option java_package = "com.android.aapt";
option optimize_for = LITE_RUNTIME;

// A description of the requirements a device must have in order for a
// resource to be matched and selected.
message Configuration {
  enum LayoutDirection {
    LAYOUT_DIRECTION_UNSET = 0;
    LAYOUT_DIRECTION_LTR = 1;
    LAYOUT_DIRECTION_RTL = 2;
  }

  enum ScreenLayoutSize {
    SCREEN_LAYOUT_SIZE_UNSET = 0;
    SCREEN_LAYOUT_SIZE_SMALL = 1;
    SCREEN_LAYOUT_SIZE_NORMAL = 2;
    SCREEN_LAYOUT_SIZE_LARGE = 3;
    SCREEN_LAYOUT_SIZE_XLARGE = 4;
  }

  enum ScreenLayoutLong {
    SCREEN_LAYOUT_LONG_UNSET = 0;
    SCREEN_LAYOUT_LONG_LONG = 1;
    SCREEN_LAYOUT_LONG_NOTLONG = 2;
  }

  enum ScreenRound {
    SCREEN_ROUND_UNSET = 0;
    SCREEN_ROUND_ROUND = 1;
    SCREEN_ROUND_NOTROUND = 2;
  }

  enum WideColorGamut {
    WIDE_COLOR_GAMUT_UNSET = 0;
    WIDE_COLOR_GAMUT_WIDECG = 1;
    WIDE_COLOR_GAMUT_NOWIDECG = 2;
  }

  enum Hdr {
    HDR_UNSET = 0;
    HDR_HIGHDR = 1;
    HDR_LOWDR = 2;
  }

  enum Orientation {
    ORIENTATION_UNSET = 0;
    ORIENTATION_PORT = 1;
    ORIENTATION_LAND = 2;
    ORIENTATION_SQUARE = 3;
  }

  enum UiModeType {
    UI_MODE_TYPE_UNSET = 0;
    UI_MODE_TYPE_NORMAL = 1;
    UI_MODE_TYPE_DESK = 2;
    UI_MODE_TYPE_CAR = 3;
    UI_MODE_TYPE_TELEVISION = 4;
    UI_MODE_TYPE_APPLIANCE = 5;
    UI_MODE_TYPE_WATCH = 6;
    UI_MODE_TYPE_VRHEADSET = 7;
  }

  enum UiModeNight {
    UI_MODE_NIGHT_UNSET = 0;
    UI_MODE_NIGHT_NIGHT = 1;
    UI_MODE_NIGHT_NOTNIGHT = 2;
  }

  enum Touchscreen {
    TOUCHSCREEN_UNSET = 0;
    TOUCHSCREEN_NOTOUCH = 1;
    TOUCHSCREEN_STYLUS = 2;
    TOUCHSCREEN_FINGER = 3;
  }

  enum KeysHidden {
    KEYS_HIDDEN_UNSET = 0;
    KEYS_HIDDEN_KEYSEXPOSED = 1;
    KEYS_HIDDEN_KEYSHIDDEN = 2;
    KEYS_HIDDEN_KEYSSOFT = 3;
  }

  enum Keyboard {
    KEYBOARD_UNSET = 0;
    KEYBOARD_NOKEYS = 1;
    KEYBOARD_QWERTY = 2;
    KEYBOARD_TWELVEKEY = 3;
  }

  enum NavHidden {
    NAV_HIDDEN_UNSET = 0;
    NAV_HIDDEN_NAVEXPOSED = 1;
    NAV_HIDDEN_NAVHIDDEN = 2;
  }

  enum Navigation {
    NAVIGATION_UNSET = 0;
    NAVIGATION_NONAV = 1;
    NAVIGATION_DPAD = 2;
    NAVIGATION_TRACKBALL = 3;
    NAVIGATION_WHEEL = 4;
  }

  //
  // Axis/dimensions that are understood by the runtime.
  //

  // Mobile country code.
  uint32 mcc = 1;

  // Mobile network code.
  uint32 mnc = 2;

  // BCP-47 locale tag.
  string locale = 3;

  // Left-to-right, right-to-left...
  LayoutDirection layout_direction = 4;

  // Screen width in pixels. Prefer screen_width_dp.
  uint32 screen_width = 5;

  // Screen height in pixels. Prefer screen_height_dp.
  uint32 screen_height = 6;

  // Screen width in density independent pixels (dp).
  uint32 screen_width_dp = 7;

  // Screen height in density independent pixels (dp).
  uint32 screen_height_dp = 8;

  // The smallest screen dimension, regardless of orientation, in dp.
  uint32 smallest_screen_width_dp = 9;

  // Whether the device screen is classified as small, normal, large, xlarge.
  ScreenLayoutSize screen_layout_size = 10;

  // Whether the device screen is long.
  ScreenLayoutLong screen_layout_long = 11;

  // Whether the screen is round (Android Wear).
  ScreenRound screen_round = 12;

  // Whether the screen supports wide color gamut.
  WideColorGamut wide_color_gamut = 13;

  // Whether the screen has high dynamic range.
  Hdr hdr = 14;

  // Which orientation the device is in (portrait, landscape).
  Orientation orientation = 15;

  // Which type of UI mode the device is in (television, car, etc.).
  UiModeType ui_mode_type = 16;

  // Whether the device is in night mode.
  UiModeNight ui_mode_night = 17;

  // The device's screen density in dots-per-inch (dpi).
  uint32 density = 18;

  // Whether a touchscreen exists, supports a stylus, or finger.
  Touchscreen touchscreen = 19;

  // Whether the keyboard hardware keys are currently hidden, exposed, or
  // if the keyboard is a software keyboard.
  KeysHidden keys_hidden = 20;

  // The type of keyboard present (none, QWERTY, 12-key).
  Keyboard keyboard = 21;

  // Whether the navigation is exposed or hidden.
  NavHidden nav_hidden = 22;

  // The type of navigation present on the device
  // (trackball, wheel, dpad, etc.).
  Navigation navigation = 23;

  // The minimum SDK version of the device.
  uint32 sdk_version = 24;

  //
  // Build-time only dimensions.
  //

  string product = 25;
}