@aiot-toolkit/emulator 2.0.6-beta.2 → 2.0.6-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/emulatorutil/constants.d.ts +1 -0
- package/lib/emulatorutil/constants.js +4 -2
- package/lib/emulatorutil/running.js +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +36 -0
- package/lib/instance/index.js +1 -1
- package/lib/instance/minisound.js +12 -5
- package/lib/instance/miwear.js +1 -1
- package/lib/static/avdConfigIni.json +1 -1
- package/lib/static/proto/emulator_controller.proto +181 -26
- package/lib/static/proto/ui_controller_service.proto +147 -0
- package/lib/typing/Vvd.d.ts +2 -1
- package/lib/typing/Vvd.js +1 -0
- package/lib/vvd/grpc/index.d.ts +16 -8
- package/lib/vvd/grpc/index.js +83 -19
- package/lib/vvd/grpc/types/GrpcClient.d.ts +43 -2
- package/lib/vvd/grpc/types/UiControllerClient.d.ts +23 -0
- package/lib/vvd/grpc/types/index.d.ts +3 -0
- package/lib/vvd/grpc/types/index.js +38 -0
- package/lib/vvd/grpc/types/proto-types.d.ts +178 -0
- package/lib/vvd/grpc/types/proto-types.js +50 -0
- package/lib/vvd/index.d.ts +2 -2
- package/lib/vvd/index.js +38 -14
- package/package.json +4 -8
- package/lib/vvd/grpc/types/KeyEvent.d.ts +0 -19
- package/lib/vvd/grpc/types/KeyEvent.js +0 -20
- package/lib/vvd/grpc/types/MouseEvent.d.ts +0 -30
- /package/lib/vvd/grpc/types/{MouseEvent.js → UiControllerClient.js} +0 -0
|
@@ -93,9 +93,10 @@ const EmulatorEnvVersion = exports.EmulatorEnvVersion = {
|
|
|
93
93
|
name: '模拟器资源版本管理',
|
|
94
94
|
[_Vvd.SDKParts.EMULATOR]: '0.1.0',
|
|
95
95
|
[_Vvd.SDKParts.QA]: '0.0.1',
|
|
96
|
-
[_Vvd.SDKParts.SKINS]: '0.0.
|
|
96
|
+
[_Vvd.SDKParts.SKINS]: '0.0.12',
|
|
97
97
|
[_Vvd.SDKParts.SYSTEM_IMAGES]: VelaImageVersionList[0].time,
|
|
98
|
-
[_Vvd.SDKParts.MODEM_SIMULATOR]: '0.0.3'
|
|
98
|
+
[_Vvd.SDKParts.MODEM_SIMULATOR]: '0.0.3',
|
|
99
|
+
[_Vvd.SDKParts.TOOLS]: '0.0.3'
|
|
99
100
|
};
|
|
100
101
|
|
|
101
102
|
/** 获取镜像下载地址 */
|
|
@@ -123,6 +124,7 @@ function getSDKPartDownloadUrl(type) {
|
|
|
123
124
|
case _Vvd.SDKParts.QA:
|
|
124
125
|
case _Vvd.SDKParts.MODEM_SIMULATOR:
|
|
125
126
|
case _Vvd.SDKParts.SKINS:
|
|
127
|
+
case _Vvd.SDKParts.TOOLS:
|
|
126
128
|
return `${baseUrl}/${type}/v${EmulatorEnvVersion[type]}/${type}.zip`;
|
|
127
129
|
}
|
|
128
130
|
}
|
|
@@ -54,7 +54,7 @@ function resolveLinuxPath() {
|
|
|
54
54
|
for (const pattern of linuxPatterns) {
|
|
55
55
|
if (!pattern) continue;
|
|
56
56
|
const dir = resolvePath(pattern);
|
|
57
|
-
if (dir && _fs.default.existsSync(dir) && _fs.default.
|
|
57
|
+
if (dir && _fs.default.existsSync(dir) && _fs.default.statSync(dir).isDirectory()) {
|
|
58
58
|
return dir;
|
|
59
59
|
}
|
|
60
60
|
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -87,4 +87,40 @@ Object.keys(_shared).forEach(function (key) {
|
|
|
87
87
|
return _shared[key];
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
+
});
|
|
91
|
+
var _index = require("./vvd/grpc/index");
|
|
92
|
+
Object.keys(_index).forEach(function (key) {
|
|
93
|
+
if (key === "default" || key === "__esModule") return;
|
|
94
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
95
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
96
|
+
Object.defineProperty(exports, key, {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _index[key];
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
var _types = require("./vvd/grpc/types");
|
|
104
|
+
Object.keys(_types).forEach(function (key) {
|
|
105
|
+
if (key === "default" || key === "__esModule") return;
|
|
106
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
107
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
108
|
+
Object.defineProperty(exports, key, {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _types[key];
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
var _logcat = require("./vvd/logcat");
|
|
116
|
+
Object.keys(_logcat).forEach(function (key) {
|
|
117
|
+
if (key === "default" || key === "__esModule") return;
|
|
118
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
119
|
+
if (key in exports && exports[key] === _logcat[key]) return;
|
|
120
|
+
Object.defineProperty(exports, key, {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _logcat[key];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
90
126
|
});
|
package/lib/instance/index.js
CHANGED
|
@@ -53,7 +53,7 @@ function getInstanceClass(imageType) {
|
|
|
53
53
|
[_Vvd.VelaImageType.VELA_MIWEAR_WATCH_5]: _miwear2.VelaMiwear5,
|
|
54
54
|
[_Vvd.VelaImageType.VELA_MIWEAR_MINISOUND_5]: _minisound.MiniSound5
|
|
55
55
|
};
|
|
56
|
-
return map[imageType] ||
|
|
56
|
+
return map[imageType] || _miwear2.VelaMiwear5;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -4,24 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MiniSound5 = void 0;
|
|
7
|
-
var _adb = require("@miwt/adb");
|
|
7
|
+
var _adb = _interopRequireWildcard(require("@miwt/adb"));
|
|
8
|
+
var adbMiwt = _adb;
|
|
8
9
|
var _Vvd = require("../typing/Vvd");
|
|
9
10
|
var _miwear = require("./miwear5");
|
|
11
|
+
var _util = require("util");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
14
|
class MiniSound5 extends _miwear.VelaMiwear5 {
|
|
11
15
|
imageType = (() => _Vvd.VelaImageType.VELA_MIWEAR_MINISOUND_5)();
|
|
12
16
|
appDir = '/data/app';
|
|
13
|
-
static emulatorStartedFlag =
|
|
17
|
+
static emulatorStartedFlag = /Boot completed/;
|
|
14
18
|
static appStartedFlag = /Start main loop/;
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* 使用 pm 安装快应用
|
|
18
22
|
* @param targeRpk 快应用的rpk文件路径
|
|
19
23
|
*/
|
|
20
|
-
install(targeRpk) {
|
|
24
|
+
async install(targeRpk) {
|
|
21
25
|
const installCmd = `adb -s ${this.sn} shell pm install ${targeRpk}`;
|
|
22
26
|
this.logger(`Excuting: ${installCmd}`);
|
|
23
|
-
const res =
|
|
24
|
-
|
|
27
|
+
const res = await adbMiwt.execAdbCmdAsync(installCmd);
|
|
28
|
+
await (0, _util.promisify)(process.nextTick)();
|
|
29
|
+
this.logger(`Install result: ${res}`);
|
|
30
|
+
// vela 5 安装成功的日志为:
|
|
31
|
+
// onInstallResult: com.application.watch.demo(success 0)
|
|
25
32
|
if (res.includes('(success 0)')) {
|
|
26
33
|
return Promise.resolve();
|
|
27
34
|
} else {
|
package/lib/instance/miwear.js
CHANGED
|
@@ -64,7 +64,7 @@ class MiwearInstance extends _common.default {
|
|
|
64
64
|
function getTimeout(size) {
|
|
65
65
|
if (!size) return 10 * 1000;
|
|
66
66
|
const mu = size / 1024 / 1024;
|
|
67
|
-
return mu < 1 ?
|
|
67
|
+
return mu < 1 ? 20 * 1000 : mu < 4 ? 60 * 1000 : 2 * 60 * 1000;
|
|
68
68
|
}
|
|
69
69
|
const timeout = getTimeout(options?.size);
|
|
70
70
|
let timer = setTimeout(() => {
|
|
@@ -57,6 +57,9 @@ service EmulatorController {
|
|
|
57
57
|
returns (stream PhysicalModelValue) {}
|
|
58
58
|
|
|
59
59
|
// Atomically set/get the current primary clipboard data.
|
|
60
|
+
// Note that a call to setClipboard will result in an immediate
|
|
61
|
+
// event for those who made a call to streamClipboard and are
|
|
62
|
+
// on a different channel than the one used to set the clipboard.
|
|
60
63
|
rpc setClipboard(ClipData) returns (google.protobuf.Empty) {}
|
|
61
64
|
rpc getClipboard(google.protobuf.Empty) returns (ClipData) {}
|
|
62
65
|
|
|
@@ -176,15 +179,13 @@ service EmulatorController {
|
|
|
176
179
|
// already.
|
|
177
180
|
rpc injectAudio(stream AudioPacket) returns (google.protobuf.Empty) {}
|
|
178
181
|
|
|
179
|
-
//
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
// Deprecated, please use the streamLogcat method instead.
|
|
183
|
+
rpc getLogcat(LogMessage) returns (LogMessage) {
|
|
184
|
+
option deprecated = true;
|
|
185
|
+
}
|
|
183
186
|
|
|
184
|
-
// Streams the logcat output from the emulator.
|
|
185
|
-
// can retrieve up to 128Kb. This call will not return.
|
|
187
|
+
// Streams the logcat output from the emulator.
|
|
186
188
|
// Note that parsed logcat messages are only available after L (Api >23)
|
|
187
|
-
// it is possible that the logcat buffer gets overwritten, or falls behind.
|
|
188
189
|
rpc streamLogcat(LogMessage) returns (stream LogMessage) {}
|
|
189
190
|
|
|
190
191
|
// Transition the virtual machine to the desired state. Note that
|
|
@@ -233,10 +234,19 @@ service EmulatorController {
|
|
|
233
234
|
rpc streamNotification(google.protobuf.Empty)
|
|
234
235
|
returns (stream Notification) {}
|
|
235
236
|
|
|
236
|
-
//
|
|
237
|
+
// Rotation angles are relative to the camera's current orientation.
|
|
238
|
+
// The coordinate system is right-handed and is defined as follows:
|
|
239
|
+
// x axis is pointing right
|
|
240
|
+
// y axis is pointing up
|
|
241
|
+
// z axis is pointing towards the viewer
|
|
242
|
+
// The z component of rotation is not used when calling this method.
|
|
237
243
|
rpc rotateVirtualSceneCamera(RotationRadian)
|
|
238
244
|
returns (google.protobuf.Empty) {}
|
|
239
|
-
// Velocity is absolute
|
|
245
|
+
// Velocity is absolute and is measured in meters per second.
|
|
246
|
+
// The coordinate system is right-handed and is defined as follows:
|
|
247
|
+
// x axis is pointing right
|
|
248
|
+
// y axis is pointing up
|
|
249
|
+
// z axis is pointing towards the viewer
|
|
240
250
|
rpc setVirtualSceneCameraVelocity(Velocity)
|
|
241
251
|
returns (google.protobuf.Empty) {}
|
|
242
252
|
// Set foldable posture
|
|
@@ -262,6 +272,16 @@ service EmulatorController {
|
|
|
262
272
|
// is not resizable. The following gRPC error codes can be returned:
|
|
263
273
|
// - FAILED_PRECONDITION (code 9) if the AVD is not resizable.
|
|
264
274
|
rpc setDisplayMode(DisplayMode) returns (google.protobuf.Empty) {}
|
|
275
|
+
|
|
276
|
+
// Changes the XR-related settings. Fails if the AVD is not XR. The
|
|
277
|
+
// following gRPC error codes can be returned:
|
|
278
|
+
// - FAILED_PRECONDITION (code 9) if the AVD is not XR.
|
|
279
|
+
rpc setXrOptions(XrOptions) returns (google.protobuf.Empty) {}
|
|
280
|
+
|
|
281
|
+
// Gets the current state of XR-related settings. Fails if the AVD is not
|
|
282
|
+
// XR. The following gRPC error codes can be returned:
|
|
283
|
+
// - FAILED_PRECONDITION (code 9) if the AVD is not XR.
|
|
284
|
+
rpc getXrOptions(google.protobuf.Empty) returns (XrOptions) {}
|
|
265
285
|
}
|
|
266
286
|
|
|
267
287
|
// A Run State that describes the state of the Virtual Machine.
|
|
@@ -297,6 +317,12 @@ message VmRunState {
|
|
|
297
317
|
// Guest experienced some error state, you cannot transition to this
|
|
298
318
|
// state.
|
|
299
319
|
INTERNAL_ERROR = 10;
|
|
320
|
+
// Completely restart the emulator.
|
|
321
|
+
RESTART = 11;
|
|
322
|
+
// Resume a stopped emulator
|
|
323
|
+
START = 12;
|
|
324
|
+
// Stop (pause) a running emulator
|
|
325
|
+
STOP = 13;
|
|
300
326
|
}
|
|
301
327
|
|
|
302
328
|
RunState state = 1;
|
|
@@ -470,6 +496,26 @@ message DisplayMode {
|
|
|
470
496
|
DisplayModeValue value = 1;
|
|
471
497
|
}
|
|
472
498
|
|
|
499
|
+
message XrOptions {
|
|
500
|
+
enum Environment {
|
|
501
|
+
LIVING_ROOM_DAY = 0;
|
|
502
|
+
LIVING_ROOM_NIGHT = 1;
|
|
503
|
+
// More environments may be added later.
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// The currently active artificial surrounding environment (a.k.a.
|
|
507
|
+
// passthrough environment).
|
|
508
|
+
Environment environment = 1;
|
|
509
|
+
|
|
510
|
+
// A value of 0.0 means that the real or artificial surrounding environment
|
|
511
|
+
// (a.k.a. passthrough environment) is not visible. A value of 1.0 means
|
|
512
|
+
// that the passthrough environment is fully visible. Any value outside of
|
|
513
|
+
// the range [0.0-1.0] is ignored and leaves the state of passthrough
|
|
514
|
+
// unchanged. For simplicity of the implementation, this number may be
|
|
515
|
+
// rounded to an integer before applying.
|
|
516
|
+
float passthrough_coefficient = 2;
|
|
517
|
+
}
|
|
518
|
+
|
|
473
519
|
message LogMessage {
|
|
474
520
|
// [Output Only] The contents of the log output.
|
|
475
521
|
string contents = 1;
|
|
@@ -477,11 +523,11 @@ message LogMessage {
|
|
|
477
523
|
// should match the start parameter sent with the request. If the serial
|
|
478
524
|
// console output exceeds the size of the buffer, older output will be
|
|
479
525
|
// overwritten by newer content and the start values will be mismatched.
|
|
480
|
-
int64 start = 2;
|
|
526
|
+
int64 start = 2 [deprecated = true];
|
|
481
527
|
//[Output Only] The position of the next byte of content from the serial
|
|
482
528
|
// console output. Use this value in the next request as the start
|
|
483
529
|
// parameter.
|
|
484
|
-
int64 next = 3;
|
|
530
|
+
int64 next = 3 [deprecated = true];
|
|
485
531
|
|
|
486
532
|
// Set the sort of response you are interested it in.
|
|
487
533
|
// It the type is "Parsed" the entries field will contain the parsed
|
|
@@ -628,6 +674,21 @@ message Touch {
|
|
|
628
674
|
}
|
|
629
675
|
|
|
630
676
|
EventExpiration expiration = 7;
|
|
677
|
+
|
|
678
|
+
// The orientation of the contact, if any.
|
|
679
|
+
int32 orientation = 8;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
// A Pen is similar to a touch, with the addition
|
|
683
|
+
// of button and rubber information.
|
|
684
|
+
message Pen {
|
|
685
|
+
Touch location = 1;
|
|
686
|
+
|
|
687
|
+
// True if the button is pressed or not
|
|
688
|
+
bool button_pressed = 2;
|
|
689
|
+
|
|
690
|
+
// True if it is a rubber pointer.
|
|
691
|
+
bool rubber_pointer = 3;
|
|
631
692
|
}
|
|
632
693
|
|
|
633
694
|
// A TouchEvent contains a list of Touch objects that are in contact with
|
|
@@ -643,9 +704,15 @@ message TouchEvent {
|
|
|
643
704
|
|
|
644
705
|
// The display device where the touch event occurred.
|
|
645
706
|
// Omitting or using the value 0 indicates the main display.
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
707
|
+
int32 display = 2;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
message PenEvent {
|
|
711
|
+
// The list of Pen objects, note that these do not need to be unique
|
|
712
|
+
repeated Pen events = 1;
|
|
713
|
+
|
|
714
|
+
// The display device where the pen event occurred.
|
|
715
|
+
// Omitting or using the value 0 indicates the main display.
|
|
649
716
|
int32 display = 2;
|
|
650
717
|
}
|
|
651
718
|
|
|
@@ -653,11 +720,11 @@ message TouchEvent {
|
|
|
653
720
|
// interacting with a pointing device (such as a mouse).
|
|
654
721
|
message MouseEvent {
|
|
655
722
|
// The horizontal coordinate. This is the physical location on the
|
|
656
|
-
// screen
|
|
723
|
+
// screen, where 0 indicates the leftmost coordinate.
|
|
657
724
|
int32 x = 1;
|
|
658
725
|
|
|
659
|
-
// The vertical coordinate. This is the physical location on the screen
|
|
660
|
-
//
|
|
726
|
+
// The vertical coordinate. This is the physical location on the screen,
|
|
727
|
+
// where 0 indicates the topmost coordinate.
|
|
661
728
|
int32 y = 2;
|
|
662
729
|
|
|
663
730
|
// Indicates which buttons are pressed.
|
|
@@ -783,15 +850,57 @@ message KeyboardEvent {
|
|
|
783
850
|
string text = 5;
|
|
784
851
|
}
|
|
785
852
|
|
|
853
|
+
message XrCommand {
|
|
854
|
+
enum Action {
|
|
855
|
+
// Recenter the viewport position and rotation.
|
|
856
|
+
RECENTER = 0;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
Action action = 1;
|
|
860
|
+
}
|
|
861
|
+
|
|
786
862
|
// An input event that can be delivered to the emulator.
|
|
787
863
|
message InputEvent {
|
|
788
864
|
oneof type {
|
|
789
865
|
KeyboardEvent key_event = 1;
|
|
790
866
|
TouchEvent touch_event = 2;
|
|
791
867
|
MouseEvent mouse_event = 3;
|
|
868
|
+
AndroidEvent android_event = 4;
|
|
869
|
+
PenEvent pen_event = 5;
|
|
870
|
+
WheelEvent wheel_event = 6;
|
|
871
|
+
MouseEvent xr_hand_event = 7;
|
|
872
|
+
MouseEvent xr_eye_event = 8;
|
|
873
|
+
XrCommand xr_command = 9;
|
|
874
|
+
RotationRadian xr_head_rotation_event = 10;
|
|
875
|
+
Translation xr_head_movement_event = 11;
|
|
876
|
+
AngularVelocity xr_head_angular_velocity_event = 12;
|
|
877
|
+
Velocity xr_head_velocity_event = 13;
|
|
792
878
|
}
|
|
793
879
|
};
|
|
794
880
|
|
|
881
|
+
// The android input event system is a framework for handling input from a
|
|
882
|
+
// variety of devices by generating events that describe changes in the
|
|
883
|
+
// state of the devices and forwarding them to user space applications.
|
|
884
|
+
//
|
|
885
|
+
// An AndroidEvents will be delivered directly to the kernel as is.
|
|
886
|
+
message AndroidEvent {
|
|
887
|
+
// The type of the event. The types of the event are specified
|
|
888
|
+
// by the android kernel. Some examples are:
|
|
889
|
+
// EV_SYN, EV_KEY, EV_SW, etc..
|
|
890
|
+
// The exact definitions can be found in the input.h header file.
|
|
891
|
+
int32 type = 1;
|
|
892
|
+
|
|
893
|
+
// The actual code to be send to the kernel. The actual meaning
|
|
894
|
+
// of the code depends on the type definition.
|
|
895
|
+
int32 code = 2;
|
|
896
|
+
|
|
897
|
+
// The actual value of the event.
|
|
898
|
+
int32 value = 3;
|
|
899
|
+
|
|
900
|
+
// The display id associated with this input event.
|
|
901
|
+
int32 display = 4;
|
|
902
|
+
};
|
|
903
|
+
|
|
795
904
|
message Fingerprint {
|
|
796
905
|
// True when the fingprint is touched.
|
|
797
906
|
bool isTouching = 1;
|
|
@@ -1054,6 +1163,17 @@ message EmulatorStatus {
|
|
|
1054
1163
|
// The hardware configuration of the running emulator as
|
|
1055
1164
|
// key valure pairs.
|
|
1056
1165
|
EntryList hardwareConfig = 5;
|
|
1166
|
+
|
|
1167
|
+
// Some guests will produce a heart beat, that can be used to
|
|
1168
|
+
// detect if the guest is active.
|
|
1169
|
+
// This is a monotonically increasing number that gets incremented
|
|
1170
|
+
// around once a second.
|
|
1171
|
+
uint64 heartbeat = 6;
|
|
1172
|
+
|
|
1173
|
+
// The configuration of services in the guest, this map
|
|
1174
|
+
// contains key value pairs that are specific to the image
|
|
1175
|
+
// used by the guest.
|
|
1176
|
+
map<string, string> guestConfig = 7;
|
|
1057
1177
|
}
|
|
1058
1178
|
|
|
1059
1179
|
message AudioFormat {
|
|
@@ -1258,11 +1378,17 @@ message Notification {
|
|
|
1258
1378
|
DisplayConfigurationsChangedNotification
|
|
1259
1379
|
displayConfigurationsChangedNotification = 3;
|
|
1260
1380
|
Posture posture = 4;
|
|
1261
|
-
|
|
1381
|
+
BootCompletedNotification booted = 5;
|
|
1382
|
+
BrightnessValue brightness = 6;
|
|
1383
|
+
|
|
1384
|
+
// This notification is sent when a TextView receives or loses focus.
|
|
1385
|
+
// It is also sent immediately in response to the streamNotification
|
|
1386
|
+
// call.
|
|
1387
|
+
TextViewFocus textViewFocus = 7;
|
|
1262
1388
|
}
|
|
1263
1389
|
}
|
|
1264
1390
|
|
|
1265
|
-
message
|
|
1391
|
+
message BootCompletedNotification {
|
|
1266
1392
|
// The time in milliseconds it took for the boot to complete.
|
|
1267
1393
|
// Note that this value can be 0 when you are loading from a snapshot.
|
|
1268
1394
|
int32 time = 1;
|
|
@@ -1277,6 +1403,15 @@ message CameraNotification {
|
|
|
1277
1403
|
int32 display = 2;
|
|
1278
1404
|
}
|
|
1279
1405
|
|
|
1406
|
+
message TextViewFocus {
|
|
1407
|
+
// Indicates whether a text view currently has focus.
|
|
1408
|
+
bool textViewHasFocus = 1;
|
|
1409
|
+
|
|
1410
|
+
// If a text view has focus, the display where the text view is located.
|
|
1411
|
+
// Otherwise, unset.
|
|
1412
|
+
int32 display = 2;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1280
1415
|
// Fired when an update to a display event has been fired through the extended
|
|
1281
1416
|
// ui. This does not fire events when the display is changed through the console
|
|
1282
1417
|
// or the gRPC endpoint.
|
|
@@ -1285,16 +1420,36 @@ message DisplayConfigurationsChangedNotification {
|
|
|
1285
1420
|
}
|
|
1286
1421
|
|
|
1287
1422
|
message RotationRadian {
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
float
|
|
1291
|
-
|
|
1423
|
+
// Components of the rotation vector in radians.
|
|
1424
|
+
// Rotation angles are relative to the current orientation.
|
|
1425
|
+
float x = 1; // Angle of rotation around the x axis in right-handed direction.
|
|
1426
|
+
float y = 2; // Angle of rotation around the y axis in right-handed direction.
|
|
1427
|
+
float z = 3; // Angle of rotation around the z axis in right-handed direction.
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
message Translation {
|
|
1431
|
+
// Components of the translation vector in meters.
|
|
1432
|
+
float delta_x = 1;
|
|
1433
|
+
float delta_y = 2;
|
|
1434
|
+
float delta_z = 3;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
message AngularVelocity {
|
|
1438
|
+
// Components of the target angular velocity vector in radians per second.
|
|
1439
|
+
// Transition to these values is implementation dependent, and may be
|
|
1440
|
+
// smoothed over time.
|
|
1441
|
+
float omega_x = 1;
|
|
1442
|
+
float omega_y = 2;
|
|
1443
|
+
float omega_z = 3;
|
|
1292
1444
|
}
|
|
1293
1445
|
|
|
1294
1446
|
message Velocity {
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1447
|
+
// Components of the target velocity vector in meters per second.
|
|
1448
|
+
// Transition to these values is implementation dependent, and may be
|
|
1449
|
+
// smoothed over time.
|
|
1450
|
+
float x = 1;
|
|
1451
|
+
float y = 2;
|
|
1452
|
+
float z = 3;
|
|
1298
1453
|
}
|
|
1299
1454
|
|
|
1300
1455
|
// Must follow the definition in "external/qemu/android/hw-sensors.h"
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// Copyright 2020 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
option java_multiple_files = true;
|
|
18
|
+
option java_package = "com.android.emulator.control";
|
|
19
|
+
option objc_class_prefix = "AEC";
|
|
20
|
+
|
|
21
|
+
package android.emulation.control;
|
|
22
|
+
import "google/protobuf/empty.proto";
|
|
23
|
+
|
|
24
|
+
service UiController {
|
|
25
|
+
// PaneEntry specifies which pane will be selected when
|
|
26
|
+
// the extended control is shown. If the extended is visible already,
|
|
27
|
+
// this method will set visibilityChangedto to false.
|
|
28
|
+
rpc showExtendedControls(PaneEntry) returns (ExtendedControlsStatus) {}
|
|
29
|
+
// this method has no effect if the extended controls are hidden.
|
|
30
|
+
// In that case, visibilityChanged will be set to false;
|
|
31
|
+
rpc closeExtendedControls(google.protobuf.Empty)
|
|
32
|
+
returns (ExtendedControlsStatus) {}
|
|
33
|
+
rpc setUiTheme(ThemingStyle) returns (google.protobuf.Empty) {}
|
|
34
|
+
|
|
35
|
+
// Returns the user configuration of the running emulator. The user
|
|
36
|
+
// configuration contains information about the user interface.
|
|
37
|
+
rpc getUserConfig(google.protobuf.Empty) returns (UserConfig) {}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message UserConfigEntry {
|
|
41
|
+
string key = 1;
|
|
42
|
+
string value = 2;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// The user configuration of the running emulator as
|
|
46
|
+
// key value pairs. This contains the data you normally find
|
|
47
|
+
// in emulator-user.ini
|
|
48
|
+
message UserConfig {
|
|
49
|
+
repeated UserConfigEntry entries = 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message ThemingStyle {
|
|
53
|
+
enum Style {
|
|
54
|
+
LIGHT = 0;
|
|
55
|
+
DARK = 1;
|
|
56
|
+
CONTRAST = 2;
|
|
57
|
+
}
|
|
58
|
+
Style style = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message ExtendedControlsStatus {
|
|
62
|
+
bool visibilityChanged = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// The pixel coordinates are resolution independent, meaning the coordinates
|
|
66
|
+
// are independent from the pixel grid, resulting in a graphical user
|
|
67
|
+
// interface that is displayed at a consistent location, regardless of the
|
|
68
|
+
// resolution of the screen.
|
|
69
|
+
//
|
|
70
|
+
// For technical details: https://doc.qt.io/qt-5/highdpi.html
|
|
71
|
+
//
|
|
72
|
+
// Some things to note:
|
|
73
|
+
//
|
|
74
|
+
// - You cannot move a window offscreen.
|
|
75
|
+
// - There is a padding of around 10px around the frame.
|
|
76
|
+
//
|
|
77
|
+
// This means that moving to (0, 0) or (10, 10) will have the same result.
|
|
78
|
+
// This means that anchoring might not exactly behave as requested.
|
|
79
|
+
message WindowPosition {
|
|
80
|
+
// Anchor that is used to determine horizontal window placement.
|
|
81
|
+
enum HorizontalAnchor {
|
|
82
|
+
LEFT = 0; // The x coordinate will be treated as the left edge of the
|
|
83
|
+
// window.
|
|
84
|
+
HCENTER = 1; // The x coordinate will be treated as the middle between
|
|
85
|
+
// the left and right edges of the window.
|
|
86
|
+
RIGHT = 2; // The x coordinate will be treated as the right edge of
|
|
87
|
+
// the window.
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Anchor that is used to determine vertical window placement.
|
|
91
|
+
enum VerticalAnchor {
|
|
92
|
+
TOP = 0; // The y coordinate will be treated as the top edge of the
|
|
93
|
+
// window.
|
|
94
|
+
VCENTER = 1; // The y coordinate will be treated as the middle between
|
|
95
|
+
// the top and bottom edges of the window.
|
|
96
|
+
BOTTOM = 3; // The y coordinate will be treated as the bottom edge of
|
|
97
|
+
// the window.
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Corresponds to the x and y coordinate of the window geometry. The window
|
|
101
|
+
// geometry includes the window frame.
|
|
102
|
+
// See: https://doc.qt.io/qt-5/application-windows.html#window-geometry for
|
|
103
|
+
// details and pecularities on linux.
|
|
104
|
+
uint32 x = 1;
|
|
105
|
+
uint32 y = 2;
|
|
106
|
+
|
|
107
|
+
HorizontalAnchor horizontalAnchor = 3;
|
|
108
|
+
VerticalAnchor verticalAnchor = 4;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message PaneEntry {
|
|
112
|
+
enum PaneIndex {
|
|
113
|
+
// When specified as KEEP_CURRENT, extended controls will display the
|
|
114
|
+
// current pane.
|
|
115
|
+
// If it is the first time for extended controls to be shown, LOCATION
|
|
116
|
+
// will be used.
|
|
117
|
+
KEEP_CURRENT = 0;
|
|
118
|
+
// Referenced from
|
|
119
|
+
// external/qemu/android/android-emu/android/skin/qt/extended-window-styles.h
|
|
120
|
+
LOCATION = 1;
|
|
121
|
+
MULTIDISPLAY = 2;
|
|
122
|
+
CELLULAR = 3;
|
|
123
|
+
BATTERY = 4;
|
|
124
|
+
CAMERA = 5;
|
|
125
|
+
TELEPHONE = 6;
|
|
126
|
+
DPAD = 7;
|
|
127
|
+
TV_REMOTE = 8;
|
|
128
|
+
ROTARY = 9;
|
|
129
|
+
MICROPHONE = 10;
|
|
130
|
+
FINGER = 11;
|
|
131
|
+
VIRT_SENSORS = 12;
|
|
132
|
+
SNAPSHOT = 13;
|
|
133
|
+
BUGREPORT = 14;
|
|
134
|
+
RECORD = 15;
|
|
135
|
+
GOOGLE_PLAY = 16;
|
|
136
|
+
SETTINGS = 17;
|
|
137
|
+
HELP = 18;
|
|
138
|
+
CAR = 19;
|
|
139
|
+
CAR_ROTARY = 20;
|
|
140
|
+
SENSOR_REPLAY = 21;
|
|
141
|
+
};
|
|
142
|
+
PaneIndex index = 1;
|
|
143
|
+
|
|
144
|
+
// Set the window position to the specified coordinates if no coordinates are
|
|
145
|
+
// present in the AVD, otherwise this value will be igonred.
|
|
146
|
+
WindowPosition position = 2;
|
|
147
|
+
}
|
package/lib/typing/Vvd.d.ts
CHANGED
|
@@ -100,7 +100,8 @@ export declare enum SDKParts {
|
|
|
100
100
|
QA = "qa",
|
|
101
101
|
SKINS = "skins",
|
|
102
102
|
SYSTEM_IMAGES = "system-images",
|
|
103
|
-
MODEM_SIMULATOR = "modem_simulator"
|
|
103
|
+
MODEM_SIMULATOR = "modem_simulator",
|
|
104
|
+
TOOLS = "tools"
|
|
104
105
|
}
|
|
105
106
|
export declare enum VELAHOME {
|
|
106
107
|
SDK = ".vela/sdk",
|
package/lib/typing/Vvd.js
CHANGED
|
@@ -23,6 +23,7 @@ let SDKParts = exports.SDKParts = /*#__PURE__*/function (SDKParts) {
|
|
|
23
23
|
SDKParts["SKINS"] = "skins";
|
|
24
24
|
SDKParts["SYSTEM_IMAGES"] = "system-images";
|
|
25
25
|
SDKParts["MODEM_SIMULATOR"] = "modem_simulator";
|
|
26
|
+
SDKParts["TOOLS"] = "tools";
|
|
26
27
|
return SDKParts;
|
|
27
28
|
}({});
|
|
28
29
|
let VELAHOME = exports.VELAHOME = /*#__PURE__*/function (VELAHOME) {
|