1// Copyright 2009 Google Inc. All Rights Reserved.
2// Author: ilyaf@google.com (Ilya Firman)
3//
4// Defines the protocol buffer message used to upload and store device
5// configuration details. This message is used in the Checkin and Market
6// device-side API, in the IMAS and Search Server Stubby APIs, as well as
7// in the Android Kansas and Market storage schemas. Please keep this in
8// mind when making changes.
9//
10// Copied from google3/wireless/android/proto/device_configuration.proto
11// The android part in path needs to be removed.
12
13syntax = "proto2";
14
15package device_configuration;
16
17option optimize_for = LITE_RUNTIME;
18
19// The protocol buffer message used to upload device configuration details.
20//
21// Next id: 30
22message DeviceConfigurationProto {
23  enum TouchScreen {
24    UNDEFINED_TOUCH_SCREEN = 0;
25    NOTOUCH = 1;
26    STYLUS = 2;
27    FINGER = 3;
28  }
29
30  // The kind of touch screen attached to the device.
31  required TouchScreen touch_screen = 1;
32
33  enum Keyboard {
34    UNDEFINED_KEYBOARD = 0;
35    NOKEYS = 1;
36    QWERTY = 2;
37    TWELVE_KEY = 3;
38  }
39
40  // The kind of keyboard attached to the device.
41  required Keyboard keyboard = 2;
42
43  enum Navigation {
44    UNDEFINED_NAVIGATION = 0;
45    NONAV = 1;
46    DPAD = 2;
47    TRACKBALL = 3;
48    WHEEL = 4;
49  }
50
51  // The kind of navigation method available on the device.
52  required Navigation navigation = 3;
53
54  enum ScreenLayout {
55    UNDEFINED_SCREEN_LAYOUT = 0;
56    SMALL = 1;
57    NORMAL = 2;
58    LARGE = 3;
59    EXTRA_LARGE = 4;
60  }
61
62  // Overall layout of the screen (stable). This is calculated by Phonesky from
63  // stable screen density, which is provided by the framework.
64  required ScreenLayout screen_layout = 4;
65
66  // Layout information read directly from framework. This is not stable and may
67  // change depending on dynamic screen size. As of Phonesky gnt release, this
68  // field is sent in addition to screen_layout field.
69  optional ScreenLayout dynamic_screen_layout = 27;
70
71  // If true, indicates that the device has a physical keyboard.
72  required bool has_hard_keyboard = 5;
73
74  // NOTE: We ignore this field.  Instead the navigation field above is used to
75  //       determine if a device has five-way navigation capability.
76  // If true, indicates that the device supports 5-way navigation.
77  required bool has_five_way_navigation = 6;
78
79  // The screen density of the device, in DPI.
80  required int32 screen_density = 7;
81
82  // The screen width, in pixels.
83  optional int32 screen_width = 12;
84
85  // The screen height, in pixels.
86  optional int32 screen_height = 13;
87
88  // The GLES version on the device. The upper order 16 bits represent the
89  // major version and the lower order 16 bits the minor version. A value of 0
90  // indicates that the version is unavailable.
91  required int32 gl_es_version = 8;
92
93  // List of shared libraries that are available on the system.
94  // Corresponds to PackageManager.getSystemSharedLibraryNames() in the SDK.
95  repeated string system_shared_library = 9;
96
97  // TODO(mruppaner): Mark this as deprecated as soon as we collect the new
98  // system_available_feature_info field everywhere correctly.
99  //
100  // List of features available on the device.
101  // Corresponds to PackageManager.getSystemAvailableFeatures() in Eclair and
102  // later SDK builds.
103  // This field stores the de-duplicated list of features reported in the
104  // latest checkin request.
105  //
106  // See also
107  // http://developer.android.com/reference/android/content/pm/PackageManager.html#getSystemAvailableFeatures()
108  //
109  // Prefer system_available_feature_info if available and set.
110  repeated string system_available_feature = 10;
111
112  // TODO(mruppaner): Fill in Play Store and GmsCore versions.
113  // List of features available on the device.
114  // Corresponds to PackageManager.getSystemAvailableFeatures() in N and
115  // later SDK builds as well as devices running Play Store XXX and GmsCore XXX.
116  // This field stores the de-duplicated list of features reported in the
117  // latest checkin (GmsCore) or /uploadDeviceConfig (Play) request.
118  //
119  // See also
120  // http://developer.android.com/reference/android/content/pm/PackageManager.html#getSystemAvailableFeatures()
121  //
122  // If set this field should be preferred over system_available_feature.
123  repeated FeatureInfo system_available_feature_info = 26;
124
125  // List of native platforms (CPU types) supported by the device, e.g.
126  // "armeabi".
127  //
128  // On L+ devices, this is Build.SUPPORTED_ABIS. On older devices, it is
129  // [Build.CPU_ABI] or, if Build.CPU_ABI2 is present, [Build.CPU_ABI,
130  // Build.CPU_ABI2]. In any case, the device's preference order is maintained.
131  repeated string native_platform = 11;
132
133  // List of locales supported by the device.
134  // Useful for self-update targeting and possibly other filtering.
135  repeated string system_supported_locale = 14;
136
137  // List of OpenGL extensions supported by the device.
138  repeated string gl_extension = 15;
139
140  // Index 16 reserved for deprecated field device_class. It was never stored.
141  reserved 16;
142
143  // Maximum APK download size supported by the device, in MB. On pre-Honeycomb
144  // devices, this is determined by the size of the /cache partition. As of
145  // Jan 2011, this property is not reported by the device: all devices are
146  // expected to support 50M downloads, unless specifically overridden in the
147  // Market Device Library.
148  // Feb 2014, b/12693457 updated the CTS DownloadManagerTest to require 100 MB.
149  optional int32 max_apk_download_size_mb = 17 [default = 50];
150
151  // This is the smallest value of both screenWidthDp and screenHeightDp
152  // in both portrait and landscape.
153  // See
154  // http://developer.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
155  // This field is only set for devices with API Level >=13 not using the
156  // default value
157  // http://developer.android.com/reference/android/content/res/Configuration.html#SMALLEST_SCREEN_WIDTH_DP_UNDEFINED
158  optional int32 smallest_screen_width_dp = 18;
159
160  // See
161  // http://developer.android.com/reference/android/app/ActivityManager.html#isLowRamDevice()
162  // This field is only set for device with API >=19.
163  optional bool low_ram_device = 19;
164
165  // The total accessible memory in bytes.
166  // API >=16 devices can look at
167  // http://developer.android.com/reference/android/app/ActivityManager.MemoryInfo.html#totalMem
168  optional int64 total_memory_bytes = 20;
169
170  // Maximum number of CPU cores.
171  // API >=18 devices can reliably look at
172  // http://developer.android.com/reference/java/lang/Runtime.html#availableProcessors()
173  // Note that Runtime#availableProcessors is available since API 1 but the
174  // javadoc (as of API 23) gives a clear recommendation:
175  // "Returns the number of processor cores available to the VM, at least 1.
176  // Traditionally this returned the number currently online, but many mobile
177  // devices are able to take unused cores offline to save power, so releases
178  // newer than Android 4.2 (Jelly Bean) return the maximum number of cores
179  // that could be made available if there were no power or heat constraints."
180  optional int32 max_num_of_cpu_cores = 21;
181
182  // Types of network connections the device is currently using (at the time of
183  // checkin). These should be a subset of "connection_capabilities" and thus
184  // should be within the documented set of connection capabilities, as
185  // mentioned above.
186  // Case-sensitive.
187  repeated string current_connection_type = 22;
188
189  // Value of build property "ro.oem.key1" set by OEMs on the device. This is
190  // used by OEMs to configure different list of apps to be auto installed
191  // during device setup for different values of the build property.
192  // See go/pai-keys-prd.
193  optional string ro_oem_key1 = 29;
194
195  // Indicates whether the device is secured with a lock  like a
196  // PIN, pattern or password.
197  optional bool secure_screenlock = 28;
198}
199
200// Definition of an hardware or software feature of an Android device.
201//
202// Starting in Android N, features can have a version, which must always be
203// backwards compatible. That is, a device claiming to support version 3 of a
204// specific feature must support apps requesting version 1 of that feature.
205//
206// See also
207// http://developer.android.com/reference/android/content/pm/FeatureInfo.html
208//
209// Next id: 3
210message FeatureInfo {
211  // [Required] The name of this feature, for example "android.hardware.camera".
212  optional string name = 1;
213
214  // If set, this is the maximum version of this feature supported by the
215  // device. The device implicitly supports all older versions of this feature.
216  optional int32 version = 2;
217}
218