/frameworks/base/core/java/android/util/proto/ |
H A D | ProtoUtils.java | 17 package android.util.proto; 23 * This class contains a list of helper functions to write common proto in 24 * //frameworks/base/core/proto/android/base directory 32 public static void toAggStatsProto(ProtoOutputStream proto, long fieldId, argument 34 final long aggStatsToken = proto.start(fieldId); 35 proto.write(AggStats.MIN, min); 36 proto.write(AggStats.AVERAGE, average); 37 proto.write(AggStats.MAX, max); 38 proto.end(aggStatsToken); 45 public static void toDuration(ProtoOutputStream proto, lon argument 56 writeBitWiseFlagsToProtoEnum(ProtoOutputStream proto, long fieldId, int flags, int[] origEnums, int[] protoEnums) argument [all...] |
H A D | ProtoParseException.java | 17 package android.util.proto;
|
/frameworks/base/services/core/java/com/android/server/power/ |
H A D | SuspendBlocker.java | 19 import android.util.proto.ProtoOutputStream; 46 void writeToProto(ProtoOutputStream proto, long fieldId); argument
|
/frameworks/base/core/java/com/android/internal/print/ |
H A D | DumpUtils.java | 45 * Utilities for dumping print related proto buffer 49 * Write a {@link PrinterId} to a proto. 51 * @param proto The proto to write to 52 * @param idName Clear text name of the proto-id 53 * @param id The proto-id of the component name 56 public static void writePrinterId(@NonNull DualDumpOutputStream proto, String idName, long id, argument 58 long token = proto.start(idName, id); 59 writeComponentName(proto, "service_name", PrinterIdProto.SERVICE_NAME, 61 proto 73 writePrinterCapabilities(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrinterCapabilitiesInfo cap) argument 126 writePrinterInfo(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrinterInfo info) argument 153 writeMediaSize(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintAttributes.MediaSize mediaSize) argument 171 writeResolution(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintAttributes.Resolution res) argument 189 writeMargins(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintAttributes.Margins margins) argument 208 writePrintAttributes(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintAttributes attributes) argument 242 writePrintDocumentInfo(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintDocumentInfo info) argument 265 writePageRange(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PageRange range) argument 282 writePrintJobInfo(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintJobInfo printJobInfo) argument [all...] |
/frameworks/base/core/java/com/android/internal/util/dump/ |
H A D | DumpUtils.java | 26 * Write a string to a proto if the string is not {@code null}. 28 * @param proto The proto to write to 29 * @param idName Clear text name of the proto-id 30 * @param id The proto-id of the string 33 public static void writeStringIfNotNull(@NonNull DualDumpOutputStream proto, String idName, argument 36 proto.write(idName, id, string); 41 * Write a {@link ComponentName} to a proto. 43 * @param proto The proto t 48 writeComponentName(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull ComponentName component) argument [all...] |
/frameworks/base/cmds/incident_helper/src/parsers/ |
H A D | ProcrankParser.cpp | 20 #include "frameworks/base/core/proto/android/os/procrank.proto.h" 35 ProtoOutputStream proto; local 69 uint64_t token = proto.start(ProcrankProto::PROCESSES); 71 if (!table.insertField(&proto, header[i], record[i])) { 76 proto.end(token); 80 uint64_t token = proto.start(ProcrankProto::SUMMARY); 83 uint64_t token = proto.start(ProcrankProto::Summary::TOTAL); 85 table.insertField(&proto, header[header.size() - i].c_str(), record[record.size() - i].c_str()); 87 proto [all...] |
H A D | EventLogTagsParser.cpp | 20 #include "frameworks/base/core/proto/android/util/event_log_tags.proto.h" 30 ProtoOutputStream proto; local 44 uint64_t token = proto.start(EventLogTagMapProto::EVENT_LOG_TAGS); 45 proto.write(EventLogTag::TAG_NUMBER, toInt(tagNumber)); 46 proto.write(EventLogTag::TAG_NAME, tagName); 55 uint64_t descriptorToken = proto.start(EventLogTag::VALUE_DESCRIPTORS); 56 proto.write(EventLogTag::ValueDescriptor::NAME, valueDescriptor[0]); 57 proto.write(EventLogTag::ValueDescriptor::TYPE, toInt(valueDescriptor[1])); 66 proto [all...] |
H A D | BatteryTypeParser.cpp | 20 #include "frameworks/base/core/proto/android/os/batterytype.proto.h" 33 ProtoOutputStream proto; local 44 proto.write(BatteryTypeProto::TYPE, line); 54 if (!proto.flush(out)) { 55 fprintf(stderr, "[%s]Error writing proto back\n", this->name.string()); 58 fprintf(stderr, "[%s]Proto size: %zu bytes\n", this->name.string(), proto.size());
|
H A D | PageTypeInfoParser.cpp | 20 #include "frameworks/base/core/proto/android/os/pagetypeinfo.proto.h" 35 ProtoOutputStream proto; local 49 proto.write(PageTypeInfoProto::PAGE_BLOCK_ORDER, pageBlockOrder); 53 proto.write(PageTypeInfoProto::PAGES_PER_BLOCK, toInt(line)); 67 uint64_t token = proto.start(PageTypeInfoProto::MIGRATE_TYPES); 70 proto.write(PageTypeInfoProto::MigrateType::NODE, toInt(record[0])); 74 proto.write(PageTypeInfoProto::MigrateType::ZONE, record[1]); 88 proto.write(PageTypeInfoProto::MigrateType::TYPE, pageCounts[0]); 90 proto [all...] |
H A D | CpuFreqParser.cpp | 21 #include "frameworks/base/core/proto/android/os/cpufreq.proto.h" 62 ProtoOutputStream proto; local 65 proto.write(CpuFreqProto::JIFFY_HZ, (int)jiffyHz); 68 uint64_t token = proto.start(CpuFreqProto::CPU_FREQS); 69 proto.write(CpuFreqProto::Stats::CPU_NAME, header[i+1]); 71 uint64_t stateToken = proto.start(CpuFreqProto::Stats::TIMES); 72 proto.write(CpuFreqProto::Stats::TimeInState::STATE_KHZ, it->first); 73 proto.write(CpuFreqProto::Stats::TimeInState::TIME_JIFFY, it->second); 74 proto [all...] |
H A D | KernelWakesParser.cpp | 20 #include "frameworks/base/core/proto/android/os/kernelwake.proto.h" 35 ProtoOutputStream proto; local 62 uint64_t token = proto.start(KernelWakeSourcesProto::WAKEUP_SOURCES); 64 if (!table.insertField(&proto, header[i], record[i])) { 69 proto.end(token); 77 if (!proto.flush(out)) { 78 fprintf(stderr, "[%s]Error writing proto back\n", this->name.string()); 81 fprintf(stderr, "[%s]Proto size: %zu bytes\n", this->name.string(), proto.size());
|
H A D | CpuInfoParser.cpp | 20 #include "frameworks/base/core/proto/android/os/cpuinfo.proto.h" 26 static void writeSuffixLine(ProtoOutputStream* proto, uint64_t fieldId, argument 31 uint64_t token = proto->start(fieldId); 35 proto->write(ids[j], toInt(record[i])); 40 proto->end(token); 56 ProtoOutputStream proto; local 70 writeSuffixLine(&proto, CpuInfoProto::TASK_STATS, line, COMMA_DELIMITER, 77 writeSuffixLine(&proto, CpuInfoProto::MEM, line, COMMA_DELIMITER, 84 writeSuffixLine(&proto, CpuInfoProt [all...] |
/frameworks/base/services/core/java/com/android/server/wm/ |
H A D | AnimationAdapter.java | 20 import android.util.proto.ProtoOutputStream; 91 default void writeToProto(ProtoOutputStream proto, long fieldId) { argument 92 final long token = proto.start(fieldId); 93 writeToProto(proto); 94 proto.end(token); 97 void writeToProto(ProtoOutputStream proto); argument
|
H A D | LocalAnimationAdapter.java | 23 import android.util.proto.ProtoOutputStream; 89 public void writeToProto(ProtoOutputStream proto) { argument 90 final long token = proto.start(LOCAL); 91 mSpec.writeToProto(proto, ANIMATION_SPEC); 92 proto.end(token); 158 default void writeToProto(ProtoOutputStream proto, long fieldId) { argument 159 final long token = proto.start(fieldId); 160 writeToProtoInner(proto); 161 proto.end(token); 164 void writeToProtoInner(ProtoOutputStream proto); argument [all...] |
H A D | TaskSnapshotLoader.java | 76 final TaskSnapshotProto proto = TaskSnapshotProto.parseFrom(bytes); 90 return new TaskSnapshot(buffer, proto.orientation, 91 new Rect(proto.insetLeft, proto.insetTop, proto.insetRight, proto.insetBottom), 93 proto.isRealSnapshot, proto.windowingMode, proto.systemUiVisibility, 94 proto [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/analytics/ |
H A D | SensorLoggerSession.java | 103 Session proto = new Session(); 104 proto.setStartTimestampMillis(mStartTimestampMillis); 105 proto.setDurationMillis(mEndTimestampMillis - mStartTimestampMillis); 106 proto.setBuild(Build.FINGERPRINT); 107 proto.setResult(mResult); 108 proto.setType(mType); 109 proto.sensorEvents = mSensorEvents.toArray(proto.sensorEvents); 110 proto.touchEvents = mMotionEvents.toArray(proto [all...] |
/frameworks/base/services/core/java/com/android/server/pm/ |
H A D | PackageSetting.java | 24 import android.util.proto.ProtoOutputStream; 179 public void writeToProto(ProtoOutputStream proto, long fieldId, List<UserInfo> users) { argument 180 final long packageToken = proto.start(fieldId); 181 proto.write(PackageProto.NAME, (realName != null ? realName : name)); 182 proto.write(PackageProto.UID, appId); 183 proto.write(PackageProto.VERSION_CODE, versionCode); 184 proto.write(PackageProto.VERSION_STRING, pkg.mVersionName); 185 proto.write(PackageProto.INSTALL_TIME_MS, firstInstallTime); 186 proto.write(PackageProto.UPDATE_TIME_MS, lastUpdateTime); 187 proto [all...] |
/frameworks/base/services/core/java/com/android/server/net/watchlist/ |
H A D | ReportEncoder.java | 22 import android.util.proto.ProtoOutputStream; 36 * Helper class to encode and generate serialized DP encoded watchlist proto report. 61 * Convert DP encoded watchlist report into proto format. 64 * @return Watchlist report in proto format, which will be shared in Dropbox. Null if 82 final ProtoOutputStream proto = new ProtoOutputStream(reportOutputStream); 85 proto.write(NetworkWatchlistReportProto.REPORT_VERSION, REPORT_VERSION); 86 proto.write(NetworkWatchlistReportProto.WATCHLIST_CONFIG_HASH, 94 long token = proto.start(NetworkWatchlistReportProto.APP_RESULT); 95 proto.write(NetworkWatchlistAppResultProto.APP_DIGEST, key); 96 proto [all...] |
/frameworks/base/core/java/android/content/pm/ |
H A D | FeatureInfo.java | 21 import android.util.proto.ProtoOutputStream; 118 public void writeToProto(ProtoOutputStream proto, long fieldId) { argument 119 long token = proto.start(fieldId); 121 proto.write(FeatureInfoProto.NAME, name); 123 proto.write(FeatureInfoProto.VERSION, version); 124 proto.write(FeatureInfoProto.GLES_VERSION, getGlEsVersion()); 125 proto.write(FeatureInfoProto.FLAGS, flags); 126 proto.end(token);
|
/frameworks/base/services/core/java/com/android/server/ |
H A D | DiskStatsService.java | 35 import android.util.proto.ProtoOutputStream; 93 boolean protoFormat = hasOption(args, "--proto"); 94 ProtoOutputStream proto = null; 97 proto = new ProtoOutputStream(fd); 99 proto.write(DiskStatsServiceDumpProto.HAS_TEST_ERROR, error != null); 101 proto.write(DiskStatsServiceDumpProto.ERROR_MESSAGE, error.toString()); 103 proto.write(DiskStatsServiceDumpProto.WRITE_512B_LATENCY_MILLIS, after - before); 117 reportDiskWriteSpeedProto(proto); 122 reportFreeSpace(Environment.getDataDirectory(), "Data", pw, proto, 124 reportFreeSpace(Environment.getDownloadCacheDirectory(), "Cache", pw, proto, 159 reportFreeSpace(File path, String name, PrintWriter pw, ProtoOutputStream proto, int folderType) argument 244 reportCachedValuesProto(ProtoOutputStream proto) argument 323 reportDiskWriteSpeedProto(ProtoOutputStream proto) argument [all...] |
/frameworks/base/libs/hwui/service/ |
H A D | GraphicsStatsService.cpp | 44 static bool mergeProfileDataIntoProto(protos::GraphicsStatsProto* proto, 47 static void dumpAsTextToFd(protos::GraphicsStatsProto* proto, int outFd); 156 bool mergeProfileDataIntoProto(protos::GraphicsStatsProto* proto, const std::string& package, argument 159 if (proto->stats_start() == 0 || proto->stats_start() > startTime) { 160 proto->set_stats_start(startTime); 162 if (proto->stats_end() == 0 || proto->stats_end() < endTime) { 163 proto->set_stats_end(endTime); 165 proto 215 findPercentile(protos::GraphicsStatsProto* proto, int percentile) argument 227 dumpAsTextToFd(protos::GraphicsStatsProto* proto, int fd) argument 313 protos::GraphicsStatsServiceDumpProto& proto() { return mProto; } function in class:android::uirenderer::GraphicsStatsService::Dump [all...] |
/frameworks/base/services/core/java/com/android/server/am/ |
H A D | AppBindRecord.java | 20 import android.util.proto.ProtoOutputStream; 65 void writeToProto(ProtoOutputStream proto, long fieldId) { argument 66 long token = proto.start(fieldId); 67 proto.write(AppBindRecordProto.SERVICE_NAME, service.shortName); 68 proto.write(AppBindRecordProto.CLIENT_PROC_NAME, client.processName); 72 proto.write(AppBindRecordProto.CONNECTIONS, 75 proto.end(token);
|
H A D | ActiveInstrumentation.java | 25 import android.util.proto.ProtoOutputStream; 124 void writeToProto(ProtoOutputStream proto, long fieldId) { argument 125 long token = proto.start(fieldId); 126 mClass.writeToProto(proto, ActiveInstrumentationProto.CLASS); 127 proto.write(ActiveInstrumentationProto.FINISHED, mFinished); 129 mRunningProcesses.get(i).writeToProto(proto, 133 proto.write(ActiveInstrumentationProto.TARGET_PROCESSES, p); 136 mTargetInfo.writeToProto(proto, ActiveInstrumentationProto.TARGET_INFO); 138 proto.write(ActiveInstrumentationProto.PROFILE_FILE, mProfileFile); 139 proto [all...] |
H A D | AppTimeTracker.java | 28 import android.util.proto.ProtoOutputStream; 29 import android.util.proto.ProtoUtils; 125 void writeToProto(ProtoOutputStream proto, long fieldId, boolean details) { argument 126 final long token = proto.start(fieldId); 127 proto.write(AppTimeTrackerProto.RECEIVER, mReceiver.toString()); 128 proto.write(AppTimeTrackerProto.TOTAL_DURATION_MS, mTotalTime); 130 final long ptoken = proto.start(AppTimeTrackerProto.PACKAGE_TIMES); 131 proto.write(AppTimeTrackerProto.PackageTime.PACKAGE, mPackageTimes.keyAt(i)); 132 proto.write(AppTimeTrackerProto.PackageTime.DURATION_MS, mPackageTimes.valueAt(i).value); 133 proto [all...] |
/frameworks/base/cmds/am/src/com/android/commands/am/ |
H A D | Instrument.java | 32 import android.util.proto.ProtoOutputStream; 72 boolean protoStd = false; // write proto to stdout 73 boolean protoFile = false; // write proto to a file 242 final ProtoOutputStream proto = new ProtoOutputStream(); 244 final long token = proto.start(InstrumentationData.Session.TEST_STATUS); 245 proto.write(InstrumentationData.TestStatus.RESULT_CODE, resultCode); 246 writeBundle(proto, InstrumentationData.TestStatus.RESULTS, results); 247 proto.end(token); 249 outputProto(proto); 255 final ProtoOutputStream proto 280 writeBundle(ProtoOutputStream proto, long fieldId, Bundle bundle) argument 319 outputProto(ProtoOutputStream proto) argument [all...] |