| 1 |
/* |
| 2 |
* Copyright (C) 2020 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 |
|
| 17 |
syntax = "proto2"; |
| 18 |
|
| 19 |
import "frameworks/base/core/proto/android/server/accessibility.proto"; |
| 20 |
import "frameworks/base/core/proto/android/server/windowmanagerservice.proto"; |
| 21 |
|
| 22 |
package com.android.server.accessibility; |
| 23 |
|
| 24 |
option java_multiple_files = true; |
| 25 |
|
| 26 |
/* represents a file full of accessibility trace entries. |
| 27 |
Encoded, it should start with 0x9 0x41 0x31 0x31 0x59 0x54 0x52 0x41 0x43 (.A11YTRAC), such |
| 28 |
that they can be easily identified. */ |
| 29 |
message AccessibilityTraceFileProto { |
| 30 |
|
| 31 |
/* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L |
| 32 |
(this is needed because enums have to be 32 bits and there's no nice way to put 64bit |
| 33 |
constants into .proto files. */ |
| 34 |
enum MagicNumber { |
| 35 |
INVALID = 0; |
| 36 |
MAGIC_NUMBER_L = 0x59313141; /* A11Y (little-endian ASCII) */ |
| 37 |
MAGIC_NUMBER_H = 0x43415254; /* TRAC (little-endian ASCII) */ |
| 38 |
} |
| 39 |
|
| 40 |
optional fixed64 magic_number = 1; /* Must be the first field, set to value in MagicNumber */ |
| 41 |
repeated AccessibilityTraceProto entry = 2; |
| 42 |
} |
| 43 |
|
| 44 |
/* one accessibility trace entry. */ |
| 45 |
message AccessibilityTraceProto { |
| 46 |
/* required: elapsed realtime in nanos since boot of when this entry was logged */ |
| 47 |
optional fixed64 elapsed_realtime_nanos = 1; |
| 48 |
optional string calendar_time = 2; |
| 49 |
repeated string logging_type = 3; |
| 50 |
optional string process_name = 4; |
| 51 |
optional string thread_id_name = 5; |
| 52 |
|
| 53 |
/* where the trace originated */ |
| 54 |
optional string where = 6; |
| 55 |
|
| 56 |
optional string calling_pkg = 7; |
| 57 |
optional string calling_params = 8; |
| 58 |
optional string calling_stacks = 9; |
| 59 |
|
| 60 |
optional AccessibilityDumpProto accessibility_service = 10; |
| 61 |
optional com.android.server.wm.WindowManagerServiceDumpProto window_manager_service = 11; |
| 62 |
optional string cpu_stats = 12; |
| 63 |
} |