Home
last modified time | relevance | path

Searched refs:proto (Results 1 – 25 of 672) sorted by relevance

12345678910>>...27

/frameworks/base/libs/protoutil/tests/
DProtoOutputStream_test.cpp29 static std::string flushToString(ProtoOutputStream* proto) { in flushToString() argument
34 EXPECT_TRUE(proto->flush(tf.fd)); in flushToString()
39 static std::string iterateToString(ProtoOutputStream* proto) { in iterateToString() argument
41 content.reserve(proto->size()); in iterateToString()
42 sp<ProtoReader> reader = proto->data(); in iterateToString()
53 ProtoOutputStream proto; in TEST() local
54 EXPECT_TRUE(proto.write(FIELD_TYPE_INT32 | PrimitiveProto::kValInt32FieldNumber, 123)); in TEST()
55 EXPECT_TRUE(proto.write(FIELD_TYPE_INT64 | PrimitiveProto::kValInt64FieldNumber, -1LL)); in TEST()
56 EXPECT_TRUE(proto.write(FIELD_TYPE_FLOAT | PrimitiveProto::kValFloatFieldNumber, -23.5f)); in TEST()
57 EXPECT_TRUE(proto.write(FIELD_TYPE_DOUBLE | PrimitiveProto::kValDoubleFieldNumber, 324.5)); in TEST()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/python/google/protobuf/internal/
Dreflection_test.py120 proto = unittest_pb2.TestAllTypes(
126 self.assertEqual(24, proto.optional_int32)
127 self.assertEqual(54.321, proto.optional_double)
128 self.assertEqual('optional_string', proto.optional_string)
129 self.assertFalse(proto.HasField("optional_float"))
133 proto = unittest_pb2.TestAllTypes(
140 self.assertEqual([1, 2, 3, 4], list(proto.repeated_int32))
141 self.assertEqual([1.23, 54.321], list(proto.repeated_double))
142 self.assertEqual([True, False, False], list(proto.repeated_bool))
143 self.assertEqual(["optional_string"], list(proto.repeated_string))
[all …]
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsProto.java24 import android.util.proto.ProtoInputStream;
25 import android.util.proto.ProtoOutputStream;
43 private static List<String> readStringPool(ProtoInputStream proto) throws IOException { in readStringPool() argument
45 final long token = proto.start(IntervalStatsProto.STRINGPOOL); in readStringPool()
47 if (proto.isNextField(IntervalStatsProto.StringPool.SIZE)) { in readStringPool()
48 stringPool = new ArrayList(proto.readInt(IntervalStatsProto.StringPool.SIZE)); in readStringPool()
52 while (proto.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in readStringPool()
53 switch (proto.getFieldNumber()) { in readStringPool()
55 stringPool.add(proto.readString(IntervalStatsProto.StringPool.STRINGS)); in readStringPool()
59 proto.end(token); in readStringPool()
[all …]
/frameworks/base/core/java/com/android/internal/print/
DDumpUtils.java56 public static void writePrinterId(@NonNull DualDumpOutputStream proto, String idName, long id, in writePrinterId() argument
58 long token = proto.start(idName, id); in writePrinterId()
59 writeComponentName(proto, "service_name", PrinterIdProto.SERVICE_NAME, in writePrinterId()
61 proto.write("local_id", PrinterIdProto.LOCAL_ID, printerId.getLocalId()); in writePrinterId()
62 proto.end(token); in writePrinterId()
74 @NonNull DualDumpOutputStream proto, String idName, long id, in writePrinterCapabilities() argument
76 long token = proto.start(idName, id); in writePrinterCapabilities()
77 writeMargins(proto, "min_margins", PrinterCapabilitiesProto.MIN_MARGINS, in writePrinterCapabilities()
82 writeMediaSize(context, proto, "media_sizes", PrinterCapabilitiesProto.MEDIA_SIZES, in writePrinterCapabilities()
88 writeResolution(proto, "resolutions", PrinterCapabilitiesProto.RESOLUTIONS, in writePrinterCapabilities()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/js/binary/
Dproto_test.js120 msg.setOptionalGroup(new proto.jspb.test.TestAllTypes.OptionalGroup());
122 var submsg = new proto.jspb.test.ForeignMessage();
125 msg.setOptionalForeignEnum(proto.jspb.test.ForeignEnum.FOREIGN_FOO);
144 msg.setRepeatedGroupList([new proto.jspb.test.TestAllTypes.RepeatedGroup()]);
146 submsg = new proto.jspb.test.ForeignMessage();
149 msg.setRepeatedForeignEnumList([proto.jspb.test.ForeignEnum.FOREIGN_FOO]);
221 proto.jspb.test.ForeignEnum.FOREIGN_FOO);
226 proto.jspb.test.TestAllTypes.OneofFieldCase.ONEOF_STRING);
253 [proto.jspb.test.ForeignEnum.FOREIGN_FOO]);
282 msg.getExtension(proto.jspb.test.extendOptionalInt32));
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/objectivec/DevTools/
Dcompile_testing_protos.sh43 src/google/protobuf/*.proto \
44 objectivec/Tests/*.proto \
71 src/google/protobuf/unittest_arena.proto
72 src/google/protobuf/unittest_custom_options.proto
73 src/google/protobuf/unittest_enormous_descriptor.proto
74 src/google/protobuf/unittest_embed_optimize_for.proto
75 src/google/protobuf/unittest_empty.proto
76 src/google/protobuf/unittest_import.proto
77 src/google/protobuf/unittest_import_lite.proto
78 src/google/protobuf/unittest_lite.proto
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/js/
Dmessage_test.js86 var empty1 = new proto.jspb.test.Empty([]);
87 var empty2 = new proto.jspb.test.Empty([]);
93 var response = new proto.jspb.test.EnumContainer([]);
94 response.setOuterEnum(proto.jspb.test.OuterEnum.FOO);
95 assertEquals(proto.jspb.test.OuterEnum.FOO, response.getOuterEnum());
99 var data = new proto.jspb.test.DefaultValues([]);
107 var foo = new proto.jspb.test.Complex(data1);
108 var bar = new proto.jspb.test.Complex(data2);
140 var foo = new proto.jspb.test.Complex([
143 var bar = new proto.jspb.test.Complex([
[all …]
/frameworks/base/core/proto/android/os/
Dincident.proto20 import "frameworks/base/core/proto/android/os/backtrace.proto";
21 import "frameworks/base/core/proto/android/os/batterytype.proto";
22 import "frameworks/base/core/proto/android/os/cpufreq.proto";
23 import "frameworks/base/core/proto/android/os/cpuinfo.proto";
24 import "frameworks/base/core/proto/android/os/data.proto";
25 import "frameworks/base/core/proto/android/os/header.proto";
26 import "frameworks/base/core/proto/android/os/kernelwake.proto";
27 import "frameworks/base/core/proto/android/os/metadata.proto";
28 import "frameworks/base/core/proto/android/os/pagetypeinfo.proto";
29 import "frameworks/base/core/proto/android/os/procrank.proto";
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/main/java/com/google/protobuf/
DDescriptors.java79 return proto; in toProto()
85 return proto.getName(); in getName()
97 return proto.getName(); in getFullName()
105 public String getPackage() { return proto.getPackage(); } in getPackage()
108 public FileOptions getOptions() { return proto.getOptions(); } in getOptions()
154 if (Syntax.PROTO3.name.equals(proto.getSyntax())) { in getSyntax()
266 public static FileDescriptor buildFrom(final FileDescriptorProto proto, in buildFrom() argument
269 return buildFrom(proto, dependencies, false); in buildFrom()
288 final FileDescriptorProto proto, final FileDescriptor[] dependencies, in buildFrom() argument
303 proto, dependencies, pool, allowUnknownDependencies); in buildFrom()
[all …]
/frameworks/base/core/java/android/util/proto/
DProtoUtils.java17 package android.util.proto;
34 public static void toAggStatsProto(ProtoOutputStream proto, long fieldId, in toAggStatsProto() argument
36 final long aggStatsToken = proto.start(fieldId); in toAggStatsProto()
37 proto.write(AggStats.MIN, min); in toAggStatsProto()
38 proto.write(AggStats.AVERAGE, average); in toAggStatsProto()
39 proto.write(AggStats.MAX, max); in toAggStatsProto()
40 proto.end(aggStatsToken); in toAggStatsProto()
47 public static void toDuration(ProtoOutputStream proto, long fieldId, long startMs, long endMs) { in toDuration() argument
48 final long token = proto.start(fieldId); in toDuration()
49 proto.write(Duration.START_MS, startMs); in toDuration()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/analytics/
DSensorLoggerSession.java103 Session proto = new Session(); in toProto() local
104 proto.startTimestampMillis = mStartTimestampMillis; in toProto()
105 proto.durationMillis = mEndTimestampMillis - mStartTimestampMillis; in toProto()
106 proto.build = Build.FINGERPRINT; in toProto()
107 proto.deviceId = Build.DEVICE; in toProto()
108 proto.result = mResult; in toProto()
109 proto.type = mType; in toProto()
110 proto.sensorEvents = mSensorEvents.toArray(proto.sensorEvents); in toProto()
111 proto.touchEvents = mMotionEvents.toArray(proto.touchEvents); in toProto()
112 proto.phoneEvents = mPhoneEvents.toArray(proto.phoneEvents); in toProto()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/csharp/
Dgenerate_protos.sh31 src/google/protobuf/descriptor.proto \
32 src/google/protobuf/any.proto \
33 src/google/protobuf/api.proto \
34 src/google/protobuf/duration.proto \
35 src/google/protobuf/empty.proto \
36 src/google/protobuf/field_mask.proto \
37 src/google/protobuf/source_context.proto \
38 src/google/protobuf/struct.proto \
39 src/google/protobuf/timestamp.proto \
40 src/google/protobuf/type.proto \
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/test/java/com/google/protobuf/
DLazyStringEndToEndTest.java97 UnittestProto.TestAllTypes proto = UnittestProto.TestAllTypes.newBuilder() in testCaching() local
104 assertSame(a, proto.getOptionalString()); in testCaching()
105 assertSame(b, proto.getRepeatedString(0)); in testCaching()
106 assertSame(c, proto.getRepeatedString(1)); in testCaching()
110 proto.toByteString(); in testCaching()
113 assertSame(a, proto.getOptionalString()); in testCaching()
114 assertSame(b, proto.getRepeatedString(0)); in testCaching()
115 assertSame(c, proto.getRepeatedString(1)); in testCaching()
119 UnittestProto.TestAllTypes proto = in testNoStringCachingIfOnlyBytesAccessed() local
121 ByteString optional = proto.getOptionalStringBytes(); in testNoStringCachingIfOnlyBytesAccessed()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DPowerProfile.java24 import android.util.proto.ProtoOutputStream;
509 public void writeToProto(ProtoOutputStream proto) { in writeToProto() argument
511 writePowerConstantToProto(proto, POWER_CPU_SUSPEND, PowerProfileProto.CPU_SUSPEND); in writeToProto()
514 writePowerConstantToProto(proto, POWER_CPU_IDLE, PowerProfileProto.CPU_IDLE); in writeToProto()
517 writePowerConstantToProto(proto, POWER_CPU_ACTIVE, PowerProfileProto.CPU_ACTIVE); in writeToProto()
524 final long token = proto.start(PowerProfileProto.CPU_CLUSTER); in writeToProto()
525 proto.write(PowerProfileProto.CpuCluster.ID, cluster); in writeToProto()
526 proto.write(PowerProfileProto.CpuCluster.CLUSTER_POWER, in writeToProto()
528 proto.write(PowerProfileProto.CpuCluster.CORES, mCpuClusters[cluster].numCpus); in writeToProto()
530 proto.write(PowerProfileProto.CpuCluster.SPEED, speed); in writeToProto()
[all …]
/frameworks/base/services/core/java/com/android/server/
DDiskStatsService.java35 import android.util.proto.ProtoOutputStream;
94 ProtoOutputStream proto = null; in dump() local
97 proto = new ProtoOutputStream(fd); in dump()
99 proto.write(DiskStatsServiceDumpProto.HAS_TEST_ERROR, error != null); in dump()
101 proto.write(DiskStatsServiceDumpProto.ERROR_MESSAGE, error.toString()); in dump()
103 proto.write(DiskStatsServiceDumpProto.WRITE_512B_LATENCY_MILLIS, after - before); in dump()
117 reportDiskWriteSpeedProto(proto); in dump()
122 reportFreeSpace(Environment.getDataDirectory(), "Data", pw, proto, in dump() local
124 reportFreeSpace(Environment.getDownloadCacheDirectory(), "Cache", pw, proto, in dump() local
126 reportFreeSpace(new File("/system"), "System", pw, proto, in dump()
[all …]
/frameworks/base/libs/hwui/service/
DGraphicsStatsService.cpp44 static bool mergeProfileDataIntoProto(protos::GraphicsStatsProto* proto,
47 static void dumpAsTextToFd(protos::GraphicsStatsProto* proto, int outFd);
158 bool mergeProfileDataIntoProto(protos::GraphicsStatsProto* proto, const std::string& package, in mergeProfileDataIntoProto() argument
161 if (proto->stats_start() == 0 || proto->stats_start() > startTime) { in mergeProfileDataIntoProto()
162 proto->set_stats_start(startTime); in mergeProfileDataIntoProto()
164 if (proto->stats_end() == 0 || proto->stats_end() < endTime) { in mergeProfileDataIntoProto()
165 proto->set_stats_end(endTime); in mergeProfileDataIntoProto()
167 proto->set_package_name(package); in mergeProfileDataIntoProto()
168 proto->set_version_code(versionCode); in mergeProfileDataIntoProto()
169 auto summary = proto->mutable_summary(); in mergeProfileDataIntoProto()
[all …]
/frameworks/base/cmds/incident_helper/src/parsers/
DProcrankParser.cpp35 ProtoOutputStream proto; in Parse() local
69 uint64_t token = proto.start(ProcrankProto::PROCESSES); in Parse()
71 if (!table.insertField(&proto, header[i], record[i])) { in Parse()
76 proto.end(token); in Parse()
80 uint64_t token = proto.start(ProcrankProto::SUMMARY); in Parse()
83 uint64_t token = proto.start(ProcrankProto::Summary::TOTAL); in Parse()
85 … table.insertField(&proto, header[header.size() - i].c_str(), record[record.size() - i].c_str()); in Parse()
87 proto.end(token); in Parse()
90 uint64_t token = proto.start(ProcrankProto::Summary::ZRAM); in Parse()
91 proto.write(ProcrankProto::Summary::Zram::RAW_TEXT, zram); in Parse()
[all …]
DPageTypeInfoParser.cpp35 ProtoOutputStream proto; in Parse() local
49 proto.write(PageTypeInfoProto::PAGE_BLOCK_ORDER, pageBlockOrder); in Parse()
53 proto.write(PageTypeInfoProto::PAGES_PER_BLOCK, toInt(line)); in Parse()
67 uint64_t token = proto.start(PageTypeInfoProto::MIGRATE_TYPES); in Parse()
70 proto.write(PageTypeInfoProto::MigrateType::NODE, toInt(record[0])); in Parse()
74 proto.write(PageTypeInfoProto::MigrateType::ZONE, record[1]); in Parse()
83 proto.write(PageTypeInfoProto::MigrateType::TYPE, pageCounts[0]); in Parse()
85proto.write(PageTypeInfoProto::MigrateType::FREE_PAGES_COUNT, toInt(pageCounts[i])); in Parse()
89 proto.end(token); in Parse()
91 uint64_t token = proto.start(PageTypeInfoProto::BLOCKS); in Parse()
[all …]
DEventLogTagsParser.cpp30 ProtoOutputStream proto; in Parse() local
44 uint64_t token = proto.start(EventLogTagMapProto::EVENT_LOG_TAGS); in Parse()
45 proto.write(EventLogTag::TAG_NUMBER, toInt(tagNumber)); in Parse()
46 proto.write(EventLogTag::TAG_NAME, tagName); in Parse()
55 uint64_t descriptorToken = proto.start(EventLogTag::VALUE_DESCRIPTORS); in Parse()
56 proto.write(EventLogTag::ValueDescriptor::NAME, valueDescriptor[0]); in Parse()
57 proto.write(EventLogTag::ValueDescriptor::TYPE, toInt(valueDescriptor[1])); in Parse()
66 proto.write(EventLogTag::ValueDescriptor::UNIT, unit); in Parse()
68 proto.end(descriptorToken); in Parse()
70 proto.end(token); in Parse()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/src/google/protobuf/
Ddescriptor.cc1729 void FileDescriptor::CopyTo(FileDescriptorProto* proto) const { in CopyTo()
1730 proto->set_name(name()); in CopyTo()
1731 if (!package().empty()) proto->set_package(package()); in CopyTo()
1733 if (syntax() == SYNTAX_PROTO3) proto->set_syntax(SyntaxName(syntax())); in CopyTo()
1736 proto->add_dependency(dependency(i)->name()); in CopyTo()
1740 proto->add_public_dependency(public_dependencies_[i]); in CopyTo()
1744 proto->add_weak_dependency(weak_dependencies_[i]); in CopyTo()
1748 message_type(i)->CopyTo(proto->add_message_type()); in CopyTo()
1751 enum_type(i)->CopyTo(proto->add_enum_type()); in CopyTo()
1754 service(i)->CopyTo(proto->add_service()); in CopyTo()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/cmake/
Dtests.cmake24 google/protobuf/map_lite_unittest.proto
25 google/protobuf/unittest_import_lite.proto
26 google/protobuf/unittest_import_public_lite.proto
27 google/protobuf/unittest_lite.proto
28 google/protobuf/unittest_no_arena_lite.proto
32 google/protobuf/any_test.proto
33 google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
34 google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto
35 google/protobuf/map_proto2_unittest.proto
36 google/protobuf/map_unittest.proto
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/csharp/src/Google.Protobuf/Reflection/
DFileDescriptor.cs46 …private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] depe… in FileDescriptor() argument
50 Proto = proto; in FileDescriptor()
53 …PublicDependencies = DeterminePublicDependencies(this, proto, dependencies, allowUnknownDependenci… in FileDescriptor()
57 MessageTypes = DescriptorUtil.ConvertAndMakeReadOnly(proto.MessageType, in FileDescriptor()
61 EnumTypes = DescriptorUtil.ConvertAndMakeReadOnly(proto.EnumType, in FileDescriptor()
65 Services = DescriptorUtil.ConvertAndMakeReadOnly(proto.Service, in FileDescriptor()
90 …or> DeterminePublicDependencies(FileDescriptor @this, FileDescriptorProto proto, FileDescriptor[] …
98 for (int i = 0; i < proto.PublicDependency.Count; i++)
100 int index = proto.PublicDependency[i];
101 if (index < 0 || index >= proto.Dependency.Count)
[all …]
/frameworks/base/cmds/statsd/src/guardrail/
DStatsdStats.cpp792 void addConfigStatsToProto(const ConfigStats& configStats, ProtoOutputStream* proto) { in addConfigStatsToProto() argument
794 proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_CONFIG_STATS); in addConfigStatsToProto()
795 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_UID, configStats.uid); in addConfigStatsToProto()
796 proto->write(FIELD_TYPE_INT64 | FIELD_ID_CONFIG_STATS_ID, (long long)configStats.id); in addConfigStatsToProto()
797 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_CREATION, configStats.creation_time_sec); in addConfigStatsToProto()
799 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_RESET, configStats.reset_time_sec); in addConfigStatsToProto()
802 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_DELETION, in addConfigStatsToProto()
805 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_METRIC_COUNT, configStats.metric_count); in addConfigStatsToProto()
806 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_CONDITION_COUNT, in addConfigStatsToProto()
808 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_MATCHER_COUNT, configStats.matcher_count); in addConfigStatsToProto()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DUidRecord.java25 import android.util.proto.ProtoOutputStream;
26 import android.util.proto.ProtoUtils;
154 void writeToProto(ProtoOutputStream proto, long fieldId) { in writeToProto() argument
155 long token = proto.start(fieldId); in writeToProto()
156 proto.write(UidRecordProto.UID, uid); in writeToProto()
157 proto.write(UidRecordProto.CURRENT, ProcessList.makeProcStateProtoEnum(mCurProcState)); in writeToProto()
158 proto.write(UidRecordProto.EPHEMERAL, ephemeral); in writeToProto()
159 proto.write(UidRecordProto.FG_SERVICES, foregroundServices); in writeToProto()
160 proto.write(UidRecordProto.WHILELIST, curWhitelist); in writeToProto()
161 ProtoUtils.toDuration(proto, UidRecordProto.LAST_BACKGROUND_TIME, in writeToProto()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DPackageSetting.java24 import android.util.proto.ProtoOutputStream;
183 public void writeToProto(ProtoOutputStream proto, long fieldId, List<UserInfo> users) { in writeToProto() argument
184 final long packageToken = proto.start(fieldId); in writeToProto()
185 proto.write(PackageProto.NAME, (realName != null ? realName : name)); in writeToProto()
186 proto.write(PackageProto.UID, appId); in writeToProto()
187 proto.write(PackageProto.VERSION_CODE, versionCode); in writeToProto()
188 proto.write(PackageProto.INSTALL_TIME_MS, firstInstallTime); in writeToProto()
189 proto.write(PackageProto.UPDATE_TIME_MS, lastUpdateTime); in writeToProto()
190 proto.write(PackageProto.INSTALLER_NAME, installerPackageName); in writeToProto()
193 proto.write(PackageProto.VERSION_STRING, pkg.mVersionName); in writeToProto()
[all …]

12345678910>>...27