• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17syntax = "proto2";
18
19package systemui;
20
21option java_package = "com.android.systemui.statusbar.phone";
22option java_outer_classname = "TouchAnalyticsProto";
23
24message Session {
25    message TouchEvent {
26        message BoundingBox {
27            optional float width = 1;
28            optional float height = 2;
29        }
30
31        enum Action {
32            // Keep in sync with MotionEvent.
33            DOWN = 0;
34            UP = 1;
35            MOVE = 2;
36            CANCEL = 3;
37            OUTSIDE = 4;
38            POINTER_DOWN = 5;
39            POINTER_UP = 6;
40        }
41
42        message Pointer {
43            optional float x = 1;
44            optional float y = 2;
45            optional float size = 3;
46            optional float pressure = 4;
47            optional int32 id = 5;
48            optional float removed_length = 6;
49            optional BoundingBox removed_boundingBox = 7;
50        }
51
52        optional uint64 timeOffsetNanos = 1;
53        optional Action action = 2;
54        optional int32 actionIndex = 3;
55        repeated Pointer pointers = 4;
56        optional bool removed_redacted = 5;
57        optional BoundingBox removed_boundingBox = 6;
58    }
59
60    message SensorEvent {
61        enum Type {
62            ACCELEROMETER = 1;
63            GYROSCOPE = 4;
64            LIGHT = 5;
65            PROXIMITY = 8;
66            ROTATION_VECTOR = 11;
67        }
68
69        optional Type type = 1;
70        optional uint64 timeOffsetNanos = 2;
71        repeated float values = 3;
72        optional uint64 timestamp = 4;
73    }
74
75    message PhoneEvent {
76        enum Type {
77            ON_SCREEN_ON = 0;
78            ON_SCREEN_ON_FROM_TOUCH = 1;
79            ON_SCREEN_OFF = 2;
80            ON_SUCCESSFUL_UNLOCK = 3;
81            ON_BOUNCER_SHOWN = 4;
82            ON_BOUNCER_HIDDEN = 5;
83            ON_QS_DOWN = 6;
84            SET_QS_EXPANDED_TRUE = 7;
85            SET_QS_EXPANDED_FALSE = 8;
86            ON_TRACKING_STARTED = 9;
87            ON_TRACKING_STOPPED = 10;
88            ON_NOTIFICATION_ACTIVE = 11;
89            ON_NOTIFICATION_INACTIVE = 12;
90            ON_NOTIFICATION_DOUBLE_TAP = 13;
91            SET_NOTIFICATION_EXPANDED = 14;
92            RESET_NOTIFICATION_EXPANDED = 15;
93            ON_NOTIFICATION_START_DRAGGING_DOWN = 16;
94            ON_NOTIFICATION_STOP_DRAGGING_DOWN = 17;
95            ON_NOTIFICATION_DISMISSED = 18;
96            ON_NOTIFICATION_START_DISMISSING = 19;
97            ON_NOTIFICATION_STOP_DISMISSING = 20;
98            ON_RIGHT_AFFORDANCE_SWIPING_STARTED = 21;
99            ON_LEFT_AFFORDANCE_SWIPING_STARTED = 22;
100            ON_AFFORDANCE_SWIPING_ABORTED = 23;
101            ON_CAMERA_ON = 24;
102            ON_LEFT_AFFORDANCE_ON = 25;
103            ON_UNLOCK_HINT_STARTED = 26;
104            ON_CAMERA_HINT_STARTED = 27;
105            ON_LEFT_AFFORDANCE_HINT_STARTED = 28;
106        }
107
108        optional Type type = 1;
109        optional uint64 timeOffsetNanos = 2;
110    }
111
112    enum Result {
113        FAILURE = 0;
114        SUCCESS = 1;
115        UNKNOWN = 2;
116    }
117
118    enum Type {
119        RESERVED_1 = 0;
120        RESERVED_2 = 1;
121        RANDOM_WAKEUP = 2;
122        REAL = 3;
123        REJECTED_TOUCH_REPORT = 4;
124    }
125
126    optional uint64 startTimestampMillis = 1;
127    optional uint64 durationMillis = 2;
128    optional string build = 3;
129    optional Result result = 4;
130    repeated TouchEvent touchEvents = 5;
131    repeated SensorEvent sensorEvents = 6;
132
133    optional int32 touchAreaWidth = 9;
134    optional int32 touchAreaHeight = 10;
135    optional Type type = 11;
136    repeated PhoneEvent phoneEvents = 12;
137
138    optional string device_id = 13;
139}