/frameworks/base/libs/protoutil/tests/ |
D | ProtoOutputStream_test.cpp | 29 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/base/services/usage/java/com/android/server/usage/ |
D | UsageStatsProto.java | 24 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/ |
D | DumpUtils.java | 56 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/base/core/proto/android/os/ |
D | incident.proto | 20 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/base/packages/SystemUI/src/com/android/systemui/analytics/ |
D | SensorLoggerSession.java | 103 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/base/core/java/android/util/proto/ |
D | ProtoUtils.java | 17 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() 46 public static void toDuration(ProtoOutputStream proto, long fieldId, long startMs, long endMs) { in toDuration() argument 47 final long token = proto.start(fieldId); in toDuration() 48 proto.write(Duration.START_MS, startMs); in toDuration() [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/ |
D | VoiceCallSessionStats.java | 161 VoiceCallSession proto = mCallProtos.get(id); in onRilCallListChanged() local 163 checkCallSetup(conn, proto); in onRilCallListChanged() 166 proto.bearerAtEnd = getBearer(conn); // should be CS in onRilCallListChanged() 167 proto.disconnectReasonCode = conn.getDisconnectCause(); in onRilCallListChanged() 168 proto.disconnectExtraCode = conn.getPreciseDisconnectCause(); in onRilCallListChanged() 169 proto.disconnectExtraMessage = conn.getVendorDisconnectCause(); in onRilCallListChanged() 248 VoiceCallSession proto = mCallProtos.get(getConnectionId(conn)); in onAudioCodecChanged() local 249 if (proto == null) { in onAudioCodecChanged() 253 proto.codecBitmask |= audioQualityToCodecBitmask(proto.bearerAtEnd, audioQuality); in onAudioCodecChanged() 264 VoiceCallSession proto = mCallProtos.get(getConnectionId(conn)); in onCallStateChanged() local [all …]
|
/frameworks/base/core/java/com/android/internal/os/ |
D | PowerProfile.java | 24 import android.util.proto.ProtoOutputStream; 512 public void writeToProto(ProtoOutputStream proto) { in writeToProto() argument 514 writePowerConstantToProto(proto, POWER_CPU_SUSPEND, PowerProfileProto.CPU_SUSPEND); in writeToProto() 517 writePowerConstantToProto(proto, POWER_CPU_IDLE, PowerProfileProto.CPU_IDLE); in writeToProto() 520 writePowerConstantToProto(proto, POWER_CPU_ACTIVE, PowerProfileProto.CPU_ACTIVE); in writeToProto() 527 final long token = proto.start(PowerProfileProto.CPU_CLUSTER); in writeToProto() 528 proto.write(PowerProfileProto.CpuCluster.ID, cluster); in writeToProto() 529 proto.write(PowerProfileProto.CpuCluster.CLUSTER_POWER, in writeToProto() 531 proto.write(PowerProfileProto.CpuCluster.CORES, mCpuClusters[cluster].numCpus); in writeToProto() 533 proto.write(PowerProfileProto.CpuCluster.SPEED, speed); in writeToProto() [all …]
|
/frameworks/base/services/core/java/com/android/server/ |
D | DiskStatsService.java | 35 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/ |
D | GraphicsStatsService.cpp | 44 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/ |
D | ProcrankParser.cpp | 35 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 …]
|
D | PageTypeInfoParser.cpp | 35 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() 85 … proto.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 …]
|
D | EventLogTagsParser.cpp | 30 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 …]
|
D | CpuFreqParser.cpp | 62 ProtoOutputStream proto; in Parse() local 65 proto.write(CpuFreqProto::JIFFY_HZ, (int)jiffyHz); in Parse() 68 uint64_t token = proto.start(CpuFreqProto::CPU_FREQS); in Parse() 69 proto.write(CpuFreqProto::Stats::CPU_NAME, header[i+1]); in Parse() 71 uint64_t stateToken = proto.start(CpuFreqProto::Stats::TIMES); in Parse() 72 proto.write(CpuFreqProto::Stats::TimeInState::STATE_KHZ, it->first); in Parse() 73 proto.write(CpuFreqProto::Stats::TimeInState::TIME_JIFFY, it->second); in Parse() 74 proto.end(stateToken); in Parse() 76 proto.end(token); in Parse() 84 if (!proto.flush(out)) { in Parse() [all …]
|
D | CpuInfoParser.cpp | 26 static void writeSuffixLine(ProtoOutputStream* proto, uint64_t fieldId, in writeSuffixLine() argument 31 uint64_t token = proto->start(fieldId); in writeSuffixLine() 35 proto->write(ids[j], toInt(record[i])); in writeSuffixLine() 40 proto->end(token); in writeSuffixLine() 56 ProtoOutputStream proto; in Parse() local 71 writeSuffixLine(&proto, CpuInfoProto::TASK_STATS, line, COMMA_DELIMITER, in Parse() 78 writeSuffixLine(&proto, CpuInfoProto::MEM, line, COMMA_DELIMITER, in Parse() 85 writeSuffixLine(&proto, CpuInfoProto::SWAP, line, COMMA_DELIMITER, in Parse() 94 writeSuffixLine(&proto, CpuInfoProto::CPU_USAGE, line, DEFAULT_WHITESPACE, in Parse() 142 uint64_t token = proto.start(CpuInfoProto::TASKS); in Parse() [all …]
|
/frameworks/base/cmds/statsd/src/guardrail/ |
D | StatsdStats.cpp | 791 void addConfigStatsToProto(const ConfigStats& configStats, ProtoOutputStream* proto) { in addConfigStatsToProto() argument 793 proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_CONFIG_STATS); in addConfigStatsToProto() 794 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_UID, configStats.uid); in addConfigStatsToProto() 795 proto->write(FIELD_TYPE_INT64 | FIELD_ID_CONFIG_STATS_ID, (long long)configStats.id); in addConfigStatsToProto() 796 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_CREATION, configStats.creation_time_sec); in addConfigStatsToProto() 798 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_RESET, configStats.reset_time_sec); in addConfigStatsToProto() 801 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_DELETION, in addConfigStatsToProto() 804 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_METRIC_COUNT, configStats.metric_count); in addConfigStatsToProto() 805 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CONFIG_STATS_CONDITION_COUNT, in addConfigStatsToProto() 807 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/ |
D | UidRecord.java | 25 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/power/ |
D | WirelessChargerDetector.java | 29 import android.util.proto.ProtoOutputStream; 173 public void writeToProto(ProtoOutputStream proto, long fieldId) { in writeToProto() argument 174 final long wcdToken = proto.start(fieldId); in writeToProto() 176 proto.write(WirelessChargerDetectorProto.IS_POWERED_WIRELESSLY, mPoweredWirelessly); in writeToProto() 177 proto.write(WirelessChargerDetectorProto.IS_AT_REST, mAtRest); in writeToProto() 179 final long restVectorToken = proto.start(WirelessChargerDetectorProto.REST); in writeToProto() 180 proto.write(WirelessChargerDetectorProto.VectorProto.X, mRestX); in writeToProto() 181 proto.write(WirelessChargerDetectorProto.VectorProto.Y, mRestY); in writeToProto() 182 proto.write(WirelessChargerDetectorProto.VectorProto.Z, mRestZ); in writeToProto() 183 proto.end(restVectorToken); in writeToProto() [all …]
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | PackageSetting.java | 24 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 …]
|
/frameworks/base/cmds/am/src/com/android/commands/am/ |
D | Instrument.java | 36 import android.util.proto.ProtoOutputStream; 254 final ProtoOutputStream proto = new ProtoOutputStream(); in onInstrumentationStatusLocked() local 256 final long testStatusToken = proto.start(InstrumentationData.Session.TEST_STATUS); in onInstrumentationStatusLocked() 258 proto.write(InstrumentationData.TestStatus.RESULT_CODE, resultCode); in onInstrumentationStatusLocked() 259 writeBundle(proto, InstrumentationData.TestStatus.RESULTS, results); in onInstrumentationStatusLocked() 266 proto.write(InstrumentationData.TestStatus.LOGCAT, readLogcat(mTestStartMs)); in onInstrumentationStatusLocked() 271 proto.end(testStatusToken); in onInstrumentationStatusLocked() 273 outputProto(proto); in onInstrumentationStatusLocked() 279 final ProtoOutputStream proto = new ProtoOutputStream(); in onInstrumentationFinishedLocked() local 281 final long sessionStatusToken = proto.start(InstrumentationData.Session.SESSION_STATUS); in onInstrumentationFinishedLocked() [all …]
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | TaskSnapshotLoader.java | 76 final TaskSnapshotProto proto = TaskSnapshotProto.parseFrom(bytes); in loadTask() local 91 proto.topActivityComponent); in loadTask() 94 final float scale = Float.compare(proto.scale, 0f) != 0 ? proto.scale : legacyScale; in loadTask() 96 proto.orientation, in loadTask() 97 new Rect(proto.insetLeft, proto.insetTop, proto.insetRight, proto.insetBottom), in loadTask() 98 reducedResolution, scale, proto.isRealSnapshot, proto.windowingMode, in loadTask() 99 proto.systemUiVisibility, proto.isTranslucent); in loadTask()
|
D | LocalAnimationAdapter.java | 23 import android.util.proto.ProtoOutputStream; 84 public void writeToProto(ProtoOutputStream proto) { in writeToProto() argument 85 final long token = proto.start(LOCAL); in writeToProto() 86 mSpec.writeToProto(proto, ANIMATION_SPEC); in writeToProto() 87 proto.end(token); in writeToProto() 146 default void writeToProto(ProtoOutputStream proto, long fieldId) { in writeToProto() argument 147 final long token = proto.start(fieldId); in writeToProto() 148 writeToProtoInner(proto); in writeToProto() 149 proto.end(token); in writeToProto() 152 void writeToProtoInner(ProtoOutputStream proto); in writeToProtoInner() argument
|
/frameworks/base/services/core/java/com/android/server/job/controllers/ |
D | JobStatus.java | 38 import android.util.proto.ProtoOutputStream; 1273 public void writeToShortProto(ProtoOutputStream proto, long fieldId) { in writeToShortProto() argument 1274 final long token = proto.start(fieldId); in writeToShortProto() 1276 proto.write(JobStatusShortInfoProto.CALLING_UID, callingUid); in writeToShortProto() 1277 proto.write(JobStatusShortInfoProto.JOB_ID, job.getId()); in writeToShortProto() 1278 proto.write(JobStatusShortInfoProto.BATTERY_NAME, batteryName); in writeToShortProto() 1280 proto.end(token); in writeToShortProto() 1355 void dumpConstraints(ProtoOutputStream proto, long fieldId, int constraints) { in dumpConstraints() argument 1357 proto.write(fieldId, JobServerProtoEnums.CONSTRAINT_CHARGING); in dumpConstraints() 1360 proto.write(fieldId, JobServerProtoEnums.CONSTRAINT_BATTERY_NOT_LOW); in dumpConstraints() [all …]
|
/frameworks/native/services/surfaceflinger/ |
D | LayerProtoHelper.cpp | 129 InputWindowInfoProto* proto = getInputWindowInfoProto(); in writeToProto() local 130 proto->set_layout_params_flags(inputInfo.layoutParamsFlags); in writeToProto() 131 proto->set_layout_params_type(inputInfo.layoutParamsType); in writeToProto() 135 [&]() { return proto->mutable_frame(); }); in writeToProto() 137 [&]() { return proto->mutable_touchable_region(); }); in writeToProto() 139 proto->set_surface_inset(inputInfo.surfaceInset); in writeToProto() 140 proto->set_visible(inputInfo.visible); in writeToProto() 141 proto->set_can_receive_keys(inputInfo.canReceiveKeys); in writeToProto() 142 proto->set_has_focus(inputInfo.hasFocus); in writeToProto() 143 proto->set_has_wallpaper(inputInfo.hasWallpaper); in writeToProto() [all …]
|
/frameworks/base/services/core/java/com/android/server/uri/ |
D | NeededUriGrants.java | 19 import android.util.proto.ProtoOutputStream; 37 public void writeToProto(ProtoOutputStream proto, long fieldId) { in writeToProto() argument 38 long token = proto.start(fieldId); in writeToProto() 39 proto.write(NeededUriGrantsProto.TARGET_PACKAGE, targetPkg); in writeToProto() 40 proto.write(NeededUriGrantsProto.TARGET_UID, targetUid); in writeToProto() 41 proto.write(NeededUriGrantsProto.FLAGS, flags); in writeToProto() 45 this.get(i).writeToProto(proto, NeededUriGrantsProto.GRANTS); in writeToProto() 47 proto.end(token); in writeToProto()
|