File: device_configuration.proto

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (217 lines) | stat: -rw-r--r-- 8,595 bytes parent folder | download | duplicates (11)
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
208
209
210
211
212
213
214
215
216
217
// Copyright 2009 Google Inc. All Rights Reserved.
// Author: ilyaf@google.com (Ilya Firman)
//
// Defines the protocol buffer message used to upload and store device
// configuration details. This message is used in the Checkin and Market
// device-side API, in the IMAS and Search Server Stubby APIs, as well as
// in the Android Kansas and Market storage schemas. Please keep this in
// mind when making changes.
//
// Copied from google3/wireless/android/proto/device_configuration.proto
// The android part in path needs to be removed.

syntax = "proto2";

package device_configuration;

option optimize_for = LITE_RUNTIME;

// The protocol buffer message used to upload device configuration details.
//
// Next id: 30
message DeviceConfigurationProto {
  enum TouchScreen {
    UNDEFINED_TOUCH_SCREEN = 0;
    NOTOUCH = 1;
    STYLUS = 2;
    FINGER = 3;
  }

  // The kind of touch screen attached to the device.
  required TouchScreen touch_screen = 1;

  enum Keyboard {
    UNDEFINED_KEYBOARD = 0;
    NOKEYS = 1;
    QWERTY = 2;
    TWELVE_KEY = 3;
  }

  // The kind of keyboard attached to the device.
  required Keyboard keyboard = 2;

  enum Navigation {
    UNDEFINED_NAVIGATION = 0;
    NONAV = 1;
    DPAD = 2;
    TRACKBALL = 3;
    WHEEL = 4;
  }

  // The kind of navigation method available on the device.
  required Navigation navigation = 3;

  enum ScreenLayout {
    UNDEFINED_SCREEN_LAYOUT = 0;
    SMALL = 1;
    NORMAL = 2;
    LARGE = 3;
    EXTRA_LARGE = 4;
  }

  // Overall layout of the screen (stable). This is calculated by Phonesky from
  // stable screen density, which is provided by the framework.
  required ScreenLayout screen_layout = 4;

  // Layout information read directly from framework. This is not stable and may
  // change depending on dynamic screen size. As of Phonesky gnt release, this
  // field is sent in addition to screen_layout field.
  optional ScreenLayout dynamic_screen_layout = 27;

  // If true, indicates that the device has a physical keyboard.
  required bool has_hard_keyboard = 5;

  // NOTE: We ignore this field.  Instead the navigation field above is used to
  //       determine if a device has five-way navigation capability.
  // If true, indicates that the device supports 5-way navigation.
  required bool has_five_way_navigation = 6;

  // The screen density of the device, in DPI.
  required int32 screen_density = 7;

  // The screen width, in pixels.
  optional int32 screen_width = 12;

  // The screen height, in pixels.
  optional int32 screen_height = 13;

  // The GLES version on the device. The upper order 16 bits represent the
  // major version and the lower order 16 bits the minor version. A value of 0
  // indicates that the version is unavailable.
  required int32 gl_es_version = 8;

  // List of shared libraries that are available on the system.
  // Corresponds to PackageManager.getSystemSharedLibraryNames() in the SDK.
  repeated string system_shared_library = 9;

  // TODO(mruppaner): Mark this as deprecated as soon as we collect the new
  // system_available_feature_info field everywhere correctly.
  //
  // List of features available on the device.
  // Corresponds to PackageManager.getSystemAvailableFeatures() in Eclair and
  // later SDK builds.
  // This field stores the de-duplicated list of features reported in the
  // latest checkin request.
  //
  // See also
  // http://developer.android.com/reference/android/content/pm/PackageManager.html#getSystemAvailableFeatures()
  //
  // Prefer system_available_feature_info if available and set.
  repeated string system_available_feature = 10;

  // TODO(mruppaner): Fill in Play Store and GmsCore versions.
  // List of features available on the device.
  // Corresponds to PackageManager.getSystemAvailableFeatures() in N and
  // later SDK builds as well as devices running Play Store XXX and GmsCore XXX.
  // This field stores the de-duplicated list of features reported in the
  // latest checkin (GmsCore) or /uploadDeviceConfig (Play) request.
  //
  // See also
  // http://developer.android.com/reference/android/content/pm/PackageManager.html#getSystemAvailableFeatures()
  //
  // If set this field should be preferred over system_available_feature.
  repeated FeatureInfo system_available_feature_info = 26;

  // List of native platforms (CPU types) supported by the device, e.g.
  // "armeabi".
  //
  // On L+ devices, this is Build.SUPPORTED_ABIS. On older devices, it is
  // [Build.CPU_ABI] or, if Build.CPU_ABI2 is present, [Build.CPU_ABI,
  // Build.CPU_ABI2]. In any case, the device's preference order is maintained.
  repeated string native_platform = 11;

  // List of locales supported by the device.
  // Useful for self-update targeting and possibly other filtering.
  repeated string system_supported_locale = 14;

  // List of OpenGL extensions supported by the device.
  repeated string gl_extension = 15;

  // Index 16 reserved for deprecated field device_class. It was never stored.
  reserved 16;

  // Maximum APK download size supported by the device, in MB. On pre-Honeycomb
  // devices, this is determined by the size of the /cache partition. As of
  // Jan 2011, this property is not reported by the device: all devices are
  // expected to support 50M downloads, unless specifically overridden in the
  // Market Device Library.
  // Feb 2014, b/12693457 updated the CTS DownloadManagerTest to require 100 MB.
  optional int32 max_apk_download_size_mb = 17 [default = 50];

  // This is the smallest value of both screenWidthDp and screenHeightDp
  // in both portrait and landscape.
  // See
  // http://developer.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp
  // This field is only set for devices with API Level >=13 not using the
  // default value
  // http://developer.android.com/reference/android/content/res/Configuration.html#SMALLEST_SCREEN_WIDTH_DP_UNDEFINED
  optional int32 smallest_screen_width_dp = 18;

  // See
  // http://developer.android.com/reference/android/app/ActivityManager.html#isLowRamDevice()
  // This field is only set for device with API >=19.
  optional bool low_ram_device = 19;

  // The total accessible memory in bytes.
  // API >=16 devices can look at
  // http://developer.android.com/reference/android/app/ActivityManager.MemoryInfo.html#totalMem
  optional int64 total_memory_bytes = 20;

  // Maximum number of CPU cores.
  // API >=18 devices can reliably look at
  // http://developer.android.com/reference/java/lang/Runtime.html#availableProcessors()
  // Note that Runtime#availableProcessors is available since API 1 but the
  // javadoc (as of API 23) gives a clear recommendation:
  // "Returns the number of processor cores available to the VM, at least 1.
  // Traditionally this returned the number currently online, but many mobile
  // devices are able to take unused cores offline to save power, so releases
  // newer than Android 4.2 (Jelly Bean) return the maximum number of cores
  // that could be made available if there were no power or heat constraints."
  optional int32 max_num_of_cpu_cores = 21;

  // Types of network connections the device is currently using (at the time of
  // checkin). These should be a subset of "connection_capabilities" and thus
  // should be within the documented set of connection capabilities, as
  // mentioned above.
  // Case-sensitive.
  repeated string current_connection_type = 22;

  // Value of build property "ro.oem.key1" set by OEMs on the device. This is
  // used by OEMs to configure different list of apps to be auto installed
  // during device setup for different values of the build property.
  // See go/pai-keys-prd.
  optional string ro_oem_key1 = 29;

  // Indicates whether the device is secured with a lock  like a
  // PIN, pattern or password.
  optional bool secure_screenlock = 28;
}

// Definition of an hardware or software feature of an Android device.
//
// Starting in Android N, features can have a version, which must always be
// backwards compatible. That is, a device claiming to support version 3 of a
// specific feature must support apps requesting version 1 of that feature.
//
// See also
// http://developer.android.com/reference/android/content/pm/FeatureInfo.html
//
// Next id: 3
message FeatureInfo {
  // [Required] The name of this feature, for example "android.hardware.camera".
  optional string name = 1;

  // If set, this is the maximum version of this feature supported by the
  // device. The device implicitly supports all older versions of this feature.
  optional int32 version = 2;
}