1syntax = "proto2";
2
3package com.android.server.wm.flicker;
4
5// Each message has its own class file created.
6option java_multiple_files = true;
7
8message FlickerTagProto {
9  enum Transition {
10    ROTATION = 0;
11    APP_LAUNCH = 1;
12    APP_CLOSE = 2;
13    IME_APPEAR = 3;
14    IME_DISAPPEAR = 4;
15    PIP_ENTER = 5;
16    PIP_RESIZE = 6;
17    PIP_EXIT = 7;
18  };
19  required bool isStartTag = 1;
20  required Transition transition = 2;
21  required int32 id = 3;
22  optional int32 layerId = 4;
23  optional string windowToken = 5;
24  optional int32 taskId = 6;
25}
26
27message FlickerTagStateProto {
28  required int64 timestamp = 1;
29  repeated FlickerTagProto tags = 2;
30}
31
32message FlickerTagTraceProto {
33  /* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 |
34     MagicNumber.MAGIC_NUMBER_L (this is needed because enums have to be 32 bits
35     and there's no nice way to put 64bit constants into .proto files. */
36  enum MagicNumber {
37    INVALID = 0;
38    MAGIC_NUMBER_L = 0x54474154; /* TAGT (little-endian ASCII) */
39    MAGIC_NUMBER_H = 0x45434152; /* RACE (little-endian ASCII) */
40  }
41
42  /* Must be the first field, set to value in MagicNumber */
43  optional fixed64 magic_number = 1;
44  repeated FlickerTagStateProto states = 2;
45}