Lines Matching refs:proto

31 import android.util.proto.ProtoOutputStream;
53 public boolean proto = false;
184 final ProtoOutputStream proto = new ProtoOutputStream();
186 final long token = proto.startRepeatedObject(InstrumentationData.Session.TEST_STATUS);
188 proto.writeSInt32(InstrumentationData.TestStatus.RESULT_CODE, resultCode);
189 writeBundle(proto, InstrumentationData.TestStatus.RESULTS, results);
191 proto.endRepeatedObject(token);
192 writeProtoToStdout(proto);
198 final ProtoOutputStream proto = new ProtoOutputStream();
200 final long token = proto.startObject(InstrumentationData.Session.SESSION_STATUS);
202 proto.writeEnum(InstrumentationData.SessionStatus.STATUS_CODE,
204 proto.writeSInt32(InstrumentationData.SessionStatus.RESULT_CODE, resultCode);
205 writeBundle(proto, InstrumentationData.SessionStatus.RESULTS, results);
207 proto.endObject(token);
208 writeProtoToStdout(proto);
213 final ProtoOutputStream proto = new ProtoOutputStream();
215 final long token = proto.startObject(InstrumentationData.Session.SESSION_STATUS);
217 proto.writeEnum(InstrumentationData.SessionStatus.STATUS_CODE,
219 proto.writeString(InstrumentationData.SessionStatus.ERROR_TEXT, errorText);
221 proto.endObject(token);
222 writeProtoToStdout(proto);
225 private void writeBundle(ProtoOutputStream proto, long fieldId, Bundle bundle) {
226 final long bundleToken = proto.startObject(fieldId);
229 final long entryToken = proto.startRepeatedObject(
232 proto.writeString(InstrumentationData.ResultsBundleEntry.KEY, key);
236 proto.writeString(InstrumentationData.ResultsBundleEntry.VALUE_STRING,
239 proto.writeSInt32(InstrumentationData.ResultsBundleEntry.VALUE_INT,
242 proto.writeDouble(InstrumentationData.ResultsBundleEntry.VALUE_DOUBLE,
245 proto.writeFloat(InstrumentationData.ResultsBundleEntry.VALUE_FLOAT,
248 proto.writeSInt32(InstrumentationData.ResultsBundleEntry.VALUE_INT,
251 proto.writeSInt64(InstrumentationData.ResultsBundleEntry.VALUE_LONG,
254 proto.writeSInt32(InstrumentationData.ResultsBundleEntry.VALUE_INT,
257 writeBundle(proto, InstrumentationData.ResultsBundleEntry.VALUE_BUNDLE,
261 proto.endRepeatedObject(entryToken);
264 proto.endObject(bundleToken);
267 private void writeProtoToStdout(ProtoOutputStream proto) {
269 System.out.write(proto.getBytes());
377 if (proto) {