• Home
  • History
  • Annotate
  • only in /frameworks/base/core/proto/
NameDateSize

..10-Aug-20184 KiB

android/10-Aug-20184 KiB

OWNERS10-Aug-2018247

README.md10-Aug-20181.2 KiB

README.md

1Conventions for the protos in this directory:
2
31. As in the rest of Android, use 4 spaces to indent instead of 2.
4
51. For protos based on Java files, use the same package as the Java file. For
6   example, `com.android.server.thing` instead of `com.android.server.thing.proto`.
7
81. If the proto describes the top level output of dumpsys, it should contain
9   `Dump`. This makes it easy to understand that the proto is the dumpsys output
10   of a certain service, not the data structure of that service, e.g.
11   `WindowManagerServiceDumpProto` vs `WindowManagerServiceProto`.
12
13   * Inner messages whose containing messages have the `Proto` suffix do not
14     need to have a `Proto` suffix. E.g:
15
16```
17message FooProto {
18    message Bar {
19        ...
20    }
21}
22```
23
24     vs
25
26```
27message FooProto {
28    message BarProto {
29        ...
30    }
31}
32```
33
341. If the proto represents the structure of an object, it should have `Proto` as
35   its suffix. Please also include the full package path of the original object
36   as a comment to the proto message.
37
381. Include units in the field names. For example, `screen_time_ms` vs
39   `screen_time`, or `file_size_bytes` or `file_size_mebibytes` vs `file_size`.
40
411. Leave field numbers 50,000 - 100,000 reserved for OEMs.
42