It is very unlikely the protobuf changes the value in descriptor.h,
and if defines an extra mapping, there are several places to maintain:
1. java-stream,
2. cpp-stream,
3. ProtoOutputStream.java
4. ProtoOutputStream.cpp
5. Privacy.h (GetFieldId)
6. StatsLog to generate field id (type << 32 + field number)
Therefore use the current value in descriptor.h seems reasonable unless
they change that, very very unlikely, they probably will just add new
types, and deprect the existing ones like Group.
Test: test output of dumpsys proto
Change-Id: I6e150ab427851dd3b5dd55d3b273deeed7a0963c
It is very similiar to protoc-gen-javastream, which generates field Ids used
by ProtoOutputStream.cpp to dump protobuf data.
Bug: 65641021
Test: compile the streaming_proto:
$ mmm -j frameworks/base/tools/streaming_proto/
and run:
$ PATH=$PATH:out/host/linux-x86/bin/protoc-gen-cppstream aprotoc
--cppstream_out=tmp/
frameworks/base/core/proto/android/service/procstats.proto
frameworks/base/core/proto/android/util/common.proto
Change-Id: I68becc80b5166455455c5df28cd698601b4a1c1d