Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.
Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
diff --git a/apex/jobscheduler/framework/java/com/android/server/job/JobSchedulerInternal.java b/apex/jobscheduler/framework/java/com/android/server/job/JobSchedulerInternal.java
index eefb9fa..1072406 100644
--- a/apex/jobscheduler/framework/java/com/android/server/job/JobSchedulerInternal.java
+++ b/apex/jobscheduler/framework/java/com/android/server/job/JobSchedulerInternal.java
@@ -94,7 +94,7 @@
/**
* Write the persist stats to the specified field.
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
final long flToken = proto.start(JobStorePersistStatsProto.FIRST_LOAD);
diff --git a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
index 0a4e020..3204013 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
@@ -3345,7 +3345,7 @@
mConcurrencyManager.dumpProtoLocked(proto,
JobSchedulerServiceDumpProto.CONCURRENCY_MANAGER, now, nowElapsed);
- mJobs.getPersistStats().writeToProto(proto, JobSchedulerServiceDumpProto.PERSIST_STATS);
+ mJobs.getPersistStats().dumpDebug(proto, JobSchedulerServiceDumpProto.PERSIST_STATS);
}
proto.flush();
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java
index 7d36303..8eeea1b 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java
@@ -639,7 +639,7 @@
for (int i = 0; i < mAvailableNetworks.size(); i++) {
Network network = mAvailableNetworks.valueAt(i);
if (network != null) {
- network.writeToProto(proto,
+ network.dumpDebug(proto,
StateControllerProto.ConnectivityController.AVAILABLE_NETWORKS);
}
}
@@ -658,7 +658,7 @@
js.getSourceUid());
NetworkRequest rn = js.getJob().getRequiredNetwork();
if (rn != null) {
- rn.writeToProto(proto,
+ rn.dumpDebug(proto,
StateControllerProto.ConnectivityController.TrackedJob
.REQUIRED_NETWORK);
}
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
index c76346f..a8d8bd9 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
@@ -1414,7 +1414,7 @@
proto.write(JobStatusDumpProto.JobWorkItem.WORK_ID, work.getWorkId());
proto.write(JobStatusDumpProto.JobWorkItem.DELIVERY_COUNT, work.getDeliveryCount());
if (work.getIntent() != null) {
- work.getIntent().writeToProto(proto, JobStatusDumpProto.JobWorkItem.INTENT);
+ work.getIntent().dumpDebug(proto, JobStatusDumpProto.JobWorkItem.INTENT);
}
Object grants = work.getGrants();
if (grants != null) {
@@ -1683,7 +1683,7 @@
if (full) {
final long jiToken = proto.start(JobStatusDumpProto.JOB_INFO);
- job.getService().writeToProto(proto, JobStatusDumpProto.JobInfo.SERVICE);
+ job.getService().dumpDebug(proto, JobStatusDumpProto.JobInfo.SERVICE);
proto.write(JobStatusDumpProto.JobInfo.IS_PERIODIC, job.isPeriodic());
proto.write(JobStatusDumpProto.JobInfo.PERIOD_INTERVAL_MS, job.getIntervalMillis());
@@ -1722,19 +1722,19 @@
}
}
if (job.getExtras() != null && !job.getExtras().maybeIsEmpty()) {
- job.getExtras().writeToProto(proto, JobStatusDumpProto.JobInfo.EXTRAS);
+ job.getExtras().dumpDebug(proto, JobStatusDumpProto.JobInfo.EXTRAS);
}
if (job.getTransientExtras() != null && !job.getTransientExtras().maybeIsEmpty()) {
- job.getTransientExtras().writeToProto(proto, JobStatusDumpProto.JobInfo.TRANSIENT_EXTRAS);
+ job.getTransientExtras().dumpDebug(proto, JobStatusDumpProto.JobInfo.TRANSIENT_EXTRAS);
}
if (job.getClipData() != null) {
- job.getClipData().writeToProto(proto, JobStatusDumpProto.JobInfo.CLIP_DATA);
+ job.getClipData().dumpDebug(proto, JobStatusDumpProto.JobInfo.CLIP_DATA);
}
if (uriPerms != null) {
uriPerms.dump(proto, JobStatusDumpProto.JobInfo.GRANTED_URI_PERMISSIONS);
}
if (job.getRequiredNetwork() != null) {
- job.getRequiredNetwork().writeToProto(proto, JobStatusDumpProto.JobInfo.REQUIRED_NETWORK);
+ job.getRequiredNetwork().dumpDebug(proto, JobStatusDumpProto.JobInfo.REQUIRED_NETWORK);
}
if (mTotalNetworkDownloadBytes != JobInfo.NETWORK_BYTES_UNKNOWN) {
proto.write(JobStatusDumpProto.JobInfo.TOTAL_NETWORK_DOWNLOAD_BYTES,
@@ -1822,7 +1822,7 @@
}
if (network != null) {
- network.writeToProto(proto, JobStatusDumpProto.NETWORK);
+ network.dumpDebug(proto, JobStatusDumpProto.NETWORK);
}
if (pendingWork != null) {
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/QuotaController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/QuotaController.java
index 3fdc571..2e735a4 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/QuotaController.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/QuotaController.java
@@ -133,7 +133,7 @@
return string(userId, packageName);
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(StateControllerProto.QuotaController.Package.USER_ID, userId);
@@ -1638,7 +1638,7 @@
public void dump(ProtoOutputStream proto, long fieldId, Predicate<JobStatus> predicate) {
final long token = proto.start(fieldId);
- mPkg.writeToProto(proto, StateControllerProto.QuotaController.Timer.PKG);
+ mPkg.dumpDebug(proto, StateControllerProto.QuotaController.Timer.PKG);
proto.write(StateControllerProto.QuotaController.Timer.IS_ACTIVE, isActive());
proto.write(StateControllerProto.QuotaController.Timer.START_TIME_ELAPSED,
mStartTimeElapsed);
diff --git a/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java b/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java
index f10db6c..c9139b1 100644
--- a/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java
+++ b/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java
@@ -1810,7 +1810,7 @@
StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, elapsedNanos,
wallClockNanos);
ProtoOutputStream proto = new ProtoOutputStream();
- powerProfile.writeToProto(proto);
+ powerProfile.dumpDebug(proto);
proto.flush();
e.writeStorage(proto.getBytes());
pulledData.add(e);
diff --git a/core/java/android/app/AlarmManager.java b/core/java/android/app/AlarmManager.java
index 3a34b79..d8ddf218 100644
--- a/core/java/android/app/AlarmManager.java
+++ b/core/java/android/app/AlarmManager.java
@@ -1148,11 +1148,11 @@
};
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(AlarmClockInfoProto.TRIGGER_TIME_MS, mTriggerTime);
if (mShowIntent != null) {
- mShowIntent.writeToProto(proto, AlarmClockInfoProto.SHOW_INTENT);
+ mShowIntent.dumpDebug(proto, AlarmClockInfoProto.SHOW_INTENT);
}
proto.end(token);
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index b37cc26..e307142 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -2977,7 +2977,7 @@
/**
* @hide
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(NotificationProto.CHANNEL_ID, getChannelId());
proto.write(NotificationProto.HAS_TICKER_TEXT, this.tickerText != null);
@@ -2993,7 +2993,7 @@
proto.write(NotificationProto.VISIBILITY, this.visibility);
}
if (publicVersion != null) {
- publicVersion.writeToProto(proto, NotificationProto.PUBLIC_VERSION);
+ publicVersion.dumpDebug(proto, NotificationProto.PUBLIC_VERSION);
}
proto.end(token);
}
diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java
index 20d977b..1fc8a2b 100644
--- a/core/java/android/app/NotificationChannel.java
+++ b/core/java/android/app/NotificationChannel.java
@@ -1116,7 +1116,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(NotificationChannelProto.ID, mId);
@@ -1142,7 +1142,7 @@
proto.write(NotificationChannelProto.IS_DELETED, mDeleted);
proto.write(NotificationChannelProto.GROUP, mGroup);
if (mAudioAttributes != null) {
- mAudioAttributes.writeToProto(proto, NotificationChannelProto.AUDIO_ATTRIBUTES);
+ mAudioAttributes.dumpDebug(proto, NotificationChannelProto.AUDIO_ATTRIBUTES);
}
proto.write(NotificationChannelProto.IS_BLOCKABLE_SYSTEM, mBlockableSystem);
proto.write(NotificationChannelProto.ALLOW_APP_OVERLAY, mAllowBubbles);
diff --git a/core/java/android/app/NotificationChannelGroup.java b/core/java/android/app/NotificationChannelGroup.java
index a8ee414..c4c1e4f 100644
--- a/core/java/android/app/NotificationChannelGroup.java
+++ b/core/java/android/app/NotificationChannelGroup.java
@@ -332,7 +332,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(NotificationChannelGroupProto.ID, mId);
@@ -340,7 +340,7 @@
proto.write(NotificationChannelGroupProto.DESCRIPTION, mDescription);
proto.write(NotificationChannelGroupProto.IS_BLOCKED, mBlocked);
for (NotificationChannel channel : mChannels) {
- channel.writeToProto(proto, NotificationChannelGroupProto.CHANNELS);
+ channel.dumpDebug(proto, NotificationChannelGroupProto.CHANNELS);
}
proto.end(token);
}
diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java
index 03ee1e9..850645d 100644
--- a/core/java/android/app/NotificationManager.java
+++ b/core/java/android/app/NotificationManager.java
@@ -1855,7 +1855,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long pToken = proto.start(fieldId);
bitwiseToProtoEnum(proto, PolicyProto.PRIORITY_CATEGORIES, priorityCategories);
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index 06b9506..0407a8a 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -1204,7 +1204,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
if (mTarget != null) {
proto.write(PendingIntentProto.TARGET, mTarget.asBinder().toString());
diff --git a/core/java/android/app/ProfilerInfo.java b/core/java/android/app/ProfilerInfo.java
index 25589f8..d6eb4a8 100644
--- a/core/java/android/app/ProfilerInfo.java
+++ b/core/java/android/app/ProfilerInfo.java
@@ -135,7 +135,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(ProfilerInfoProto.PROFILE_FILE, profileFile);
if (profileFd != null) {
diff --git a/core/java/android/app/WindowConfiguration.java b/core/java/android/app/WindowConfiguration.java
index 8cb094f..aa6492e 100644
--- a/core/java/android/app/WindowConfiguration.java
+++ b/core/java/android/app/WindowConfiguration.java
@@ -615,15 +615,15 @@
* @param fieldId Field Id of the WindowConfiguration as defined in the parent message
* @hide
*/
- public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId) {
+ public void dumpDebug(ProtoOutputStream protoOutputStream, long fieldId) {
final long token = protoOutputStream.start(fieldId);
if (mAppBounds != null) {
- mAppBounds.writeToProto(protoOutputStream, APP_BOUNDS);
+ mAppBounds.dumpDebug(protoOutputStream, APP_BOUNDS);
}
protoOutputStream.write(WINDOWING_MODE, mWindowingMode);
protoOutputStream.write(ACTIVITY_TYPE, mActivityType);
if (mBounds != null) {
- mBounds.writeToProto(protoOutputStream, BOUNDS);
+ mBounds.dumpDebug(protoOutputStream, BOUNDS);
}
protoOutputStream.end(token);
}
diff --git a/core/java/android/content/ClipData.java b/core/java/android/content/ClipData.java
index b6a0a56..999ec37 100644
--- a/core/java/android/content/ClipData.java
+++ b/core/java/android/content/ClipData.java
@@ -682,7 +682,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
if (mHtmlText != null) {
@@ -692,7 +692,7 @@
} else if (mUri != null) {
proto.write(ClipDataProto.Item.URI, mUri.toString());
} else if (mIntent != null) {
- mIntent.writeToProto(proto, ClipDataProto.Item.INTENT, true, true, true, true);
+ mIntent.dumpDebug(proto, ClipDataProto.Item.INTENT, true, true, true, true);
} else {
proto.write(ClipDataProto.Item.NOTHING, true);
}
@@ -1076,11 +1076,11 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
if (mClipDescription != null) {
- mClipDescription.writeToProto(proto, ClipDataProto.DESCRIPTION);
+ mClipDescription.dumpDebug(proto, ClipDataProto.DESCRIPTION);
}
if (mIcon != null) {
final long iToken = proto.start(ClipDataProto.ICON);
@@ -1089,7 +1089,7 @@
proto.end(iToken);
}
for (int i = 0; i < mItems.size(); i++) {
- mItems.get(i).writeToProto(proto, ClipDataProto.ITEMS);
+ mItems.get(i).dumpDebug(proto, ClipDataProto.ITEMS);
}
proto.end(token);
diff --git a/core/java/android/content/ClipDescription.java b/core/java/android/content/ClipDescription.java
index 0c6a935..6739138 100644
--- a/core/java/android/content/ClipDescription.java
+++ b/core/java/android/content/ClipDescription.java
@@ -349,7 +349,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
final int size = mMimeTypes.size();
@@ -361,7 +361,7 @@
proto.write(ClipDescriptionProto.LABEL, mLabel.toString());
}
if (mExtras != null) {
- mExtras.writeToProto(proto, ClipDescriptionProto.EXTRAS);
+ mExtras.dumpDebug(proto, ClipDescriptionProto.EXTRAS);
}
if (mTimeStamp > 0) {
proto.write(ClipDescriptionProto.TIMESTAMP_MS, mTimeStamp);
diff --git a/core/java/android/content/ComponentName.java b/core/java/android/content/ComponentName.java
index 18147b5..33216d7 100644
--- a/core/java/android/content/ComponentName.java
+++ b/core/java/android/content/ComponentName.java
@@ -298,7 +298,7 @@
}
/** Put this here so that individual services don't have to reimplement this. @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(ComponentNameProto.PACKAGE_NAME, mPackage);
proto.write(ComponentNameProto.CLASS_NAME, mClass);
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 40aca0e..ea5f637 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -10286,26 +10286,26 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
// Same input parameters that toString() gives to toShortString().
- writeToProto(proto, fieldId, true, true, true, false);
+ dumpDebug(proto, fieldId, true, true, true, false);
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto) {
+ public void dumpDebug(ProtoOutputStream proto) {
// Same input parameters that toString() gives to toShortString().
- writeToProtoWithoutFieldId(proto, true, true, true, false);
+ dumpDebugWithoutFieldId(proto, true, true, true, false);
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId, boolean secure, boolean comp,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, boolean secure, boolean comp,
boolean extras, boolean clip) {
long token = proto.start(fieldId);
- writeToProtoWithoutFieldId(proto, secure, comp, extras, clip);
+ dumpDebugWithoutFieldId(proto, secure, comp, extras, clip);
proto.end(token);
}
- private void writeToProtoWithoutFieldId(ProtoOutputStream proto, boolean secure, boolean comp,
+ private void dumpDebugWithoutFieldId(ProtoOutputStream proto, boolean secure, boolean comp,
boolean extras, boolean clip) {
if (mAction != null) {
proto.write(IntentProto.ACTION, mAction);
@@ -10331,7 +10331,7 @@
proto.write(IntentProto.PACKAGE, mPackage);
}
if (comp && mComponent != null) {
- mComponent.writeToProto(proto, IntentProto.COMPONENT);
+ mComponent.dumpDebug(proto, IntentProto.COMPONENT);
}
if (mSourceBounds != null) {
proto.write(IntentProto.SOURCE_BOUNDS, mSourceBounds.toShortString());
diff --git a/core/java/android/content/IntentFilter.java b/core/java/android/content/IntentFilter.java
index 099dea2..93390bd 100644
--- a/core/java/android/content/IntentFilter.java
+++ b/core/java/android/content/IntentFilter.java
@@ -924,7 +924,7 @@
dest.writeInt(mPort);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
// The original host information is already contained in host and wild, no output now.
proto.write(AuthorityEntryProto.HOST, mHost);
@@ -1758,7 +1758,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
if (mActions.size() > 0) {
Iterator<String> it = mActions.iterator();
@@ -1781,19 +1781,19 @@
if (mDataSchemeSpecificParts != null) {
Iterator<PatternMatcher> it = mDataSchemeSpecificParts.iterator();
while (it.hasNext()) {
- it.next().writeToProto(proto, IntentFilterProto.DATA_SCHEME_SPECS);
+ it.next().dumpDebug(proto, IntentFilterProto.DATA_SCHEME_SPECS);
}
}
if (mDataAuthorities != null) {
Iterator<AuthorityEntry> it = mDataAuthorities.iterator();
while (it.hasNext()) {
- it.next().writeToProto(proto, IntentFilterProto.DATA_AUTHORITIES);
+ it.next().dumpDebug(proto, IntentFilterProto.DATA_AUTHORITIES);
}
}
if (mDataPaths != null) {
Iterator<PatternMatcher> it = mDataPaths.iterator();
while (it.hasNext()) {
- it.next().writeToProto(proto, IntentFilterProto.DATA_PATHS);
+ it.next().dumpDebug(proto, IntentFilterProto.DATA_PATHS);
}
}
if (mDataTypes != null) {
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 37c6f57..552c8ac 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -1398,9 +1398,9 @@
}
/** {@hide} */
- public void writeToProto(ProtoOutputStream proto, long fieldId, int dumpFlags) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, int dumpFlags) {
long token = proto.start(fieldId);
- super.writeToProto(proto, ApplicationInfoProto.PACKAGE, dumpFlags);
+ super.dumpDebug(proto, ApplicationInfoProto.PACKAGE, dumpFlags);
proto.write(ApplicationInfoProto.PERMISSION, permission);
proto.write(ApplicationInfoProto.PROCESS_NAME, processName);
proto.write(ApplicationInfoProto.UID, uid);
diff --git a/core/java/android/content/pm/FeatureInfo.java b/core/java/android/content/pm/FeatureInfo.java
index dc576e8..9f3ab77 100644
--- a/core/java/android/content/pm/FeatureInfo.java
+++ b/core/java/android/content/pm/FeatureInfo.java
@@ -115,7 +115,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
if (name != null) {
proto.write(FeatureInfoProto.NAME, name);
diff --git a/core/java/android/content/pm/PackageItemInfo.java b/core/java/android/content/pm/PackageItemInfo.java
index d0ab8f7..50a2f00 100644
--- a/core/java/android/content/pm/PackageItemInfo.java
+++ b/core/java/android/content/pm/PackageItemInfo.java
@@ -436,7 +436,7 @@
/**
* @hide
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId, int dumpFlags) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, int dumpFlags) {
long token = proto.start(fieldId);
if (name != null) {
proto.write(PackageItemInfoProto.NAME, name);
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index 5a45d9f..090629f 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -1115,7 +1115,7 @@
* @param critical If true, reduce amount of data written.
* @hide
*/
- public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId, boolean persisted,
+ public void dumpDebug(ProtoOutputStream protoOutputStream, long fieldId, boolean persisted,
boolean critical) {
final long token = protoOutputStream.start(fieldId);
if (!critical) {
@@ -1138,7 +1138,7 @@
protoOutputStream.write(DENSITY_DPI, densityDpi);
// For persistence, we do not care about window configuration
if (!persisted && windowConfiguration != null) {
- windowConfiguration.writeToProto(protoOutputStream, WINDOW_CONFIGURATION);
+ windowConfiguration.dumpDebug(protoOutputStream, WINDOW_CONFIGURATION);
}
}
protoOutputStream.write(ORIENTATION, orientation);
@@ -1155,8 +1155,8 @@
* @param fieldId Field Id of the Configuration as defined in the parent message
* @hide
*/
- public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId) {
- writeToProto(protoOutputStream, fieldId, false /* persisted */, false /* critical */);
+ public void dumpDebug(ProtoOutputStream protoOutputStream, long fieldId) {
+ dumpDebug(protoOutputStream, fieldId, false /* persisted */, false /* critical */);
}
/**
@@ -1168,8 +1168,8 @@
* @param critical If true, reduce amount of data written.
* @hide
*/
- public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId, boolean critical) {
- writeToProto(protoOutputStream, fieldId, false /* persisted */, critical);
+ public void dumpDebug(ProtoOutputStream protoOutputStream, long fieldId, boolean critical) {
+ dumpDebug(protoOutputStream, fieldId, false /* persisted */, critical);
}
/**
@@ -1338,7 +1338,7 @@
}
final long token = protoOutputStream.start(fieldId);
- writeToProto(protoOutputStream, CONFIGURATION);
+ dumpDebug(protoOutputStream, CONFIGURATION);
protoOutputStream.write(SDK_VERSION, Build.VERSION.RESOURCES_SDK_INT);
protoOutputStream.write(SCREEN_WIDTH_PX, width);
protoOutputStream.write(SCREEN_HEIGHT_PX, height);
diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java
index f12ba13..c6c73fe 100644
--- a/core/java/android/net/Network.java
+++ b/core/java/android/net/Network.java
@@ -502,7 +502,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(NetworkProto.NET_ID, netId);
proto.end(token);
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index 88877e2..db20dbd 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -1602,7 +1602,7 @@
}
/** @hide */
- public void writeToProto(@NonNull ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(@NonNull ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
for (int transport : getTransportTypes()) {
diff --git a/core/java/android/net/NetworkIdentity.java b/core/java/android/net/NetworkIdentity.java
index febc730..c1198aa 100644
--- a/core/java/android/net/NetworkIdentity.java
+++ b/core/java/android/net/NetworkIdentity.java
@@ -114,7 +114,7 @@
return builder.append("}").toString();
}
- public void writeToProto(ProtoOutputStream proto, long tag) {
+ public void dumpDebug(ProtoOutputStream proto, long tag) {
final long start = proto.start(tag);
proto.write(NetworkIdentityProto.TYPE, mType);
diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java
index 4270740..adc497a 100644
--- a/core/java/android/net/NetworkRequest.java
+++ b/core/java/android/net/NetworkRequest.java
@@ -485,13 +485,13 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(NetworkRequestProto.TYPE, typeToProtoEnum(type));
proto.write(NetworkRequestProto.REQUEST_ID, requestId);
proto.write(NetworkRequestProto.LEGACY_TYPE, legacyType);
- networkCapabilities.writeToProto(proto, NetworkRequestProto.NETWORK_CAPABILITIES);
+ networkCapabilities.dumpDebug(proto, NetworkRequestProto.NETWORK_CAPABILITIES);
proto.end(token);
}
diff --git a/core/java/android/net/NetworkStatsHistory.java b/core/java/android/net/NetworkStatsHistory.java
index f61260e..d96d2ee 100644
--- a/core/java/android/net/NetworkStatsHistory.java
+++ b/core/java/android/net/NetworkStatsHistory.java
@@ -684,7 +684,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long tag) {
+ public void dumpDebug(ProtoOutputStream proto, long tag) {
final long start = proto.start(tag);
proto.write(NetworkStatsHistoryProto.BUCKET_DURATION_MS, bucketDuration);
@@ -693,11 +693,11 @@
final long startBucket = proto.start(NetworkStatsHistoryProto.BUCKETS);
proto.write(NetworkStatsHistoryBucketProto.BUCKET_START_MS, bucketStart[i]);
- writeToProto(proto, NetworkStatsHistoryBucketProto.RX_BYTES, rxBytes, i);
- writeToProto(proto, NetworkStatsHistoryBucketProto.RX_PACKETS, rxPackets, i);
- writeToProto(proto, NetworkStatsHistoryBucketProto.TX_BYTES, txBytes, i);
- writeToProto(proto, NetworkStatsHistoryBucketProto.TX_PACKETS, txPackets, i);
- writeToProto(proto, NetworkStatsHistoryBucketProto.OPERATIONS, operations, i);
+ dumpDebug(proto, NetworkStatsHistoryBucketProto.RX_BYTES, rxBytes, i);
+ dumpDebug(proto, NetworkStatsHistoryBucketProto.RX_PACKETS, rxPackets, i);
+ dumpDebug(proto, NetworkStatsHistoryBucketProto.TX_BYTES, txBytes, i);
+ dumpDebug(proto, NetworkStatsHistoryBucketProto.TX_PACKETS, txPackets, i);
+ dumpDebug(proto, NetworkStatsHistoryBucketProto.OPERATIONS, operations, i);
proto.end(startBucket);
}
@@ -705,7 +705,7 @@
proto.end(start);
}
- private static void writeToProto(ProtoOutputStream proto, long tag, long[] array, int index) {
+ private static void dumpDebug(ProtoOutputStream proto, long tag, long[] array, int index) {
if (array != null) {
proto.write(tag, array[index]);
}
diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java
index 7e11840..c5b4222 100644
--- a/core/java/android/os/Bundle.java
+++ b/core/java/android/os/Bundle.java
@@ -1345,7 +1345,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
if (mParcelledData != null) {
diff --git a/core/java/android/os/Looper.java b/core/java/android/os/Looper.java
index d468972..df16ffe 100644
--- a/core/java/android/os/Looper.java
+++ b/core/java/android/os/Looper.java
@@ -415,12 +415,12 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long looperToken = proto.start(fieldId);
proto.write(LooperProto.THREAD_NAME, mThread.getName());
proto.write(LooperProto.THREAD_ID, mThread.getId());
if (mQueue != null) {
- mQueue.writeToProto(proto, LooperProto.QUEUE);
+ mQueue.dumpDebug(proto, LooperProto.QUEUE);
}
proto.end(looperToken);
}
diff --git a/core/java/android/os/Message.java b/core/java/android/os/Message.java
index 6055bef..9d101e5 100644
--- a/core/java/android/os/Message.java
+++ b/core/java/android/os/Message.java
@@ -574,7 +574,7 @@
return b.toString();
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long messageToken = proto.start(fieldId);
proto.write(MessageProto.WHEN, when);
diff --git a/core/java/android/os/MessageQueue.java b/core/java/android/os/MessageQueue.java
index f98fdc3..b5f4bc6 100644
--- a/core/java/android/os/MessageQueue.java
+++ b/core/java/android/os/MessageQueue.java
@@ -807,11 +807,11 @@
}
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long messageQueueToken = proto.start(fieldId);
synchronized (this) {
for (Message msg = mMessages; msg != null; msg = msg.next) {
- msg.writeToProto(proto, MessageQueueProto.MESSAGES);
+ msg.dumpDebug(proto, MessageQueueProto.MESSAGES);
}
proto.write(MessageQueueProto.IS_POLLING_LOCKED, isPollingLocked());
proto.write(MessageQueueProto.IS_QUITTING, mQuitting);
diff --git a/core/java/android/os/PatternMatcher.java b/core/java/android/os/PatternMatcher.java
index ef03e8c..428405b 100644
--- a/core/java/android/os/PatternMatcher.java
+++ b/core/java/android/os/PatternMatcher.java
@@ -133,7 +133,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(PatternMatcherProto.PATTERN, mPattern);
proto.write(PatternMatcherProto.TYPE, mType);
diff --git a/core/java/android/os/PersistableBundle.java b/core/java/android/os/PersistableBundle.java
index 6f1bf71..b40283f 100644
--- a/core/java/android/os/PersistableBundle.java
+++ b/core/java/android/os/PersistableBundle.java
@@ -324,7 +324,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
if (mParcelledData != null) {
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index f18b4db..725e0fb 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -2315,7 +2315,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
synchronized (mToken) {
final long token = proto.start(fieldId);
proto.write(PowerManagerProto.WakeLock.TAG, mTag);
@@ -2323,7 +2323,7 @@
proto.write(PowerManagerProto.WakeLock.HELD, mHeld);
proto.write(PowerManagerProto.WakeLock.INTERNAL_COUNT, mInternalCount);
if (mWorkSource != null) {
- mWorkSource.writeToProto(proto, PowerManagerProto.WakeLock.WORK_SOURCE);
+ mWorkSource.dumpDebug(proto, PowerManagerProto.WakeLock.WORK_SOURCE);
}
proto.end(token);
}
diff --git a/core/java/android/os/WorkSource.java b/core/java/android/os/WorkSource.java
index b5635a4..397c2a9 100644
--- a/core/java/android/os/WorkSource.java
+++ b/core/java/android/os/WorkSource.java
@@ -1218,7 +1218,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long workSourceToken = proto.start(fieldId);
for (int i = 0; i < mNum; i++) {
final long contentProto = proto.start(WorkSourceProto.WORK_SOURCE_CONTENTS);
diff --git a/core/java/android/service/notification/Condition.java b/core/java/android/service/notification/Condition.java
index e506509..cf57e25 100644
--- a/core/java/android/service/notification/Condition.java
+++ b/core/java/android/service/notification/Condition.java
@@ -151,7 +151,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
// id is guaranteed not to be null.
diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java
index 1f2c872..dedc3b7 100644
--- a/core/java/android/service/notification/ZenModeConfig.java
+++ b/core/java/android/service/notification/ZenModeConfig.java
@@ -1739,7 +1739,7 @@
/** @hide */
// TODO: add configuration activity
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(ZenRuleProto.ID, id);
@@ -1753,13 +1753,13 @@
proto.write(ZenRuleProto.CONDITION_ID, conditionId.toString());
}
if (condition != null) {
- condition.writeToProto(proto, ZenRuleProto.CONDITION);
+ condition.dumpDebug(proto, ZenRuleProto.CONDITION);
}
if (component != null) {
- component.writeToProto(proto, ZenRuleProto.COMPONENT);
+ component.dumpDebug(proto, ZenRuleProto.COMPONENT);
}
if (zenPolicy != null) {
- zenPolicy.writeToProto(proto, ZenRuleProto.ZEN_POLICY);
+ zenPolicy.dumpDebug(proto, ZenRuleProto.ZEN_POLICY);
}
proto.write(ZenRuleProto.MODIFIED, modified);
proto.end(token);
diff --git a/core/java/android/service/notification/ZenPolicy.java b/core/java/android/service/notification/ZenPolicy.java
index 9694998..6e2faa9 100644
--- a/core/java/android/service/notification/ZenPolicy.java
+++ b/core/java/android/service/notification/ZenPolicy.java
@@ -973,7 +973,7 @@
/**
* @hide
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(ZenPolicyProto.REMINDERS, getPriorityCategoryReminders());
diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java
index 797c128..411508f 100644
--- a/core/java/android/view/DisplayCutout.java
+++ b/core/java/android/view/DisplayCutout.java
@@ -500,13 +500,13 @@
/**
* @hide
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- mSafeInsets.writeToProto(proto, INSETS);
- mBounds.getRect(BOUNDS_POSITION_LEFT).writeToProto(proto, BOUND_LEFT);
- mBounds.getRect(BOUNDS_POSITION_TOP).writeToProto(proto, BOUND_TOP);
- mBounds.getRect(BOUNDS_POSITION_RIGHT).writeToProto(proto, BOUND_RIGHT);
- mBounds.getRect(BOUNDS_POSITION_BOTTOM).writeToProto(proto, BOUND_BOTTOM);
+ mSafeInsets.dumpDebug(proto, INSETS);
+ mBounds.getRect(BOUNDS_POSITION_LEFT).dumpDebug(proto, BOUND_LEFT);
+ mBounds.getRect(BOUNDS_POSITION_TOP).dumpDebug(proto, BOUND_TOP);
+ mBounds.getRect(BOUNDS_POSITION_RIGHT).dumpDebug(proto, BOUND_RIGHT);
+ mBounds.getRect(BOUNDS_POSITION_BOTTOM).dumpDebug(proto, BOUND_BOTTOM);
proto.end(token);
}
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java
index 38baccb..04e82c7 100644
--- a/core/java/android/view/DisplayInfo.java
+++ b/core/java/android/view/DisplayInfo.java
@@ -651,7 +651,7 @@
* @param protoOutputStream Stream to write the Rect object to.
* @param fieldId Field Id of the DisplayInfoProto as defined in the parent message
*/
- public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId) {
+ public void dumpDebug(ProtoOutputStream protoOutputStream, long fieldId) {
final long token = protoOutputStream.start(fieldId);
protoOutputStream.write(LOGICAL_WIDTH, logicalWidth);
protoOutputStream.write(LOGICAL_HEIGHT, logicalHeight);
diff --git a/core/java/android/view/RemoteAnimationTarget.java b/core/java/android/view/RemoteAnimationTarget.java
index ae3e1d0..b873482 100644
--- a/core/java/android/view/RemoteAnimationTarget.java
+++ b/core/java/android/view/RemoteAnimationTarget.java
@@ -234,23 +234,23 @@
pw.print(prefix); pw.print("leash="); pw.println(leash);
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(TASK_ID, taskId);
proto.write(MODE, mode);
- leash.writeToProto(proto, LEASH);
+ leash.dumpDebug(proto, LEASH);
proto.write(IS_TRANSLUCENT, isTranslucent);
- clipRect.writeToProto(proto, CLIP_RECT);
- contentInsets.writeToProto(proto, CONTENT_INSETS);
+ clipRect.dumpDebug(proto, CLIP_RECT);
+ contentInsets.dumpDebug(proto, CONTENT_INSETS);
proto.write(PREFIX_ORDER_INDEX, prefixOrderIndex);
- position.writeToProto(proto, POSITION);
- sourceContainerBounds.writeToProto(proto, SOURCE_CONTAINER_BOUNDS);
- windowConfiguration.writeToProto(proto, WINDOW_CONFIGURATION);
+ position.dumpDebug(proto, POSITION);
+ sourceContainerBounds.dumpDebug(proto, SOURCE_CONTAINER_BOUNDS);
+ windowConfiguration.dumpDebug(proto, WINDOW_CONFIGURATION);
if (startLeash != null) {
- startLeash.writeToProto(proto, START_LEASH);
+ startLeash.dumpDebug(proto, START_LEASH);
}
if (startBounds != null) {
- startBounds.writeToProto(proto, START_BOUNDS);
+ startBounds.dumpDebug(proto, START_BOUNDS);
}
proto.end(token);
}
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index fc80e00..61624fd 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -895,7 +895,7 @@
* @param fieldId Field Id of the SurfaceControl as defined in the parent message.
* @hide
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(HASH_CODE, System.identityHashCode(this));
proto.write(NAME, mName);
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index c62e69c..8734e29 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -3251,7 +3251,7 @@
/**
* @hide
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(TYPE, type);
proto.write(X, x);
diff --git a/core/java/com/android/internal/app/procstats/AssociationState.java b/core/java/com/android/internal/app/procstats/AssociationState.java
index 1d4239f..dea3566 100644
--- a/core/java/com/android/internal/app/procstats/AssociationState.java
+++ b/core/java/com/android/internal/app/procstats/AssociationState.java
@@ -945,7 +945,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, long now) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, long now) {
final long token = proto.start(fieldId);
proto.write(PackageAssociationProcessStatsProto.COMPONENT_NAME, mName);
diff --git a/core/java/com/android/internal/app/procstats/ProcessState.java b/core/java/com/android/internal/app/procstats/ProcessState.java
index 392b8d3..a6bed5b 100644
--- a/core/java/com/android/internal/app/procstats/ProcessState.java
+++ b/core/java/com/android/internal/app/procstats/ProcessState.java
@@ -1341,7 +1341,7 @@
return sb.toString();
}
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
String procName, int uid, long now) {
final long token = proto.start(fieldId);
proto.write(ProcessStatsProto.PROCESS, procName);
diff --git a/core/java/com/android/internal/app/procstats/ProcessStats.java b/core/java/com/android/internal/app/procstats/ProcessStats.java
index 875cff8..3045410 100644
--- a/core/java/com/android/internal/app/procstats/ProcessStats.java
+++ b/core/java/com/android/internal/app/procstats/ProcessStats.java
@@ -2168,7 +2168,7 @@
/**
* Writes to ProtoOutputStream.
*/
- public void writeToProto(ProtoOutputStream proto, long now, int section) {
+ public void dumpDebug(ProtoOutputStream proto, long now, int section) {
proto.write(ProcessStatsSectionProto.START_REALTIME_MS, mTimePeriodStartRealtime);
proto.write(ProcessStatsSectionProto.END_REALTIME_MS,
mRunning ? SystemClock.elapsedRealtime() : mTimePeriodEndRealtime);
@@ -2215,7 +2215,7 @@
for (int iu = 0; iu < uids.size(); iu++) {
final int uid = uids.keyAt(iu);
final ProcessState procState = uids.valueAt(iu);
- procState.writeToProto(proto, ProcessStatsSectionProto.PROCESS_STATS, procName,
+ procState.dumpDebug(proto, ProcessStatsSectionProto.PROCESS_STATS, procName,
uid, now);
}
}
@@ -2230,7 +2230,7 @@
final LongSparseArray<PackageState> vers = uids.valueAt(iu);
for (int iv = 0; iv < vers.size(); iv++) {
final PackageState pkgState = vers.valueAt(iv);
- pkgState.writeToProto(proto, ProcessStatsSectionProto.PACKAGE_STATS, now,
+ pkgState.dumpDebug(proto, ProcessStatsSectionProto.PACKAGE_STATS, now,
section);
}
}
@@ -2283,7 +2283,7 @@
/**
* Writes the containing stats into proto, with options to choose smaller sections.
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId, long now, int section) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, long now, int section) {
final long token = proto.start(fieldId);
proto.write(ProcessStatsPackageProto.PACKAGE, mPackageName);
@@ -2294,7 +2294,7 @@
for (int ip = 0; ip < mProcesses.size(); ip++) {
final String procName = mProcesses.keyAt(ip);
final ProcessState procState = mProcesses.valueAt(ip);
- procState.writeToProto(proto, ProcessStatsPackageProto.PROCESS_STATS, procName,
+ procState.dumpDebug(proto, ProcessStatsPackageProto.PROCESS_STATS, procName,
mUid, now);
}
}
@@ -2302,7 +2302,7 @@
if ((section & ProcessStats.REPORT_PKG_SVC_STATS) != 0) {
for (int is = 0; is < mServices.size(); is++) {
final ServiceState serviceState = mServices.valueAt(is);
- serviceState.writeToProto(proto, ProcessStatsPackageProto.SERVICE_STATS,
+ serviceState.dumpDebug(proto, ProcessStatsPackageProto.SERVICE_STATS,
now);
}
}
@@ -2310,7 +2310,7 @@
if ((section & ProcessStats.REPORT_PKG_ASC_STATS) != 0) {
for (int ia = 0; ia < mAssociations.size(); ia++) {
final AssociationState ascState = mAssociations.valueAt(ia);
- ascState.writeToProto(proto, ProcessStatsPackageProto.ASSOCIATION_STATS,
+ ascState.dumpDebug(proto, ProcessStatsPackageProto.ASSOCIATION_STATS,
now);
}
}
diff --git a/core/java/com/android/internal/app/procstats/ServiceState.java b/core/java/com/android/internal/app/procstats/ServiceState.java
index 72077c4..bf03050 100644
--- a/core/java/com/android/internal/app/procstats/ServiceState.java
+++ b/core/java/com/android/internal/app/procstats/ServiceState.java
@@ -554,7 +554,7 @@
pw.println();
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, long now) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, long now) {
final long token = proto.start(fieldId);
proto.write(PackageServiceStatsProto.SERVICE_NAME, mName);
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index 8338d78..0faf962 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -506,7 +506,7 @@
/**
* Dump power constants into PowerProfileProto
*/
- public void writeToProto(ProtoOutputStream proto) {
+ public void dumpDebug(ProtoOutputStream proto) {
// cpu.suspend
writePowerConstantToProto(proto, POWER_CPU_SUSPEND, PowerProfileProto.CPU_SUSPEND);
diff --git a/core/java/com/android/internal/util/LocalLog.java b/core/java/com/android/internal/util/LocalLog.java
index 8edb739..3916691 100644
--- a/core/java/com/android/internal/util/LocalLog.java
+++ b/core/java/com/android/internal/util/LocalLog.java
@@ -65,7 +65,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
synchronized (mLines) {
diff --git a/core/tests/coretests/src/android/content/res/ConfigurationTest.java b/core/tests/coretests/src/android/content/res/ConfigurationTest.java
index c231e61..2c956c9 100644
--- a/core/tests/coretests/src/android/content/res/ConfigurationTest.java
+++ b/core/tests/coretests/src/android/content/res/ConfigurationTest.java
@@ -96,7 +96,7 @@
.setExtension('u', "nu-latn").build();
Configuration write = new Configuration();
write.setLocales(new LocaleList(arabic, urdu, urduExtension));
- writeToProto(proto, write);
+ dumpDebug(proto, write);
assertTrue("Failed to write configs to proto.", proto.exists());
final Configuration read = new Configuration();
@@ -148,13 +148,13 @@
assertEquals(SMALLEST_SCREEN_WIDTH_DP_UNDEFINED, config.smallestScreenWidthDp);
}
- private void writeToProto(File f, Configuration config) throws Exception {
+ private void dumpDebug(File f, Configuration config) throws Exception {
final AtomicFile af = new AtomicFile(f);
FileOutputStream fos = af.startWrite();
try {
final ProtoOutputStream protoOut = new ProtoOutputStream(fos);
final long token = protoOut.start(IntervalStatsProto.CONFIGURATIONS);
- config.writeToProto(protoOut, IntervalStatsProto.Configuration.CONFIG, false, false);
+ config.dumpDebug(protoOut, IntervalStatsProto.Configuration.CONFIG, false, false);
protoOut.end(token);
protoOut.flush();
af.finishWrite(fos);
diff --git a/graphics/java/android/graphics/Point.java b/graphics/java/android/graphics/Point.java
index 3614f3b..9f71a0f 100644
--- a/graphics/java/android/graphics/Point.java
+++ b/graphics/java/android/graphics/Point.java
@@ -132,7 +132,7 @@
* @param fieldId Field Id of the Rect as defined in the parent message
* @hide
*/
- public void writeToProto(@NonNull ProtoOutputStream protoOutputStream, long fieldId) {
+ public void dumpDebug(@NonNull ProtoOutputStream protoOutputStream, long fieldId) {
final long token = protoOutputStream.start(fieldId);
protoOutputStream.write(PointProto.X, x);
protoOutputStream.write(PointProto.Y, y);
diff --git a/graphics/java/android/graphics/Rect.java b/graphics/java/android/graphics/Rect.java
index d47f682..9e1946c 100644
--- a/graphics/java/android/graphics/Rect.java
+++ b/graphics/java/android/graphics/Rect.java
@@ -239,7 +239,7 @@
* @param fieldId Field Id of the Rect as defined in the parent message
* @hide
*/
- public void writeToProto(@NonNull ProtoOutputStream protoOutputStream, long fieldId) {
+ public void dumpDebug(@NonNull ProtoOutputStream protoOutputStream, long fieldId) {
final long token = protoOutputStream.start(fieldId);
protoOutputStream.write(RectProto.LEFT, left);
protoOutputStream.write(RectProto.TOP, top);
diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java
index 3a092a0..c701d2a 100644
--- a/media/java/android/media/AudioAttributes.java
+++ b/media/java/android/media/AudioAttributes.java
@@ -1062,7 +1062,7 @@
}
/** @hide */
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(AudioAttributesProto.USAGE, mUsage);
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index e4d477a..1e5b915 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -790,7 +790,7 @@
return b.toString();
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, long nowElapsed,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, long nowElapsed,
long nowRTC) {
final long token = proto.start(fieldId);
@@ -798,7 +798,7 @@
proto.write(BatchProto.END_REALTIME, end);
proto.write(BatchProto.FLAGS, flags);
for (Alarm a : alarms) {
- a.writeToProto(proto, BatchProto.ALARMS, nowElapsed, nowRTC);
+ a.dumpDebug(proto, BatchProto.ALARMS, nowElapsed, nowRTC);
}
proto.end(token);
@@ -1320,7 +1320,7 @@
+ "}";
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(InFlightProto.UID, mUid);
@@ -1328,16 +1328,16 @@
proto.write(InFlightProto.WHEN_ELAPSED_MS, mWhenElapsed);
proto.write(InFlightProto.ALARM_TYPE, mAlarmType);
if (mPendingIntent != null) {
- mPendingIntent.writeToProto(proto, InFlightProto.PENDING_INTENT);
+ mPendingIntent.dumpDebug(proto, InFlightProto.PENDING_INTENT);
}
if (mBroadcastStats != null) {
- mBroadcastStats.writeToProto(proto, InFlightProto.BROADCAST_STATS);
+ mBroadcastStats.dumpDebug(proto, InFlightProto.BROADCAST_STATS);
}
if (mFilterStats != null) {
- mFilterStats.writeToProto(proto, InFlightProto.FILTER_STATS);
+ mFilterStats.dumpDebug(proto, InFlightProto.FILTER_STATS);
}
if (mWorkSource != null) {
- mWorkSource.writeToProto(proto, InFlightProto.WORK_SOURCE);
+ mWorkSource.dumpDebug(proto, InFlightProto.WORK_SOURCE);
}
proto.end(token);
@@ -1387,7 +1387,7 @@
+ "}";
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(FilterStatsProto.TAG, mTag);
@@ -1431,7 +1431,7 @@
+ "}";
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(BroadcastStatsProto.UID, mUid);
@@ -2573,34 +2573,34 @@
proto.end(aToken);
}
for (Batch b : mAlarmBatches) {
- b.writeToProto(proto, AlarmManagerServiceDumpProto.PENDING_ALARM_BATCHES,
+ b.dumpDebug(proto, AlarmManagerServiceDumpProto.PENDING_ALARM_BATCHES,
nowElapsed, nowRTC);
}
for (int i = 0; i < mPendingBackgroundAlarms.size(); i++) {
final ArrayList<Alarm> blockedAlarms = mPendingBackgroundAlarms.valueAt(i);
if (blockedAlarms != null) {
for (Alarm a : blockedAlarms) {
- a.writeToProto(proto,
+ a.dumpDebug(proto,
AlarmManagerServiceDumpProto.PENDING_USER_BLOCKED_BACKGROUND_ALARMS,
nowElapsed, nowRTC);
}
}
}
if (mPendingIdleUntil != null) {
- mPendingIdleUntil.writeToProto(
+ mPendingIdleUntil.dumpDebug(
proto, AlarmManagerServiceDumpProto.PENDING_IDLE_UNTIL, nowElapsed, nowRTC);
}
for (Alarm a : mPendingWhileIdleAlarms) {
- a.writeToProto(proto, AlarmManagerServiceDumpProto.PENDING_WHILE_IDLE_ALARMS,
+ a.dumpDebug(proto, AlarmManagerServiceDumpProto.PENDING_WHILE_IDLE_ALARMS,
nowElapsed, nowRTC);
}
if (mNextWakeFromIdle != null) {
- mNextWakeFromIdle.writeToProto(proto, AlarmManagerServiceDumpProto.NEXT_WAKE_FROM_IDLE,
+ mNextWakeFromIdle.dumpDebug(proto, AlarmManagerServiceDumpProto.NEXT_WAKE_FROM_IDLE,
nowElapsed, nowRTC);
}
for (Alarm a : mPendingNonWakeupAlarms) {
- a.writeToProto(proto, AlarmManagerServiceDumpProto.PAST_DUE_NON_WAKEUP_ALARMS,
+ a.dumpDebug(proto, AlarmManagerServiceDumpProto.PAST_DUE_NON_WAKEUP_ALARMS,
nowElapsed, nowRTC);
}
@@ -2617,7 +2617,7 @@
proto.write(AlarmManagerServiceDumpProto.LISTENER_FINISH_COUNT, mListenerFinishCount);
for (InFlight f : mInFlight) {
- f.writeToProto(proto, AlarmManagerServiceDumpProto.OUTSTANDING_DELIVERIES);
+ f.dumpDebug(proto, AlarmManagerServiceDumpProto.OUTSTANDING_DELIVERIES);
}
for (int i = 0; i < mLastAllowWhileIdleDispatch.size(); ++i) {
@@ -2640,7 +2640,7 @@
}
}
- mLog.writeToProto(proto, AlarmManagerServiceDumpProto.RECENT_PROBLEMS);
+ mLog.dumpDebug(proto, AlarmManagerServiceDumpProto.RECENT_PROBLEMS);
final FilterStats[] topFilters = new FilterStats[10];
final Comparator<FilterStats> comparator = new Comparator<FilterStats>() {
@@ -2687,7 +2687,7 @@
proto.write(AlarmManagerServiceDumpProto.TopAlarm.UID, fs.mBroadcastStats.mUid);
proto.write(AlarmManagerServiceDumpProto.TopAlarm.PACKAGE_NAME,
fs.mBroadcastStats.mPackageName);
- fs.writeToProto(proto, AlarmManagerServiceDumpProto.TopAlarm.FILTER);
+ fs.dumpDebug(proto, AlarmManagerServiceDumpProto.TopAlarm.FILTER);
proto.end(token);
}
@@ -2699,7 +2699,7 @@
final long token = proto.start(AlarmManagerServiceDumpProto.ALARM_STATS);
BroadcastStats bs = uidStats.valueAt(ip);
- bs.writeToProto(proto, AlarmManagerServiceDumpProto.AlarmStat.BROADCAST);
+ bs.dumpDebug(proto, AlarmManagerServiceDumpProto.AlarmStat.BROADCAST);
// uidStats is an ArrayMap, which we can't sort.
tmpFilters.clear();
@@ -2708,7 +2708,7 @@
}
Collections.sort(tmpFilters, comparator);
for (FilterStats fs : tmpFilters) {
- fs.writeToProto(proto, AlarmManagerServiceDumpProto.AlarmStat.FILTERS);
+ fs.dumpDebug(proto, AlarmManagerServiceDumpProto.AlarmStat.FILTERS);
}
proto.end(token);
@@ -3652,7 +3652,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, long nowElapsed,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, long nowElapsed,
long nowRTC) {
final long token = proto.start(fieldId);
@@ -3664,10 +3664,10 @@
proto.write(AlarmProto.COUNT, count);
proto.write(AlarmProto.FLAGS, flags);
if (alarmClock != null) {
- alarmClock.writeToProto(proto, AlarmProto.ALARM_CLOCK);
+ alarmClock.dumpDebug(proto, AlarmProto.ALARM_CLOCK);
}
if (operation != null) {
- operation.writeToProto(proto, AlarmProto.OPERATION);
+ operation.dumpDebug(proto, AlarmProto.OPERATION);
}
if (listener != null) {
proto.write(AlarmProto.LISTENER, listener.asBinder().toString());
diff --git a/services/core/java/com/android/server/IntentResolver.java b/services/core/java/com/android/server/IntentResolver.java
index 80fda19..deb94bd 100644
--- a/services/core/java/com/android/server/IntentResolver.java
+++ b/services/core/java/com/android/server/IntentResolver.java
@@ -294,7 +294,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
writeProtoMap(proto, IntentResolverProto.FULL_MIME_TYPES, mTypeToFilter);
writeProtoMap(proto, IntentResolverProto.BASE_MIME_TYPES, mBaseTypeToFilter);
diff --git a/services/core/java/com/android/server/am/ActiveInstrumentation.java b/services/core/java/com/android/server/am/ActiveInstrumentation.java
index 9510f59..b2c82f0 100644
--- a/services/core/java/com/android/server/am/ActiveInstrumentation.java
+++ b/services/core/java/com/android/server/am/ActiveInstrumentation.java
@@ -126,26 +126,26 @@
pw.println(mArguments);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
- mClass.writeToProto(proto, ActiveInstrumentationProto.CLASS);
+ mClass.dumpDebug(proto, ActiveInstrumentationProto.CLASS);
proto.write(ActiveInstrumentationProto.FINISHED, mFinished);
for (int i=0; i<mRunningProcesses.size(); i++) {
- mRunningProcesses.get(i).writeToProto(proto,
+ mRunningProcesses.get(i).dumpDebug(proto,
ActiveInstrumentationProto.RUNNING_PROCESSES);
}
for (String p : mTargetProcesses) {
proto.write(ActiveInstrumentationProto.TARGET_PROCESSES, p);
}
if (mTargetInfo != null) {
- mTargetInfo.writeToProto(proto, ActiveInstrumentationProto.TARGET_INFO, 0);
+ mTargetInfo.dumpDebug(proto, ActiveInstrumentationProto.TARGET_INFO, 0);
}
proto.write(ActiveInstrumentationProto.PROFILE_FILE, mProfileFile);
proto.write(ActiveInstrumentationProto.WATCHER, mWatcher.toString());
proto.write(ActiveInstrumentationProto.UI_AUTOMATION_CONNECTION,
mUiAutomationConnection.toString());
if (mArguments != null) {
- mArguments.writeToProto(proto, ActiveInstrumentationProto.ARGUMENTS);
+ mArguments.dumpDebug(proto, ActiveInstrumentationProto.ARGUMENTS);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index eb77fea..dab928a 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -4407,7 +4407,7 @@
return new ServiceDumper(fd, pw, args, opti, dumpAll, dumpPackage);
}
- protected void writeToProto(ProtoOutputStream proto, long fieldId) {
+ protected void dumpDebug(ProtoOutputStream proto, long fieldId) {
synchronized (mAm) {
final long outterToken = proto.start(fieldId);
int[] users = mAm.mUserController.getUsers();
@@ -4420,7 +4420,7 @@
proto.write(ActiveServicesProto.ServicesByUser.USER_ID, user);
ArrayMap<ComponentName, ServiceRecord> alls = smap.mServicesByInstanceName;
for (int i=0; i<alls.size(); i++) {
- alls.valueAt(i).writeToProto(proto,
+ alls.valueAt(i).dumpDebug(proto,
ActiveServicesProto.ServicesByUser.SERVICE_RECORDS);
}
proto.end(token);
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 53a5fc6..22d0503 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -853,7 +853,7 @@
+ " " + reason + " " + pid + " " + token + " }";
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long pToken = proto.start(fieldId);
proto.write(ImportanceTokenProto.PID, pid);
if (token != null) {
@@ -1187,7 +1187,7 @@
tag = _tag;
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(ActivityManagerServiceDumpProcessesProto.PendingTempWhitelist.TARGET_UID, targetUid);
proto.write(ActivityManagerServiceDumpProcessesProto.PendingTempWhitelist.DURATION_MS, duration);
@@ -1431,7 +1431,7 @@
}
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(UidObserverRegistrationProto.UID, uid);
proto.write(UidObserverRegistrationProto.PACKAGE, pkg);
@@ -10177,7 +10177,7 @@
}
} else if ("service".equals(cmd)) {
// output proto is ActivityManagerServiceDumpServicesProto
- mServices.writeToProto(proto, ActivityManagerServiceDumpServicesProto.ACTIVE_SERVICES);
+ mServices.dumpDebug(proto, ActivityManagerServiceDumpServicesProto.ACTIVE_SERVICES);
} else if ("processes".equals(cmd) || "p".equals(cmd)) {
if (opti < args.length) {
dumpPackage = args[opti];
@@ -10199,7 +10199,7 @@
proto.end(broadcastToken);
long serviceToken = proto.start(ActivityManagerServiceProto.SERVICES);
- mServices.writeToProto(proto,
+ mServices.dumpDebug(proto,
ActivityManagerServiceDumpServicesProto.ACTIVE_SERVICES);
proto.end(serviceToken);
@@ -11080,7 +11080,7 @@
if (dumpPackage != null && !r.pkgList.containsKey(dumpPackage)) {
continue;
}
- r.writeToProto(proto, ActivityManagerServiceDumpProcessesProto.PROCS,
+ r.dumpDebug(proto, ActivityManagerServiceDumpProcessesProto.PROCS,
mProcessList.mLruProcesses.indexOf(r)
);
if (r.isPersistent()) {
@@ -11094,7 +11094,7 @@
if (dumpPackage != null && !r.pkgList.containsKey(dumpPackage)) {
continue;
}
- r.writeToProto(proto, ActivityManagerServiceDumpProcessesProto.ISOLATED_PROCS,
+ r.dumpDebug(proto, ActivityManagerServiceDumpProcessesProto.ISOLATED_PROCS,
mProcessList.mLruProcesses.indexOf(r)
);
}
@@ -11105,7 +11105,7 @@
&& !ai.mTargetInfo.packageName.equals(dumpPackage)) {
continue;
}
- ai.writeToProto(proto,
+ ai.dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.ACTIVE_INSTRUMENTATIONS);
}
@@ -11115,7 +11115,7 @@
if (dumpPackage != null && UserHandle.getAppId(uidRec.uid) != whichAppId) {
continue;
}
- uidRec.writeToProto(proto, ActivityManagerServiceDumpProcessesProto.ACTIVE_UIDS);
+ uidRec.dumpDebug(proto, ActivityManagerServiceDumpProcessesProto.ACTIVE_UIDS);
}
for (int i = 0; i < mValidateUids.size(); i++) {
@@ -11123,7 +11123,7 @@
if (dumpPackage != null && UserHandle.getAppId(uidRec.uid) != whichAppId) {
continue;
}
- uidRec.writeToProto(proto, ActivityManagerServiceDumpProcessesProto.VALIDATE_UIDS);
+ uidRec.dumpDebug(proto, ActivityManagerServiceDumpProcessesProto.VALIDATE_UIDS);
}
if (mProcessList.getLruSizeLocked() > 0) {
@@ -11147,7 +11147,7 @@
if (!r.pkgList.containsKey(dumpPackage)) {
continue;
}
- r.writeToProto(proto,
+ r.dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.PIDS_SELF_LOCKED);
}
}
@@ -11162,7 +11162,7 @@
|| !r.pkgList.containsKey(dumpPackage))) {
continue;
}
- it.writeToProto(proto,
+ it.dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.IMPORTANT_PROCS);
}
}
@@ -11173,7 +11173,7 @@
if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
continue;
}
- r.writeToProto(proto,
+ r.dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.PERSISTENT_STARTING_PROCS);
}
@@ -11182,7 +11182,7 @@
if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
continue;
}
- r.writeToProto(proto, ActivityManagerServiceDumpProcessesProto.REMOVED_PROCS);
+ r.dumpDebug(proto, ActivityManagerServiceDumpProcessesProto.REMOVED_PROCS);
}
for (int i=0; i<mProcessesOnHold.size(); i++) {
@@ -11190,17 +11190,17 @@
if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
continue;
}
- r.writeToProto(proto, ActivityManagerServiceDumpProcessesProto.ON_HOLD_PROCS);
+ r.dumpDebug(proto, ActivityManagerServiceDumpProcessesProto.ON_HOLD_PROCS);
}
writeProcessesToGcToProto(proto, ActivityManagerServiceDumpProcessesProto.GC_PROCS,
dumpPackage);
- mAppErrors.writeToProto(proto, ActivityManagerServiceDumpProcessesProto.APP_ERRORS,
+ mAppErrors.dumpDebug(proto, ActivityManagerServiceDumpProcessesProto.APP_ERRORS,
dumpPackage);
mAtmInternal.writeProcessesToProto(proto, dumpPackage, mWakefulness, mTestPssMode);
if (dumpPackage == null) {
- mUserController.writeToProto(proto,
+ mUserController.dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.USER_CONTROLLER);
}
@@ -11209,7 +11209,7 @@
final UidObserverRegistration reg = (UidObserverRegistration)
mUidObservers.getRegisteredCallbackCookie(i);
if (dumpPackage == null || dumpPackage.equals(reg.pkg)) {
- reg.writeToProto(proto, ActivityManagerServiceDumpProcessesProto.UID_OBSERVERS);
+ reg.dumpDebug(proto, ActivityManagerServiceDumpProcessesProto.UID_OBSERVERS);
}
}
@@ -11223,7 +11223,7 @@
if (mPendingTempWhitelist.size() > 0) {
for (int i=0; i < mPendingTempWhitelist.size(); i++) {
- mPendingTempWhitelist.valueAt(i).writeToProto(proto,
+ mPendingTempWhitelist.valueAt(i).dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.PENDING_TEMP_WHITELIST);
}
}
@@ -11293,10 +11293,10 @@
final long token = proto.start(ActivityManagerServiceDumpProcessesProto.PROFILE);
proto.write(ActivityManagerServiceDumpProcessesProto.Profile.APP_NAME,
mProfileData.getProfileApp());
- mProfileData.getProfileProc().writeToProto(proto,
+ mProfileData.getProfileProc().dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.Profile.PROC);
if (mProfileData.getProfilerInfo() != null) {
- mProfileData.getProfilerInfo().writeToProto(proto,
+ mProfileData.getProfilerInfo().dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.Profile.INFO);
proto.write(ActivityManagerServiceDumpProcessesProto.Profile.TYPE,
mProfileType);
@@ -11339,7 +11339,7 @@
continue;
}
final long token = proto.start(fieldId);
- r.writeToProto(proto, ProcessToGcProto.PROC);
+ r.dumpDebug(proto, ProcessToGcProto.PROC);
proto.write(ProcessToGcProto.REPORT_LOW_MEMORY, r.reportLowMemory);
proto.write(ProcessToGcProto.NOW_UPTIME_MS, now);
proto.write(ProcessToGcProto.LAST_GCED_MS, r.lastRequestedGc);
@@ -11578,12 +11578,12 @@
Iterator it = mRegisteredReceivers.values().iterator();
while (it.hasNext()) {
ReceiverList r = (ReceiverList)it.next();
- r.writeToProto(proto, ActivityManagerServiceDumpBroadcastsProto.RECEIVER_LIST);
+ r.dumpDebug(proto, ActivityManagerServiceDumpBroadcastsProto.RECEIVER_LIST);
}
}
- mReceiverResolver.writeToProto(proto, ActivityManagerServiceDumpBroadcastsProto.RECEIVER_RESOLVER);
+ mReceiverResolver.dumpDebug(proto, ActivityManagerServiceDumpBroadcastsProto.RECEIVER_RESOLVER);
for (BroadcastQueue q : mBroadcastQueues) {
- q.writeToProto(proto, ActivityManagerServiceDumpBroadcastsProto.BROADCAST_QUEUE);
+ q.dumpDebug(proto, ActivityManagerServiceDumpBroadcastsProto.BROADCAST_QUEUE);
}
for (int user=0; user<mStickyBroadcasts.size(); user++) {
long token = proto.start(ActivityManagerServiceDumpBroadcastsProto.STICKY_BROADCASTS);
@@ -11593,7 +11593,7 @@
long actionToken = proto.start(StickyBroadcastProto.ACTIONS);
proto.write(StickyBroadcastProto.StickyAction.NAME, ent.getKey());
for (Intent intent : ent.getValue()) {
- intent.writeToProto(proto, StickyBroadcastProto.StickyAction.INTENTS,
+ intent.dumpDebug(proto, StickyBroadcastProto.StickyAction.INTENTS,
false, true, true, false);
}
proto.end(actionToken);
@@ -11603,7 +11603,7 @@
long handlerToken = proto.start(ActivityManagerServiceDumpBroadcastsProto.HANDLER);
proto.write(ActivityManagerServiceDumpBroadcastsProto.MainHandler.HANDLER, mHandler.toString());
- mHandler.getLooper().writeToProto(proto,
+ mHandler.getLooper().dumpDebug(proto,
ActivityManagerServiceDumpBroadcastsProto.MainHandler.LOOPER);
proto.end(handlerToken);
}
@@ -11945,18 +11945,18 @@
proto.write(ProcessOomProto.STATE,
ProcessList.makeProcStateProtoEnum(r.getCurProcState()));
proto.write(ProcessOomProto.TRIM_MEMORY_LEVEL, r.trimMemoryLevel);
- r.writeToProto(proto, ProcessOomProto.PROC);
+ r.dumpDebug(proto, ProcessOomProto.PROC);
proto.write(ProcessOomProto.ADJ_TYPE, r.adjType);
if (r.adjSource != null || r.adjTarget != null) {
if (r.adjTarget instanceof ComponentName) {
ComponentName cn = (ComponentName) r.adjTarget;
- cn.writeToProto(proto, ProcessOomProto.ADJ_TARGET_COMPONENT_NAME);
+ cn.dumpDebug(proto, ProcessOomProto.ADJ_TARGET_COMPONENT_NAME);
} else if (r.adjTarget != null) {
proto.write(ProcessOomProto.ADJ_TARGET_OBJECT, r.adjTarget.toString());
}
if (r.adjSource instanceof ProcessRecord) {
ProcessRecord p = (ProcessRecord) r.adjSource;
- p.writeToProto(proto, ProcessOomProto.ADJ_SOURCE_PROC);
+ p.dumpDebug(proto, ProcessOomProto.ADJ_SOURCE_PROC);
} else if (r.adjSource != null) {
proto.write(ProcessOomProto.ADJ_SOURCE_OBJECT, r.adjSource.toString());
}
diff --git a/services/core/java/com/android/server/am/AppBindRecord.java b/services/core/java/com/android/server/am/AppBindRecord.java
index 9870420..28756a4 100644
--- a/services/core/java/com/android/server/am/AppBindRecord.java
+++ b/services/core/java/com/android/server/am/AppBindRecord.java
@@ -62,7 +62,7 @@
+ " " + service.shortInstanceName + ":" + client.processName + "}";
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(AppBindRecordProto.SERVICE_NAME, service.shortInstanceName);
proto.write(AppBindRecordProto.CLIENT_PROC_NAME, client.processName);
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index 8095020..51e1718 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -106,7 +106,7 @@
mPackageWatchdog = watchdog;
}
- void writeToProto(ProtoOutputStream proto, long fieldId, String dumpPackage) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId, String dumpPackage) {
if (mProcessCrashTimes.getMap().isEmpty() && mBadProcesses.getMap().isEmpty()) {
return;
}
diff --git a/services/core/java/com/android/server/am/AppTimeTracker.java b/services/core/java/com/android/server/am/AppTimeTracker.java
index debe0a9..2da6a33 100644
--- a/services/core/java/com/android/server/am/AppTimeTracker.java
+++ b/services/core/java/com/android/server/am/AppTimeTracker.java
@@ -122,7 +122,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, boolean details) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, boolean details) {
final long token = proto.start(fieldId);
proto.write(AppTimeTrackerProto.RECEIVER, mReceiver.toString());
proto.write(AppTimeTrackerProto.TOTAL_DURATION_MS, mTotalTime);
diff --git a/services/core/java/com/android/server/am/BroadcastDispatcher.java b/services/core/java/com/android/server/am/BroadcastDispatcher.java
index f8a3d1e..8afd52e 100644
--- a/services/core/java/com/android/server/am/BroadcastDispatcher.java
+++ b/services/core/java/com/android/server/am/BroadcastDispatcher.java
@@ -73,9 +73,9 @@
return broadcasts.isEmpty();
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
for (BroadcastRecord br : broadcasts) {
- br.writeToProto(proto, fieldId);
+ br.dumpDebug(proto, fieldId);
}
}
@@ -415,18 +415,18 @@
/**
* Standard proto dump entry point
*/
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
if (mCurrentBroadcast != null) {
- mCurrentBroadcast.writeToProto(proto, fieldId);
+ mCurrentBroadcast.dumpDebug(proto, fieldId);
}
for (Deferrals d : mAlarmBroadcasts) {
- d.writeToProto(proto, fieldId);
+ d.dumpDebug(proto, fieldId);
}
for (BroadcastRecord br : mOrderedBroadcasts) {
- br.writeToProto(proto, fieldId);
+ br.dumpDebug(proto, fieldId);
}
for (Deferrals d : mDeferredBroadcasts) {
- d.writeToProto(proto, fieldId);
+ d.dumpDebug(proto, fieldId);
}
}
diff --git a/services/core/java/com/android/server/am/BroadcastFilter.java b/services/core/java/com/android/server/am/BroadcastFilter.java
index 34fca23..1ec8db0 100644
--- a/services/core/java/com/android/server/am/BroadcastFilter.java
+++ b/services/core/java/com/android/server/am/BroadcastFilter.java
@@ -46,9 +46,9 @@
visibleToInstantApp = _visibleToInstantApp;
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
- super.writeToProto(proto, BroadcastFilterProto.INTENT_FILTER);
+ super.dumpDebug(proto, BroadcastFilterProto.INTENT_FILTER);
if (requiredPermission != null) {
proto.write(BroadcastFilterProto.REQUIRED_PERMISSION, requiredPermission);
}
diff --git a/services/core/java/com/android/server/am/BroadcastQueue.java b/services/core/java/com/android/server/am/BroadcastQueue.java
index 1d03b36..10492a7 100644
--- a/services/core/java/com/android/server/am/BroadcastQueue.java
+++ b/services/core/java/com/android/server/am/BroadcastQueue.java
@@ -1915,17 +1915,17 @@
}
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(BroadcastQueueProto.QUEUE_NAME, mQueueName);
int N;
N = mParallelBroadcasts.size();
for (int i = N - 1; i >= 0; i--) {
- mParallelBroadcasts.get(i).writeToProto(proto, BroadcastQueueProto.PARALLEL_BROADCASTS);
+ mParallelBroadcasts.get(i).dumpDebug(proto, BroadcastQueueProto.PARALLEL_BROADCASTS);
}
- mDispatcher.writeToProto(proto, BroadcastQueueProto.ORDERED_BROADCASTS);
+ mDispatcher.dumpDebug(proto, BroadcastQueueProto.ORDERED_BROADCASTS);
if (mPendingBroadcast != null) {
- mPendingBroadcast.writeToProto(proto, BroadcastQueueProto.PENDING_BROADCAST);
+ mPendingBroadcast.dumpDebug(proto, BroadcastQueueProto.PENDING_BROADCAST);
}
int lastIndex = mHistoryNext;
@@ -1936,7 +1936,7 @@
ringIndex = ringAdvance(ringIndex, -1, MAX_BROADCAST_HISTORY);
BroadcastRecord r = mBroadcastHistory[ringIndex];
if (r != null) {
- r.writeToProto(proto, BroadcastQueueProto.HISTORICAL_BROADCASTS);
+ r.dumpDebug(proto, BroadcastQueueProto.HISTORICAL_BROADCASTS);
}
} while (ringIndex != lastIndex);
@@ -1948,7 +1948,7 @@
continue;
}
long summaryToken = proto.start(BroadcastQueueProto.HISTORICAL_BROADCASTS_SUMMARY);
- intent.writeToProto(proto, BroadcastQueueProto.BroadcastSummary.INTENT,
+ intent.dumpDebug(proto, BroadcastQueueProto.BroadcastSummary.INTENT,
false, true, true, false);
proto.write(BroadcastQueueProto.BroadcastSummary.ENQUEUE_CLOCK_TIME_MS,
mSummaryHistoryEnqueueTime[ringIndex]);
diff --git a/services/core/java/com/android/server/am/BroadcastRecord.java b/services/core/java/com/android/server/am/BroadcastRecord.java
index 1352504..f263886 100644
--- a/services/core/java/com/android/server/am/BroadcastRecord.java
+++ b/services/core/java/com/android/server/am/BroadcastRecord.java
@@ -417,7 +417,7 @@
+ " u" + userId + " " + intent.getAction() + "}";
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(BroadcastRecordProto.USER_ID, userId);
proto.write(BroadcastRecordProto.INTENT_ACTION, intent.getAction());
diff --git a/services/core/java/com/android/server/am/ConnectionRecord.java b/services/core/java/com/android/server/am/ConnectionRecord.java
index 4595084..6d9d3fb 100644
--- a/services/core/java/com/android/server/am/ConnectionRecord.java
+++ b/services/core/java/com/android/server/am/ConnectionRecord.java
@@ -232,7 +232,7 @@
return stringName = sb.toString();
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
if (binding == null) return; // if binding is null, don't write data, something is wrong.
long token = proto.start(fieldId);
proto.write(ConnectionRecordProto.HEX_HASH,
diff --git a/services/core/java/com/android/server/am/IntentBindRecord.java b/services/core/java/com/android/server/am/IntentBindRecord.java
index 90aef3e..e622013 100644
--- a/services/core/java/com/android/server/am/IntentBindRecord.java
+++ b/services/core/java/com/android/server/am/IntentBindRecord.java
@@ -108,10 +108,10 @@
return stringName = sb.toString();
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
if (intent != null) {
- intent.getIntent().writeToProto(proto,
+ intent.getIntent().dumpDebug(proto,
IntentBindRecordProto.INTENT, false, true, false, false);
}
if (binder != null) {
@@ -128,7 +128,7 @@
for (int i=0; i<N; i++) {
AppBindRecord a = apps.valueAt(i);
if (a != null) {
- a.writeToProto(proto, IntentBindRecordProto.APPS);
+ a.dumpDebug(proto, IntentBindRecordProto.APPS);
}
}
proto.end(token);
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index 5db6ff7..6f6f193 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -804,11 +804,11 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
- writeToProto(proto, fieldId, -1);
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
+ dumpDebug(proto, fieldId, -1);
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, int lruIndex) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, int lruIndex) {
long token = proto.start(fieldId);
proto.write(ProcessRecordProto.PID, pid);
proto.write(ProcessRecordProto.PROCESS_NAME, processName);
diff --git a/services/core/java/com/android/server/am/ProcessStatsService.java b/services/core/java/com/android/server/am/ProcessStatsService.java
index 5c840ad..3ada0c3 100644
--- a/services/core/java/com/android/server/am/ProcessStatsService.java
+++ b/services/core/java/com/android/server/am/ProcessStatsService.java
@@ -611,7 +611,7 @@
try {
FileOutputStream fout = new ParcelFileDescriptor.AutoCloseOutputStream(fds[1]);
final ProtoOutputStream proto = new ProtoOutputStream(fout);
- stats.writeToProto(proto, stats.mTimePeriodEndRealtime, section);
+ stats.dumpDebug(proto, stats.mTimePeriodEndRealtime, section);
proto.flush();
fout.close();
} catch (IOException e) {
@@ -1213,7 +1213,7 @@
return;
}
final long token = proto.start(fieldId);
- stats.writeToProto(proto, now, ProcessStats.REPORT_ALL);
+ stats.dumpDebug(proto, now, ProcessStats.REPORT_ALL);
proto.end(token);
}
@@ -1225,7 +1225,7 @@
synchronized (mAm) {
now = SystemClock.uptimeMillis();
final long token = proto.start(ProcessStatsServiceDumpProto.PROCSTATS_NOW);
- mProcessStats.writeToProto(proto, now, ProcessStats.REPORT_ALL);
+ mProcessStats.dumpDebug(proto, now, ProcessStats.REPORT_ALL);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/am/ReceiverList.java b/services/core/java/com/android/server/am/ReceiverList.java
index 5e31b2e..ff34fd3 100644
--- a/services/core/java/com/android/server/am/ReceiverList.java
+++ b/services/core/java/com/android/server/am/ReceiverList.java
@@ -80,20 +80,20 @@
return false;
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
- app.writeToProto(proto, ReceiverListProto.APP);
+ app.dumpDebug(proto, ReceiverListProto.APP);
proto.write(ReceiverListProto.PID, pid);
proto.write(ReceiverListProto.UID, uid);
proto.write(ReceiverListProto.USER, userId);
if (curBroadcast != null) {
- curBroadcast.writeToProto(proto, ReceiverListProto.CURRENT);
+ curBroadcast.dumpDebug(proto, ReceiverListProto.CURRENT);
}
proto.write(ReceiverListProto.LINKED_TO_DEATH, linkedToDeath);
final int N = size();
for (int i=0; i<N; i++) {
BroadcastFilter bf = get(i);
- bf.writeToProto(proto, ReceiverListProto.FILTERS);
+ bf.dumpDebug(proto, ReceiverListProto.FILTERS);
}
proto.write(ReceiverListProto.HEX_HASH, Integer.toHexString(System.identityHashCode(this)));
proto.end(token);
diff --git a/services/core/java/com/android/server/am/ServiceRecord.java b/services/core/java/com/android/server/am/ServiceRecord.java
index 5106b0e..ad316d5 100644
--- a/services/core/java/com/android/server/am/ServiceRecord.java
+++ b/services/core/java/com/android/server/am/ServiceRecord.java
@@ -177,7 +177,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, long now) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, long now) {
long token = proto.start(fieldId);
proto.write(ServiceRecordProto.StartItem.ID, id);
ProtoUtils.toDuration(proto,
@@ -185,14 +185,14 @@
proto.write(ServiceRecordProto.StartItem.DELIVERY_COUNT, deliveryCount);
proto.write(ServiceRecordProto.StartItem.DONE_EXECUTING_COUNT, doneExecutingCount);
if (intent != null) {
- intent.writeToProto(proto, ServiceRecordProto.StartItem.INTENT, true, true,
+ intent.dumpDebug(proto, ServiceRecordProto.StartItem.INTENT, true, true,
true, false);
}
if (neededGrants != null) {
- neededGrants.writeToProto(proto, ServiceRecordProto.StartItem.NEEDED_GRANTS);
+ neededGrants.dumpDebug(proto, ServiceRecordProto.StartItem.NEEDED_GRANTS);
}
if (uriPermissions != null) {
- uriPermissions.writeToProto(proto, ServiceRecordProto.StartItem.URI_PERMISSIONS);
+ uriPermissions.dumpDebug(proto, ServiceRecordProto.StartItem.URI_PERMISSIONS);
}
proto.end(token);
}
@@ -247,7 +247,7 @@
}
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(ServiceRecordProto.SHORT_NAME, this.shortInstanceName);
proto.write(ServiceRecordProto.IS_RUNNING, app != null);
@@ -255,7 +255,7 @@
proto.write(ServiceRecordProto.PID, app.pid);
}
if (intent != null) {
- intent.getIntent().writeToProto(proto, ServiceRecordProto.INTENT, false, true, false,
+ intent.getIntent().dumpDebug(proto, ServiceRecordProto.INTENT, false, true, false,
false);
}
proto.write(ServiceRecordProto.PACKAGE_NAME, packageName);
@@ -274,17 +274,17 @@
proto.end(appInfoToken);
}
if (app != null) {
- app.writeToProto(proto, ServiceRecordProto.APP);
+ app.dumpDebug(proto, ServiceRecordProto.APP);
}
if (isolatedProc != null) {
- isolatedProc.writeToProto(proto, ServiceRecordProto.ISOLATED_PROC);
+ isolatedProc.dumpDebug(proto, ServiceRecordProto.ISOLATED_PROC);
}
proto.write(ServiceRecordProto.WHITELIST_MANAGER, whitelistManager);
proto.write(ServiceRecordProto.DELAYED, delayed);
if (isForeground || foregroundId != 0) {
long fgToken = proto.start(ServiceRecordProto.FOREGROUND);
proto.write(ServiceRecordProto.Foreground.ID, foregroundId);
- foregroundNoti.writeToProto(proto, ServiceRecordProto.Foreground.NOTIFICATION);
+ foregroundNoti.dumpDebug(proto, ServiceRecordProto.Foreground.NOTIFICATION);
proto.end(fgToken);
}
ProtoUtils.toDuration(proto, ServiceRecordProto.CREATE_REAL_TIME, createRealTime, nowReal);
@@ -327,21 +327,21 @@
if (deliveredStarts.size() > 0) {
final int N = deliveredStarts.size();
for (int i = 0; i < N; i++) {
- deliveredStarts.get(i).writeToProto(proto,
+ deliveredStarts.get(i).dumpDebug(proto,
ServiceRecordProto.DELIVERED_STARTS, now);
}
}
if (pendingStarts.size() > 0) {
final int N = pendingStarts.size();
for (int i = 0; i < N; i++) {
- pendingStarts.get(i).writeToProto(proto, ServiceRecordProto.PENDING_STARTS, now);
+ pendingStarts.get(i).dumpDebug(proto, ServiceRecordProto.PENDING_STARTS, now);
}
}
if (bindings.size() > 0) {
final int N = bindings.size();
for (int i=0; i<N; i++) {
IntentBindRecord b = bindings.valueAt(i);
- b.writeToProto(proto, ServiceRecordProto.BINDINGS);
+ b.dumpDebug(proto, ServiceRecordProto.BINDINGS);
}
}
if (connections.size() > 0) {
@@ -349,7 +349,7 @@
for (int conni=0; conni<N; conni++) {
ArrayList<ConnectionRecord> c = connections.valueAt(conni);
for (int i=0; i<c.size(); i++) {
- c.get(i).writeToProto(proto, ServiceRecordProto.CONNECTIONS);
+ c.get(i).dumpDebug(proto, ServiceRecordProto.CONNECTIONS);
}
}
}
diff --git a/services/core/java/com/android/server/am/UidRecord.java b/services/core/java/com/android/server/am/UidRecord.java
index e6cf287..acf8b2e 100644
--- a/services/core/java/com/android/server/am/UidRecord.java
+++ b/services/core/java/com/android/server/am/UidRecord.java
@@ -156,7 +156,7 @@
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(UidRecordProto.UID, uid);
proto.write(UidRecordProto.CURRENT, ProcessList.makeProcStateProtoEnum(mCurProcState));
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 53ac4ec..728291d 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -2100,14 +2100,14 @@
}
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
synchronized (mLock) {
long token = proto.start(fieldId);
for (int i = 0; i < mStartedUsers.size(); i++) {
UserState uss = mStartedUsers.valueAt(i);
final long uToken = proto.start(UserControllerProto.STARTED_USERS);
proto.write(UserControllerProto.User.ID, uss.mHandle.getIdentifier());
- uss.writeToProto(proto, UserControllerProto.User.STATE);
+ uss.dumpDebug(proto, UserControllerProto.User.STATE);
proto.end(uToken);
}
for (int i = 0; i < mStartedUserArray.length; i++) {
diff --git a/services/core/java/com/android/server/am/UserState.java b/services/core/java/com/android/server/am/UserState.java
index f51b3c6..1fe7608 100644
--- a/services/core/java/com/android/server/am/UserState.java
+++ b/services/core/java/com/android/server/am/UserState.java
@@ -139,7 +139,7 @@
pw.println();
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(UserStateProto.STATE, stateToProtoEnum(state));
proto.write(UserStateProto.SWITCHING, switching);
diff --git a/services/core/java/com/android/server/net/NetworkIdentitySet.java b/services/core/java/com/android/server/net/NetworkIdentitySet.java
index 68cd5e7..2326ad3 100644
--- a/services/core/java/com/android/server/net/NetworkIdentitySet.java
+++ b/services/core/java/com/android/server/net/NetworkIdentitySet.java
@@ -170,11 +170,11 @@
return ident.compareTo(anotherIdent);
}
- public void writeToProto(ProtoOutputStream proto, long tag) {
+ public void dumpDebug(ProtoOutputStream proto, long tag) {
final long start = proto.start(tag);
for (NetworkIdentity ident : this) {
- ident.writeToProto(proto, NetworkIdentitySetProto.IDENTITIES);
+ ident.dumpDebug(proto, NetworkIdentitySetProto.IDENTITIES);
}
proto.end(start);
diff --git a/services/core/java/com/android/server/net/NetworkStatsCollection.java b/services/core/java/com/android/server/net/NetworkStatsCollection.java
index ab52523..05ab2ae 100644
--- a/services/core/java/com/android/server/net/NetworkStatsCollection.java
+++ b/services/core/java/com/android/server/net/NetworkStatsCollection.java
@@ -687,7 +687,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long tag) {
+ public void dumpDebug(ProtoOutputStream proto, long tag) {
final long start = proto.start(tag);
for (Key key : getSortedKeys()) {
@@ -695,7 +695,7 @@
// Key
final long startKey = proto.start(NetworkStatsCollectionStatsProto.KEY);
- key.ident.writeToProto(proto, NetworkStatsCollectionKeyProto.IDENTITY);
+ key.ident.dumpDebug(proto, NetworkStatsCollectionKeyProto.IDENTITY);
proto.write(NetworkStatsCollectionKeyProto.UID, key.uid);
proto.write(NetworkStatsCollectionKeyProto.SET, key.set);
proto.write(NetworkStatsCollectionKeyProto.TAG, key.tag);
@@ -703,7 +703,7 @@
// Value
final NetworkStatsHistory history = mStats.get(key);
- history.writeToProto(proto, NetworkStatsCollectionStatsProto.HISTORY);
+ history.dumpDebug(proto, NetworkStatsCollectionStatsProto.HISTORY);
proto.end(startStats);
}
diff --git a/services/core/java/com/android/server/net/NetworkStatsRecorder.java b/services/core/java/com/android/server/net/NetworkStatsRecorder.java
index 06ec341..6af962b 100644
--- a/services/core/java/com/android/server/net/NetworkStatsRecorder.java
+++ b/services/core/java/com/android/server/net/NetworkStatsRecorder.java
@@ -470,12 +470,12 @@
}
}
- public void writeToProtoLocked(ProtoOutputStream proto, long tag) {
+ public void dumpDebugLocked(ProtoOutputStream proto, long tag) {
final long start = proto.start(tag);
if (mPending != null) {
proto.write(NetworkStatsRecorderProto.PENDING_TOTAL_BYTES, mPending.getTotalBytes());
}
- getOrLoadCompleteLocked().writeToProto(proto, NetworkStatsRecorderProto.COMPLETE_HISTORY);
+ getOrLoadCompleteLocked().dumpDebug(proto, NetworkStatsRecorderProto.COMPLETE_HISTORY);
proto.end(start);
}
diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java
index 16424f2..673e830 100644
--- a/services/core/java/com/android/server/net/NetworkStatsService.java
+++ b/services/core/java/com/android/server/net/NetworkStatsService.java
@@ -1609,10 +1609,10 @@
dumpInterfaces(proto, NetworkStatsServiceDumpProto.ACTIVE_INTERFACES, mActiveIfaces);
dumpInterfaces(proto, NetworkStatsServiceDumpProto.ACTIVE_UID_INTERFACES, mActiveUidIfaces);
- mDevRecorder.writeToProtoLocked(proto, NetworkStatsServiceDumpProto.DEV_STATS);
- mXtRecorder.writeToProtoLocked(proto, NetworkStatsServiceDumpProto.XT_STATS);
- mUidRecorder.writeToProtoLocked(proto, NetworkStatsServiceDumpProto.UID_STATS);
- mUidTagRecorder.writeToProtoLocked(proto, NetworkStatsServiceDumpProto.UID_TAG_STATS);
+ mDevRecorder.dumpDebugLocked(proto, NetworkStatsServiceDumpProto.DEV_STATS);
+ mXtRecorder.dumpDebugLocked(proto, NetworkStatsServiceDumpProto.XT_STATS);
+ mUidRecorder.dumpDebugLocked(proto, NetworkStatsServiceDumpProto.UID_STATS);
+ mUidTagRecorder.dumpDebugLocked(proto, NetworkStatsServiceDumpProto.UID_TAG_STATS);
proto.flush();
}
@@ -1623,7 +1623,7 @@
final long start = proto.start(tag);
proto.write(NetworkInterfaceProto.INTERFACE, ifaces.keyAt(i));
- ifaces.valueAt(i).writeToProto(proto, NetworkInterfaceProto.IDENTITIES);
+ ifaces.valueAt(i).dumpDebug(proto, NetworkInterfaceProto.IDENTITIES);
proto.end(start);
}
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index 8560ae6..45df368 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -379,18 +379,18 @@
for (ComponentName cmpt : mEnabledServicesForCurrentProfiles) {
if (filter != null && !filter.matches(cmpt)) continue;
- cmpt.writeToProto(proto, ManagedServicesProto.ENABLED);
+ cmpt.dumpDebug(proto, ManagedServicesProto.ENABLED);
}
synchronized (mMutex) {
for (ManagedServiceInfo info : mServices) {
if (filter != null && !filter.matches(info.component)) continue;
- info.writeToProto(proto, ManagedServicesProto.LIVE_SERVICES, this);
+ info.dumpDebug(proto, ManagedServicesProto.LIVE_SERVICES, this);
}
}
for (ComponentName name : mSnoozingForCurrentProfiles) {
- name.writeToProto(proto, ManagedServicesProto.SNOOZED);
+ name.dumpDebug(proto, ManagedServicesProto.SNOOZED);
}
}
@@ -1497,9 +1497,9 @@
.append(']').toString();
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, ManagedServices host) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, ManagedServices host) {
final long token = proto.start(fieldId);
- component.writeToProto(proto, ManagedServiceInfoProto.COMPONENT);
+ component.dumpDebug(proto, ManagedServiceInfoProto.COMPONENT);
proto.write(ManagedServiceInfoProto.USER_ID, userid);
proto.write(ManagedServiceInfoProto.SERVICE, service.getClass().getName());
proto.write(ManagedServiceInfoProto.IS_SYSTEM, isSystem);
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 293fd40..d0ad47d 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -4802,7 +4802,7 @@
long zenLog = proto.start(NotificationServiceDumpProto.ZEN);
mZenModeHelper.dump(proto);
for (ComponentName suppressor : mEffectsSuppressors) {
- suppressor.writeToProto(proto, ZenModeProto.SUPPRESSORS);
+ suppressor.dumpDebug(proto, ZenModeProto.SUPPRESSORS);
}
proto.end(zenLog);
@@ -4822,7 +4822,7 @@
mListenersDisablingEffects.valueAt(i);
for (int j = 0; j < listeners.size(); j++) {
final ComponentName componentName = listeners.valueAt(j);
- componentName.writeToProto(proto,
+ componentName.dumpDebug(proto,
ListenersDisablingEffectsProto.LISTENER_COMPONENTS);
}
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index a126073..b57bfa0 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -434,7 +434,7 @@
proto.write(NotificationRecordProto.SOUND, getSound().toString());
}
if (getAudioAttributes() != null) {
- getAudioAttributes().writeToProto(proto, NotificationRecordProto.AUDIO_ATTRIBUTES);
+ getAudioAttributes().dumpDebug(proto, NotificationRecordProto.AUDIO_ATTRIBUTES);
}
proto.write(NotificationRecordProto.PACKAGE, sbn.getPackageName());
proto.write(NotificationRecordProto.DELEGATE_PACKAGE, sbn.getOpPkg());
diff --git a/services/core/java/com/android/server/notification/PreferencesHelper.java b/services/core/java/com/android/server/notification/PreferencesHelper.java
index cbbf2a0..b1ffa8c 100644
--- a/services/core/java/com/android/server/notification/PreferencesHelper.java
+++ b/services/core/java/com/android/server/notification/PreferencesHelper.java
@@ -1564,10 +1564,10 @@
proto.write(RankingHelperProto.RecordProto.SHOW_BADGE, r.showBadge);
for (NotificationChannel channel : r.channels.values()) {
- channel.writeToProto(proto, RankingHelperProto.RecordProto.CHANNELS);
+ channel.dumpDebug(proto, RankingHelperProto.RecordProto.CHANNELS);
}
for (NotificationChannelGroup group : r.groups.values()) {
- group.writeToProto(proto, RankingHelperProto.RecordProto.CHANNEL_GROUPS);
+ group.dumpDebug(proto, RankingHelperProto.RecordProto.CHANNEL_GROUPS);
}
proto.end(fToken);
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 6510923..696d2ea 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -627,15 +627,15 @@
proto.write(ZenModeProto.ZEN_MODE, mZenMode);
synchronized (mConfig) {
if (mConfig.manualRule != null) {
- mConfig.manualRule.writeToProto(proto, ZenModeProto.ENABLED_ACTIVE_CONDITIONS);
+ mConfig.manualRule.dumpDebug(proto, ZenModeProto.ENABLED_ACTIVE_CONDITIONS);
}
for (ZenRule rule : mConfig.automaticRules.values()) {
if (rule.enabled && rule.condition.state == Condition.STATE_TRUE
&& !rule.snoozing) {
- rule.writeToProto(proto, ZenModeProto.ENABLED_ACTIVE_CONDITIONS);
+ rule.dumpDebug(proto, ZenModeProto.ENABLED_ACTIVE_CONDITIONS);
}
}
- mConfig.toNotificationPolicy().writeToProto(proto, ZenModeProto.POLICY);
+ mConfig.toNotificationPolicy().dumpDebug(proto, ZenModeProto.POLICY);
proto.write(ZenModeProto.SUPPRESSED_EFFECTS, mSuppressedEffects);
}
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index c5e7942..3d4247e7 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -21127,7 +21127,7 @@
synchronized (mAvailableFeatures) {
final int count = mAvailableFeatures.size();
for (int i = 0; i < count; i++) {
- mAvailableFeatures.valueAt(i).writeToProto(proto, PackageServiceDumpProto.FEATURES);
+ mAvailableFeatures.valueAt(i).dumpDebug(proto, PackageServiceDumpProto.FEATURES);
}
}
}
diff --git a/services/core/java/com/android/server/pm/PackageSetting.java b/services/core/java/com/android/server/pm/PackageSetting.java
index 1254891..d38dd93 100644
--- a/services/core/java/com/android/server/pm/PackageSetting.java
+++ b/services/core/java/com/android/server/pm/PackageSetting.java
@@ -180,7 +180,7 @@
return childPackageNames != null && !childPackageNames.isEmpty();
}
- public void writeToProto(ProtoOutputStream proto, long fieldId, List<UserInfo> users) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId, List<UserInfo> users) {
final long packageToken = proto.start(fieldId);
proto.write(PackageProto.NAME, (realName != null ? realName : name));
proto.write(PackageProto.UID, appId);
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 6e67687..1082eaa 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -4934,7 +4934,7 @@
final int count = mPackages.size();
for (int i = 0; i < count; i++) {
final PackageSetting ps = mPackages.valueAt(i);
- ps.writeToProto(proto, PackageServiceDumpProto.PACKAGES, users);
+ ps.dumpDebug(proto, PackageServiceDumpProto.PACKAGES, users);
}
}
@@ -5010,7 +5010,7 @@
void dumpSharedUsersProto(ProtoOutputStream proto) {
final int count = mSharedUsers.size();
for (int i = 0; i < count; i++) {
- mSharedUsers.valueAt(i).writeToProto(proto, PackageServiceDumpProto.SHARED_USERS);
+ mSharedUsers.valueAt(i).dumpDebug(proto, PackageServiceDumpProto.SHARED_USERS);
}
}
diff --git a/services/core/java/com/android/server/pm/SharedUserSetting.java b/services/core/java/com/android/server/pm/SharedUserSetting.java
index 2ee07a2..6480518 100644
--- a/services/core/java/com/android/server/pm/SharedUserSetting.java
+++ b/services/core/java/com/android/server/pm/SharedUserSetting.java
@@ -65,7 +65,7 @@
+ name + "/" + userId + "}";
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(PackageServiceDumpProto.SharedUserProto.UID, userId);
proto.write(PackageServiceDumpProto.SharedUserProto.NAME, name);
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 3e528f4..8435a82 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -5432,7 +5432,7 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(ROTATION_MODE, mDefaultDisplayRotation.getUserRotationMode());
proto.write(ROTATION, mDefaultDisplayRotation.getUserRotation());
@@ -5445,7 +5445,7 @@
proto.write(KEYGUARD_OCCLUDED_CHANGED, mKeyguardOccludedChanged);
proto.write(KEYGUARD_OCCLUDED_PENDING, mPendingKeyguardOccluded);
if (mKeyguardDelegate != null) {
- mKeyguardDelegate.writeToProto(proto, KEYGUARD_DELEGATE);
+ mKeyguardDelegate.dumpDebug(proto, KEYGUARD_DELEGATE);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
index 1f37faf..95a5f52 100644
--- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java
+++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
@@ -1404,7 +1404,7 @@
*
* @param proto The protocol buffer output stream to write to.
*/
- void writeToProto(ProtoOutputStream proto, long fieldId);
+ void dumpDebug(ProtoOutputStream proto, long fieldId);
/**
* Returns whether a given window type is considered a top level one.
diff --git a/services/core/java/com/android/server/policy/WindowOrientationListener.java b/services/core/java/com/android/server/policy/WindowOrientationListener.java
index 47370b6..0157706 100644
--- a/services/core/java/com/android/server/policy/WindowOrientationListener.java
+++ b/services/core/java/com/android/server/policy/WindowOrientationListener.java
@@ -259,7 +259,7 @@
*/
public abstract void onProposedRotationChanged(int rotation);
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
synchronized (mLock) {
proto.write(ENABLED, mEnabled);
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
index c408549..9b67efe 100644
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
@@ -413,7 +413,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(SHOWING, mKeyguardState.showing);
proto.write(OCCLUDED, mKeyguardState.occluded);
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 14617d3..93d50b8 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -4087,20 +4087,20 @@
mBatterySaverStateMachine.dumpProto(proto,
PowerManagerServiceDumpProto.BATTERY_SAVER_STATE_MACHINE);
- mHandler.getLooper().writeToProto(proto, PowerManagerServiceDumpProto.LOOPER);
+ mHandler.getLooper().dumpDebug(proto, PowerManagerServiceDumpProto.LOOPER);
for (WakeLock wl : mWakeLocks) {
- wl.writeToProto(proto, PowerManagerServiceDumpProto.WAKE_LOCKS);
+ wl.dumpDebug(proto, PowerManagerServiceDumpProto.WAKE_LOCKS);
}
for (SuspendBlocker sb : mSuspendBlockers) {
- sb.writeToProto(proto, PowerManagerServiceDumpProto.SUSPEND_BLOCKERS);
+ sb.dumpDebug(proto, PowerManagerServiceDumpProto.SUSPEND_BLOCKERS);
}
wcd = mWirelessChargerDetector;
}
if (wcd != null) {
- wcd.writeToProto(proto, PowerManagerServiceDumpProto.WIRELESS_CHARGER_DETECTOR);
+ wcd.dumpDebug(proto, PowerManagerServiceDumpProto.WIRELESS_CHARGER_DETECTOR);
}
proto.flush();
}
@@ -4331,7 +4331,7 @@
return sb.toString();
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long wakeLockToken = proto.start(fieldId);
proto.write(WakeLockProto.LOCK_LEVEL, (mFlags & PowerManager.WAKE_LOCK_LEVEL_MASK));
proto.write(WakeLockProto.TAG, mTag);
@@ -4352,7 +4352,7 @@
proto.write(WakeLockProto.PID, mOwnerPid);
if (mWorkSource != null) {
- mWorkSource.writeToProto(proto, WakeLockProto.WORK_SOURCE);
+ mWorkSource.dumpDebug(proto, WakeLockProto.WORK_SOURCE);
}
proto.end(wakeLockToken);
}
@@ -4455,7 +4455,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long sbToken = proto.start(fieldId);
synchronized (this) {
proto.write(SuspendBlockerProto.NAME, mName);
diff --git a/services/core/java/com/android/server/power/SuspendBlocker.java b/services/core/java/com/android/server/power/SuspendBlocker.java
index 30b35f0..565263f 100644
--- a/services/core/java/com/android/server/power/SuspendBlocker.java
+++ b/services/core/java/com/android/server/power/SuspendBlocker.java
@@ -43,5 +43,5 @@
*/
void release();
- void writeToProto(ProtoOutputStream proto, long fieldId);
+ void dumpDebug(ProtoOutputStream proto, long fieldId);
}
diff --git a/services/core/java/com/android/server/power/WirelessChargerDetector.java b/services/core/java/com/android/server/power/WirelessChargerDetector.java
index e8e9c67..0d910e4 100644
--- a/services/core/java/com/android/server/power/WirelessChargerDetector.java
+++ b/services/core/java/com/android/server/power/WirelessChargerDetector.java
@@ -170,7 +170,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long wcdToken = proto.start(fieldId);
synchronized (mLock) {
proto.write(WirelessChargerDetectorProto.IS_POWERED_WIRELESSLY, mPoweredWirelessly);
diff --git a/services/core/java/com/android/server/uri/GrantUri.java b/services/core/java/com/android/server/uri/GrantUri.java
index c694264..1571575 100644
--- a/services/core/java/com/android/server/uri/GrantUri.java
+++ b/services/core/java/com/android/server/uri/GrantUri.java
@@ -67,7 +67,7 @@
return result;
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(GrantUriProto.URI, uri.toString());
proto.write(GrantUriProto.SOURCE_USER_ID, sourceUserId);
diff --git a/services/core/java/com/android/server/uri/NeededUriGrants.java b/services/core/java/com/android/server/uri/NeededUriGrants.java
index 87a2641..0120394 100644
--- a/services/core/java/com/android/server/uri/NeededUriGrants.java
+++ b/services/core/java/com/android/server/uri/NeededUriGrants.java
@@ -34,7 +34,7 @@
this.flags = flags;
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(NeededUriGrantsProto.TARGET_PACKAGE, targetPkg);
proto.write(NeededUriGrantsProto.TARGET_UID, targetUid);
@@ -42,7 +42,7 @@
final int N = this.size();
for (int i = 0; i < N; i++) {
- this.get(i).writeToProto(proto, NeededUriGrantsProto.GRANTS);
+ this.get(i).dumpDebug(proto, NeededUriGrantsProto.GRANTS);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/uri/UriPermissionOwner.java b/services/core/java/com/android/server/uri/UriPermissionOwner.java
index f814dc6..f2c06cd 100644
--- a/services/core/java/com/android/server/uri/UriPermissionOwner.java
+++ b/services/core/java/com/android/server/uri/UriPermissionOwner.java
@@ -141,20 +141,20 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
proto.write(UriPermissionOwnerProto.OWNER, mOwner.toString());
if (mReadPerms != null) {
synchronized (mReadPerms) {
for (UriPermission p : mReadPerms) {
- p.uri.writeToProto(proto, UriPermissionOwnerProto.READ_PERMS);
+ p.uri.dumpDebug(proto, UriPermissionOwnerProto.READ_PERMS);
}
}
}
if (mWritePerms != null) {
synchronized (mWritePerms) {
for (UriPermission p : mWritePerms) {
- p.uri.writeToProto(proto, UriPermissionOwnerProto.WRITE_PERMS);
+ p.uri.dumpDebug(proto, UriPermissionOwnerProto.WRITE_PERMS);
}
}
}
diff --git a/services/core/java/com/android/server/wm/ActivityDisplay.java b/services/core/java/com/android/server/wm/ActivityDisplay.java
index 9599bad..84152e8 100644
--- a/services/core/java/com/android/server/wm/ActivityDisplay.java
+++ b/services/core/java/com/android/server/wm/ActivityDisplay.java
@@ -1364,10 +1364,10 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
final long token = proto.start(fieldId);
- writeToProtoInner(proto, DISPLAY, logLevel);
+ dumpDebugInner(proto, DISPLAY, logLevel);
proto.write(ID, mDisplayId);
proto.write(SINGLE_TASK_INSTANCE, mSingleTaskInstance);
final ActivityStack focusedStack = getFocusedStack();
@@ -1382,7 +1382,7 @@
}
for (int stackNdx = getStackCount() - 1; stackNdx >= 0; --stackNdx) {
final ActivityStack stack = getStackAt(stackNdx);
- stack.writeToProto(proto, STACKS, logLevel);
+ stack.dumpDebug(proto, STACKS, logLevel);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
index de51d4b..20d1d1c 100644
--- a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
@@ -1182,7 +1182,7 @@
final ProtoOutputStream protoOutputStream =
new ProtoOutputStream(LAUNCH_OBSERVER_ACTIVITY_RECORD_PROTO_CHUNK_SIZE);
// Write this data out as the top-most ActivityRecordProto (i.e. it is not a sub-object).
- record.writeToProto(protoOutputStream);
+ record.dumpDebug(protoOutputStream);
final byte[] bytes = protoOutputStream.getBytes();
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 5377db4..5d79605 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -7313,8 +7313,8 @@
* Write all fields to an {@code ActivityRecordProto}. This assumes the
* {@code ActivityRecordProto} is the outer-most proto data.
*/
- void writeToProto(ProtoOutputStream proto) {
- writeToProto(proto, APP_WINDOW_TOKEN, WindowTraceLogLevel.ALL);
+ void dumpDebug(ProtoOutputStream proto) {
+ dumpDebug(proto, APP_WINDOW_TOKEN, WindowTraceLogLevel.ALL);
writeIdentifierToProto(proto, IDENTIFIER);
proto.write(STATE, mState.toString());
proto.write(VISIBLE_REQUESTED, mVisibleRequested);
@@ -7326,9 +7326,9 @@
proto.write(VISIBLE, mVisible);
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- writeToProto(proto);
+ dumpDebug(proto);
proto.end(token);
}
@@ -7336,7 +7336,7 @@
* Copied from old AppWindowToken.
*/
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
// Critical log level logs only visible elements to mitigate performance overheard
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible()) {
@@ -7345,12 +7345,12 @@
final long token = proto.start(fieldId);
writeNameToProto(proto, NAME);
- super.writeToProto(proto, WINDOW_TOKEN, logLevel);
+ super.dumpDebug(proto, WINDOW_TOKEN, logLevel);
proto.write(LAST_SURFACE_SHOWING, mLastSurfaceShowing);
proto.write(IS_WAITING_FOR_TRANSITION_START, isWaitingForTransitionStart());
proto.write(IS_ANIMATING, isAnimating());
if (mThumbnail != null){
- mThumbnail.writeToProto(proto, THUMBNAIL);
+ mThumbnail.dumpDebug(proto, THUMBNAIL);
}
proto.write(FILLS_PARENT, mOccludesParent);
proto.write(APP_STOPPED, mAppStopped);
@@ -7371,7 +7371,7 @@
proto.write(VISIBLE_SET_FROM_TRANSFERRED_STARTING_WINDOW,
mVisibleSetFromTransferredStartingWindow);
for (Rect bounds : mFrozenBounds) {
- bounds.writeToProto(proto, FROZEN_BOUNDS);
+ bounds.dumpDebug(proto, FROZEN_BOUNDS);
}
proto.write(com.android.server.wm.AppWindowTokenProto.VISIBLE, mVisible);
proto.end(token);
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java
index 918d40b..cc45671 100644
--- a/services/core/java/com/android/server/wm/ActivityStack.java
+++ b/services/core/java/com/android/server/wm/ActivityStack.java
@@ -5639,14 +5639,14 @@
return shouldSleepActivities() || mService.mShuttingDown;
}
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
final long token = proto.start(fieldId);
- writeToProtoInnerStackOnly(proto, STACK, logLevel);
+ dumpDebugInnerStackOnly(proto, STACK, logLevel);
proto.write(com.android.server.am.ActivityStackProto.ID, mStackId);
for (int taskNdx = getChildCount() - 1; taskNdx >= 0; --taskNdx) {
final Task task = getChildAt(taskNdx);
- task.writeToProto(proto, com.android.server.am.ActivityStackProto.TASKS, logLevel);
+ task.dumpDebug(proto, com.android.server.am.ActivityStackProto.TASKS, logLevel);
}
if (mResumedActivity != null) {
mResumedActivity.writeIdentifierToProto(proto, RESUMED_ACTIVITY);
@@ -5654,7 +5654,7 @@
proto.write(DISPLAY_ID, mDisplayId);
if (!matchParentBounds()) {
final Rect bounds = getRequestedOverrideBounds();
- bounds.writeToProto(proto, com.android.server.am.ActivityStackProto.BOUNDS);
+ bounds.dumpDebug(proto, com.android.server.am.ActivityStackProto.BOUNDS);
}
// TODO: Remove, no longer needed with windowingMode.
@@ -5663,26 +5663,26 @@
}
// TODO(proto-merge): Remove once protos for ActivityStack and TaskStack are merged.
- void writeToProtoInnerStackOnly(ProtoOutputStream proto, long fieldId,
+ void dumpDebugInnerStackOnly(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible()) {
return;
}
final long token = proto.start(fieldId);
- super.writeToProto(proto, WINDOW_CONTAINER, logLevel);
+ super.dumpDebug(proto, WINDOW_CONTAINER, logLevel);
proto.write(StackProto.ID, mStackId);
for (int taskNdx = mChildren.size() - 1; taskNdx >= 0; taskNdx--) {
- mChildren.get(taskNdx).writeToProtoInnerTaskOnly(proto, StackProto.TASKS, logLevel);
+ mChildren.get(taskNdx).dumpDebugInnerTaskOnly(proto, StackProto.TASKS, logLevel);
}
proto.write(FILLS_PARENT, matchParentBounds());
- getRawBounds().writeToProto(proto, StackProto.BOUNDS);
+ getRawBounds().dumpDebug(proto, StackProto.BOUNDS);
proto.write(DEFER_REMOVAL, mDeferRemoval);
proto.write(MINIMIZE_AMOUNT, mMinimizeAmount);
proto.write(ADJUSTED_FOR_IME, mAdjustedForIme);
proto.write(ADJUST_IME_AMOUNT, mAdjustImeAmount);
proto.write(ADJUST_DIVIDER_AMOUNT, mAdjustDividerAmount);
- mAdjustedBounds.writeToProto(proto, ADJUSTED_BOUNDS);
+ mAdjustedBounds.dumpDebug(proto, ADJUSTED_BOUNDS);
proto.write(ANIMATING_BOUNDS, mBoundsAnimating);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/ActivityStartController.java b/services/core/java/com/android/server/wm/ActivityStartController.java
index d3fd450..695f58c 100644
--- a/services/core/java/com/android/server/wm/ActivityStartController.java
+++ b/services/core/java/com/android/server/wm/ActivityStartController.java
@@ -546,7 +546,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
for (PendingActivityLaunch activity: mPendingActivityLaunches) {
activity.r.writeIdentifierToProto(proto, fieldId);
}
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index d097368..efd21ec 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -6917,7 +6917,7 @@
synchronized (mGlobalLock) {
// The output proto of "activity --proto activities"
// is ActivityManagerServiceDumpActivitiesProto
- mRootActivityContainer.writeToProto(proto,
+ mRootActivityContainer.dumpDebug(proto,
ActivityManagerServiceDumpActivitiesProto.ACTIVITY_STACK_SUPERVISOR,
WindowTraceLogLevel.ALL);
}
@@ -7098,7 +7098,7 @@
int wakeFullness, boolean testPssMode) {
synchronized (mGlobalLock) {
if (dumpPackage == null) {
- getGlobalConfiguration().writeToProto(proto, GLOBAL_CONFIGURATION);
+ getGlobalConfiguration().dumpDebug(proto, GLOBAL_CONFIGURATION);
proto.write(CONFIG_WILL_CHANGE, getTopDisplayFocusedStack().mConfigWillChange);
writeSleepStateToProto(proto, wakeFullness, testPssMode);
if (mRunningVoice != null) {
@@ -7106,11 +7106,11 @@
ActivityManagerServiceDumpProcessesProto.RUNNING_VOICE);
proto.write(ActivityManagerServiceDumpProcessesProto.Voice.SESSION,
mRunningVoice.toString());
- mVoiceWakeLock.writeToProto(
+ mVoiceWakeLock.dumpDebug(
proto, ActivityManagerServiceDumpProcessesProto.Voice.WAKELOCK);
proto.end(vrToken);
}
- mVrController.writeToProto(proto,
+ mVrController.dumpDebug(proto,
ActivityManagerServiceDumpProcessesProto.VR_CONTROLLER);
if (mController != null) {
final long token = proto.start(CONTROLLER);
@@ -7118,25 +7118,25 @@
proto.write(IS_A_MONKEY, mControllerIsAMonkey);
proto.end(token);
}
- mStackSupervisor.mGoingToSleepWakeLock.writeToProto(proto, GOING_TO_SLEEP);
- mStackSupervisor.mLaunchingActivityWakeLock.writeToProto(proto,
+ mStackSupervisor.mGoingToSleepWakeLock.dumpDebug(proto, GOING_TO_SLEEP);
+ mStackSupervisor.mLaunchingActivityWakeLock.dumpDebug(proto,
LAUNCHING_ACTIVITY);
}
if (mHomeProcess != null && (dumpPackage == null
|| mHomeProcess.mPkgList.contains(dumpPackage))) {
- mHomeProcess.writeToProto(proto, HOME_PROC);
+ mHomeProcess.dumpDebug(proto, HOME_PROC);
}
if (mPreviousProcess != null && (dumpPackage == null
|| mPreviousProcess.mPkgList.contains(dumpPackage))) {
- mPreviousProcess.writeToProto(proto, PREVIOUS_PROC);
+ mPreviousProcess.dumpDebug(proto, PREVIOUS_PROC);
proto.write(PREVIOUS_PROC_VISIBLE_TIME_MS, mPreviousProcessVisibleTime);
}
if (mHeavyWeightProcess != null && (dumpPackage == null
|| mHeavyWeightProcess.mPkgList.contains(dumpPackage))) {
- mHeavyWeightProcess.writeToProto(proto, HEAVY_WEIGHT_PROC);
+ mHeavyWeightProcess.dumpDebug(proto, HEAVY_WEIGHT_PROC);
}
for (Map.Entry<String, Integer> entry
@@ -7152,7 +7152,7 @@
}
if (mCurAppTimeTracker != null) {
- mCurAppTimeTracker.writeToProto(proto, CURRENT_TRACKER, true);
+ mCurAppTimeTracker.dumpDebug(proto, CURRENT_TRACKER, true);
}
}
diff --git a/services/core/java/com/android/server/wm/AnimationAdapter.java b/services/core/java/com/android/server/wm/AnimationAdapter.java
index 278a9ba..1be3d61 100644
--- a/services/core/java/com/android/server/wm/AnimationAdapter.java
+++ b/services/core/java/com/android/server/wm/AnimationAdapter.java
@@ -76,11 +76,11 @@
void dump(PrintWriter pw, String prefix);
- default void writeToProto(ProtoOutputStream proto, long fieldId) {
+ default void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- writeToProto(proto);
+ dumpDebug(proto);
proto.end(token);
}
- void writeToProto(ProtoOutputStream proto);
+ void dumpDebug(ProtoOutputStream proto);
}
diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java
index cd7c216..e0c5fd05 100644
--- a/services/core/java/com/android/server/wm/AppTransition.java
+++ b/services/core/java/com/android/server/wm/AppTransition.java
@@ -2142,7 +2142,7 @@
}
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(APP_TRANSITION_STATE, mAppTransitionState);
proto.write(LAST_USED_APP_TRANSITION, mLastUsedAppTransition);
diff --git a/services/core/java/com/android/server/wm/BarController.java b/services/core/java/com/android/server/wm/BarController.java
index 05d5a5c..57cdb0b 100644
--- a/services/core/java/com/android/server/wm/BarController.java
+++ b/services/core/java/com/android/server/wm/BarController.java
@@ -339,7 +339,7 @@
throw new IllegalArgumentException("Unknown state " + state);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(STATE, mState);
proto.write(TRANSIENT_STATE, mTransientBarState);
diff --git a/services/core/java/com/android/server/wm/ConfigurationContainer.java b/services/core/java/com/android/server/wm/ConfigurationContainer.java
index 30f3bc5..bfa72e0 100644
--- a/services/core/java/com/android/server/wm/ConfigurationContainer.java
+++ b/services/core/java/com/android/server/wm/ConfigurationContainer.java
@@ -591,7 +591,7 @@
* @hide
*/
@CallSuper
- protected void writeToProto(ProtoOutputStream proto, long fieldId,
+ protected void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
// Critical log level logs only visible elements to mitigate performance overheard
if (logLevel != WindowTraceLogLevel.ALL && !mHasOverrideConfiguration) {
@@ -599,11 +599,11 @@
}
final long token = proto.start(fieldId);
- mRequestedOverrideConfiguration.writeToProto(proto, OVERRIDE_CONFIGURATION,
+ mRequestedOverrideConfiguration.dumpDebug(proto, OVERRIDE_CONFIGURATION,
logLevel == WindowTraceLogLevel.CRITICAL);
if (logLevel == WindowTraceLogLevel.ALL) {
- mFullConfiguration.writeToProto(proto, FULL_CONFIGURATION, false /* critical */);
- mMergedOverrideConfiguration.writeToProto(proto, MERGED_OVERRIDE_CONFIGURATION,
+ mFullConfiguration.dumpDebug(proto, FULL_CONFIGURATION, false /* critical */);
+ mMergedOverrideConfiguration.dumpDebug(proto, MERGED_OVERRIDE_CONFIGURATION,
false /* critical */);
}
proto.end(token);
diff --git a/services/core/java/com/android/server/wm/Dimmer.java b/services/core/java/com/android/server/wm/Dimmer.java
index e6150cb..af859d3 100644
--- a/services/core/java/com/android/server/wm/Dimmer.java
+++ b/services/core/java/com/android/server/wm/Dimmer.java
@@ -389,7 +389,7 @@
}
@Override
- public void writeToProtoInner(ProtoOutputStream proto) {
+ public void dumpDebugInner(ProtoOutputStream proto) {
final long token = proto.start(ALPHA);
proto.write(FROM, mFromAlpha);
proto.write(TO, mToAlpha);
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 2aa9ea5..8e126b5 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -2602,7 +2602,7 @@
}
// TODO(proto-merge): Remove once protos for ActivityDisplay and DisplayContent are merged.
- public void writeToProtoInner(ProtoOutputStream proto, long fieldId,
+ public void dumpDebugInner(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
// Critical log level logs only visible elements to mitigate performance overheard
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible()) {
@@ -2610,35 +2610,35 @@
}
final long token = proto.start(fieldId);
- super.writeToProto(proto, WINDOW_CONTAINER, logLevel);
+ super.dumpDebug(proto, WINDOW_CONTAINER, logLevel);
proto.write(ID, mDisplayId);
for (int stackNdx = mTaskStackContainers.getChildCount() - 1; stackNdx >= 0; --stackNdx) {
final ActivityStack stack = mTaskStackContainers.getChildAt(stackNdx);
- stack.writeToProtoInnerStackOnly(proto, STACKS, logLevel);
+ stack.dumpDebugInnerStackOnly(proto, STACKS, logLevel);
}
- mDividerControllerLocked.writeToProto(proto, DOCKED_STACK_DIVIDER_CONTROLLER);
- mPinnedStackControllerLocked.writeToProto(proto, PINNED_STACK_CONTROLLER);
+ mDividerControllerLocked.dumpDebug(proto, DOCKED_STACK_DIVIDER_CONTROLLER);
+ mPinnedStackControllerLocked.dumpDebug(proto, PINNED_STACK_CONTROLLER);
for (int i = mAboveAppWindowsContainers.getChildCount() - 1; i >= 0; --i) {
final WindowToken windowToken = mAboveAppWindowsContainers.getChildAt(i);
- windowToken.writeToProto(proto, ABOVE_APP_WINDOWS, logLevel);
+ windowToken.dumpDebug(proto, ABOVE_APP_WINDOWS, logLevel);
}
for (int i = mBelowAppWindowsContainers.getChildCount() - 1; i >= 0; --i) {
final WindowToken windowToken = mBelowAppWindowsContainers.getChildAt(i);
- windowToken.writeToProto(proto, BELOW_APP_WINDOWS, logLevel);
+ windowToken.dumpDebug(proto, BELOW_APP_WINDOWS, logLevel);
}
for (int i = mImeWindowsContainers.getChildCount() - 1; i >= 0; --i) {
final WindowToken windowToken = mImeWindowsContainers.getChildAt(i);
- windowToken.writeToProto(proto, IME_WINDOWS, logLevel);
+ windowToken.dumpDebug(proto, IME_WINDOWS, logLevel);
}
proto.write(DPI, mBaseDisplayDensity);
- mDisplayInfo.writeToProto(proto, DISPLAY_INFO);
+ mDisplayInfo.dumpDebug(proto, DISPLAY_INFO);
proto.write(ROTATION, getRotation());
final ScreenRotationAnimation screenRotationAnimation = getRotationAnimation();
if (screenRotationAnimation != null) {
- screenRotationAnimation.writeToProto(proto, SCREEN_ROTATION_ANIMATION);
+ screenRotationAnimation.dumpDebug(proto, SCREEN_ROTATION_ANIMATION);
}
- mDisplayFrames.writeToProto(proto, DISPLAY_FRAMES);
- mAppTransition.writeToProto(proto, APP_TRANSITION);
+ mDisplayFrames.dumpDebug(proto, DISPLAY_FRAMES);
+ mAppTransition.dumpDebug(proto, APP_TRANSITION);
if (mFocusedApp != null) {
mFocusedApp.writeNameToProto(proto, FOCUSED_APP);
}
diff --git a/services/core/java/com/android/server/wm/DisplayFrames.java b/services/core/java/com/android/server/wm/DisplayFrames.java
index 6b47c8a..f8495b5 100644
--- a/services/core/java/com/android/server/wm/DisplayFrames.java
+++ b/services/core/java/com/android/server/wm/DisplayFrames.java
@@ -152,9 +152,9 @@
return mDock.bottom - mCurrent.bottom;
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- mStable.writeToProto(proto, STABLE_BOUNDS);
+ mStable.dumpDebug(proto, STABLE_BOUNDS);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/DockedStackDividerController.java b/services/core/java/com/android/server/wm/DockedStackDividerController.java
index 07d5094..1a1a7d4 100644
--- a/services/core/java/com/android/server/wm/DockedStackDividerController.java
+++ b/services/core/java/com/android/server/wm/DockedStackDividerController.java
@@ -1018,7 +1018,7 @@
pw.println(prefix + " mAdjustedForDivider=" + mAdjustedForDivider);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(MINIMIZED_DOCK, mMinimizedDock);
proto.end(token);
diff --git a/services/core/java/com/android/server/wm/InsetsSourceProvider.java b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
index b4055545..69e8fdc 100644
--- a/services/core/java/com/android/server/wm/InsetsSourceProvider.java
+++ b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
@@ -293,7 +293,7 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto) {
+ public void dumpDebug(ProtoOutputStream proto) {
}
}
}
diff --git a/services/core/java/com/android/server/wm/KeyguardController.java b/services/core/java/com/android/server/wm/KeyguardController.java
index 318d88e..ac5c96b 100644
--- a/services/core/java/com/android/server/wm/KeyguardController.java
+++ b/services/core/java/com/android/server/wm/KeyguardController.java
@@ -552,7 +552,7 @@
pw.println(sb.toString());
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(DISPLAY_ID, mDisplayId);
proto.write(KEYGUARD_OCCLUDED, mOccluded);
@@ -570,7 +570,7 @@
pw.println(prefix + " mVisibilityTransactionDepth=" + mVisibilityTransactionDepth);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(AOD_SHOWING, mAodShowing);
proto.write(KEYGUARD_SHOWING, mKeyguardShowing);
@@ -586,7 +586,7 @@
private void writeDisplayStatesToProto(ProtoOutputStream proto, long fieldId) {
for (int i = 0; i < mDisplayStates.size(); i++) {
- mDisplayStates.valueAt(i).writeToProto(proto, fieldId);
+ mDisplayStates.valueAt(i).dumpDebug(proto, fieldId);
}
}
}
diff --git a/services/core/java/com/android/server/wm/LocalAnimationAdapter.java b/services/core/java/com/android/server/wm/LocalAnimationAdapter.java
index e67cb6fc..5892239 100644
--- a/services/core/java/com/android/server/wm/LocalAnimationAdapter.java
+++ b/services/core/java/com/android/server/wm/LocalAnimationAdapter.java
@@ -76,9 +76,9 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto) {
+ public void dumpDebug(ProtoOutputStream proto) {
final long token = proto.start(LOCAL);
- mSpec.writeToProto(proto, ANIMATION_SPEC);
+ mSpec.dumpDebug(proto, ANIMATION_SPEC);
proto.end(token);
}
@@ -131,12 +131,12 @@
void dump(PrintWriter pw, String prefix);
- default void writeToProto(ProtoOutputStream proto, long fieldId) {
+ default void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- writeToProtoInner(proto);
+ dumpDebugInner(proto);
proto.end(token);
}
- void writeToProtoInner(ProtoOutputStream proto);
+ void dumpDebugInner(ProtoOutputStream proto);
}
}
diff --git a/services/core/java/com/android/server/wm/PinnedStackController.java b/services/core/java/com/android/server/wm/PinnedStackController.java
index 0853f1f..a8e7aea 100644
--- a/services/core/java/com/android/server/wm/PinnedStackController.java
+++ b/services/core/java/com/android/server/wm/PinnedStackController.java
@@ -604,11 +604,11 @@
pw.println(prefix + " mDisplayInfo=" + mDisplayInfo);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- getDefaultBounds(INVALID_SNAP_FRACTION).writeToProto(proto, DEFAULT_BOUNDS);
+ getDefaultBounds(INVALID_SNAP_FRACTION).dumpDebug(proto, DEFAULT_BOUNDS);
mService.getStackBounds(WINDOWING_MODE_PINNED, ACTIVITY_TYPE_STANDARD, mTmpRect);
- getMovementBounds(mTmpRect).writeToProto(proto, MOVEMENT_BOUNDS);
+ getMovementBounds(mTmpRect).dumpDebug(proto, MOVEMENT_BOUNDS);
proto.end(token);
}
}
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
index 39d08a2..39091a6 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimationController.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -910,10 +910,10 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto) {
+ public void dumpDebug(ProtoOutputStream proto) {
final long token = proto.start(REMOTE);
if (mTarget != null) {
- mTarget.writeToProto(proto, TARGET);
+ mTarget.dumpDebug(proto, TARGET);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/RemoteAnimationController.java b/services/core/java/com/android/server/wm/RemoteAnimationController.java
index efd1241..0b9be1a 100644
--- a/services/core/java/com/android/server/wm/RemoteAnimationController.java
+++ b/services/core/java/com/android/server/wm/RemoteAnimationController.java
@@ -464,10 +464,10 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto) {
+ public void dumpDebug(ProtoOutputStream proto) {
final long token = proto.start(REMOTE);
if (mRecord.mTarget != null) {
- mRecord.mTarget.writeToProto(proto, TARGET);
+ mRecord.mTarget.dumpDebug(proto, TARGET);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/RootActivityContainer.java b/services/core/java/com/android/server/wm/RootActivityContainer.java
index 40e6dcc..5653ec0 100644
--- a/services/core/java/com/android/server/wm/RootActivityContainer.java
+++ b/services/core/java/com/android/server/wm/RootActivityContainer.java
@@ -2633,15 +2633,15 @@
return printed;
}
- protected void writeToProto(ProtoOutputStream proto, long fieldId,
+ protected void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
final long token = proto.start(fieldId);
- super.writeToProto(proto, CONFIGURATION_CONTAINER, logLevel);
+ super.dumpDebug(proto, CONFIGURATION_CONTAINER, logLevel);
for (int displayNdx = 0; displayNdx < mActivityDisplays.size(); ++displayNdx) {
final ActivityDisplay activityDisplay = mActivityDisplays.get(displayNdx);
- activityDisplay.writeToProto(proto, DISPLAYS, logLevel);
+ activityDisplay.dumpDebug(proto, DISPLAYS, logLevel);
}
- mStackSupervisor.getKeyguardController().writeToProto(proto, KEYGUARD_CONTROLLER);
+ mStackSupervisor.getKeyguardController().dumpDebug(proto, KEYGUARD_CONTROLLER);
// TODO(b/111541062): Update tests to look for resumed activities on all displays
final ActivityStack focusedStack = getTopDisplayFocusedStack();
if (focusedStack != null) {
@@ -2655,7 +2655,7 @@
}
proto.write(IS_HOME_RECENTS_COMPONENT,
mStackSupervisor.mRecentTasks.isRecentsComponentHomeActivity(mCurrentUser));
- mService.getActivityStartController().writeToProto(proto, PENDING_ACTIVITIES);
+ mService.getActivityStartController().dumpDebug(proto, PENDING_ACTIVITIES);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index 5a104289..361bbe4 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -1000,19 +1000,19 @@
@CallSuper
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible()) {
return;
}
final long token = proto.start(fieldId);
- super.writeToProto(proto, WINDOW_CONTAINER, logLevel);
+ super.dumpDebug(proto, WINDOW_CONTAINER, logLevel);
if (mWmService.mDisplayReady) {
final int count = mChildren.size();
for (int i = 0; i < count; ++i) {
final DisplayContent displayContent = mChildren.get(i);
- displayContent.writeToProtoInner(proto, DISPLAYS, logLevel);
+ displayContent.dumpDebugInner(proto, DISPLAYS, logLevel);
}
}
if (logLevel == WindowTraceLogLevel.ALL) {
diff --git a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
index c19c96f..1a7d214 100644
--- a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -244,7 +244,7 @@
}
}
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(STARTED, mStarted);
proto.write(ANIMATION_RUNNING, mAnimRunning);
diff --git a/services/core/java/com/android/server/wm/SurfaceAnimator.java b/services/core/java/com/android/server/wm/SurfaceAnimator.java
index ba728ba..976730e 100644
--- a/services/core/java/com/android/server/wm/SurfaceAnimator.java
+++ b/services/core/java/com/android/server/wm/SurfaceAnimator.java
@@ -340,13 +340,13 @@
* @param fieldId Field Id of the SurfaceAnimator as defined in the parent message.
* @hide
*/
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
if (mAnimation != null) {
- mAnimation.writeToProto(proto, ANIMATION_ADAPTER);
+ mAnimation.dumpDebug(proto, ANIMATION_ADAPTER);
}
if (mLeash != null) {
- mLeash.writeToProto(proto, LEASH);
+ mLeash.dumpDebug(proto, LEASH);
}
proto.write(ANIMATION_START_DELAYED, mAnimationStartDelayed);
proto.end(token);
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 88a38e0..57e1670 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -2722,21 +2722,21 @@
}
// TODO(proto-merge): Remove once protos for TaskRecord and Task are merged.
- void writeToProtoInnerTaskOnly(ProtoOutputStream proto, long fieldId,
+ void dumpDebugInnerTaskOnly(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible()) {
return;
}
final long token = proto.start(fieldId);
- super.writeToProto(proto, WINDOW_CONTAINER, logLevel);
+ super.dumpDebug(proto, WINDOW_CONTAINER, logLevel);
proto.write(TaskProto.ID, mTaskId);
forAllActivities((r) -> {
- r.writeToProto(proto, APP_WINDOW_TOKENS, logLevel);
+ r.dumpDebug(proto, APP_WINDOW_TOKENS, logLevel);
});
proto.write(FILLS_PARENT, matchParentBounds());
- getBounds().writeToProto(proto, TaskProto.BOUNDS);
- mOverrideDisplayedBounds.writeToProto(proto, DISPLAYED_BOUNDS);
+ getBounds().dumpDebug(proto, TaskProto.BOUNDS);
+ mOverrideDisplayedBounds.dumpDebug(proto, DISPLAYED_BOUNDS);
if (mSurfaceControl != null) {
proto.write(SURFACE_WIDTH, mSurfaceControl.getWidth());
proto.write(SURFACE_HEIGHT, mSurfaceControl.getHeight());
@@ -2931,22 +2931,22 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible()) {
return;
}
final long token = proto.start(fieldId);
- writeToProtoInnerTaskOnly(proto, TASK, logLevel);
+ dumpDebugInnerTaskOnly(proto, TASK, logLevel);
proto.write(com.android.server.am.TaskRecordProto.ID, mTaskId);
forAllActivities((r) -> {
- r.writeToProto(proto, ACTIVITIES);
+ r.dumpDebug(proto, ACTIVITIES);
});
proto.write(STACK_ID, getStackId());
if (mLastNonFullscreenBounds != null) {
- mLastNonFullscreenBounds.writeToProto(proto, LAST_NON_FULLSCREEN_BOUNDS);
+ mLastNonFullscreenBounds.dumpDebug(proto, LAST_NON_FULLSCREEN_BOUNDS);
}
if (realActivity != null) {
proto.write(REAL_ACTIVITY, realActivity.flattenToShortString());
@@ -2961,7 +2961,7 @@
if (!matchParentBounds()) {
final Rect bounds = getRequestedOverrideBounds();
- bounds.writeToProto(proto, com.android.server.am.TaskRecordProto.BOUNDS);
+ bounds.dumpDebug(proto, com.android.server.am.TaskRecordProto.BOUNDS);
}
proto.write(MIN_WIDTH, mMinWidth);
proto.write(MIN_HEIGHT, mMinHeight);
diff --git a/services/core/java/com/android/server/wm/VrController.java b/services/core/java/com/android/server/wm/VrController.java
index 3e136d35..54cac38 100644
--- a/services/core/java/com/android/server/wm/VrController.java
+++ b/services/core/java/com/android/server/wm/VrController.java
@@ -441,7 +441,7 @@
return String.format("[VrState=0x%x,VrRenderThreadTid=%d]", mVrState, mVrRenderThreadTid);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
ProtoUtils.writeBitWiseFlagsToProtoEnum(proto, VrControllerProto.VR_MODE,
mVrState, ORIG_ENUMS, PROTO_ENUMS);
diff --git a/services/core/java/com/android/server/wm/WallpaperAnimationAdapter.java b/services/core/java/com/android/server/wm/WallpaperAnimationAdapter.java
index 513008d..801e521 100644
--- a/services/core/java/com/android/server/wm/WallpaperAnimationAdapter.java
+++ b/services/core/java/com/android/server/wm/WallpaperAnimationAdapter.java
@@ -165,10 +165,10 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto) {
+ public void dumpDebug(ProtoOutputStream proto) {
final long token = proto.start(REMOTE);
if (mTarget != null) {
- mTarget.writeToProto(proto, TARGET);
+ mTarget.dumpDebug(proto, TARGET);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/WindowAnimationSpec.java b/services/core/java/com/android/server/wm/WindowAnimationSpec.java
index 7c183a8..06bffd4 100644
--- a/services/core/java/com/android/server/wm/WindowAnimationSpec.java
+++ b/services/core/java/com/android/server/wm/WindowAnimationSpec.java
@@ -149,7 +149,7 @@
}
@Override
- public void writeToProtoInner(ProtoOutputStream proto) {
+ public void dumpDebugInner(ProtoOutputStream proto) {
final long token = proto.start(WINDOW);
proto.write(ANIMATION, mAnimation.toString());
proto.end(token);
diff --git a/services/core/java/com/android/server/wm/WindowChangeAnimationSpec.java b/services/core/java/com/android/server/wm/WindowChangeAnimationSpec.java
index d5d4e08..d3530c5 100644
--- a/services/core/java/com/android/server/wm/WindowChangeAnimationSpec.java
+++ b/services/core/java/com/android/server/wm/WindowChangeAnimationSpec.java
@@ -186,7 +186,7 @@
}
@Override
- public void writeToProtoInner(ProtoOutputStream proto) {
+ public void dumpDebugInner(ProtoOutputStream proto) {
final long token = proto.start(WINDOW);
proto.write(ANIMATION, mAnimation.toString());
proto.end(token);
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index 1b4ca41..e80f3b8 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -1578,7 +1578,7 @@
*/
@CallSuper
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
boolean isVisible = isVisible();
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible) {
@@ -1586,11 +1586,11 @@
}
final long token = proto.start(fieldId);
- super.writeToProto(proto, CONFIGURATION_CONTAINER, logLevel);
+ super.dumpDebug(proto, CONFIGURATION_CONTAINER, logLevel);
proto.write(ORIENTATION, mOrientation);
proto.write(VISIBLE, isVisible);
if (mSurfaceAnimator.isAnimating()) {
- mSurfaceAnimator.writeToProto(proto, SURFACE_ANIMATOR);
+ mSurfaceAnimator.dumpDebug(proto, SURFACE_ANIMATOR);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/WindowContainerThumbnail.java b/services/core/java/com/android/server/wm/WindowContainerThumbnail.java
index 604eae6..8e070f1 100644
--- a/services/core/java/com/android/server/wm/WindowContainerThumbnail.java
+++ b/services/core/java/com/android/server/wm/WindowContainerThumbnail.java
@@ -166,12 +166,12 @@
* message.
* @hide
*/
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(WIDTH, mWidth);
proto.write(HEIGHT, mHeight);
if (mSurfaceAnimator.isAnimating()) {
- mSurfaceAnimator.writeToProto(proto, SURFACE_ANIMATOR);
+ mSurfaceAnimator.dumpDebug(proto, SURFACE_ANIMATOR);
}
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/WindowFrames.java b/services/core/java/com/android/server/wm/WindowFrames.java
index bafa38c..0490bac 100644
--- a/services/core/java/com/android/server/wm/WindowFrames.java
+++ b/services/core/java/com/android/server/wm/WindowFrames.java
@@ -334,19 +334,19 @@
return mContentChanged;
}
- public void writeToProto(@NonNull ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(@NonNull ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- mParentFrame.writeToProto(proto, PARENT_FRAME);
- mContentFrame.writeToProto(proto, CONTENT_FRAME);
- mDisplayFrame.writeToProto(proto, DISPLAY_FRAME);
- mVisibleFrame.writeToProto(proto, VISIBLE_FRAME);
- mDecorFrame.writeToProto(proto, DECOR_FRAME);
- mContainingFrame.writeToProto(proto, CONTAINING_FRAME);
- mFrame.writeToProto(proto, FRAME);
- mDisplayCutout.getDisplayCutout().writeToProto(proto, CUTOUT);
- mContentInsets.writeToProto(proto, CONTENT_INSETS);
- mVisibleInsets.writeToProto(proto, VISIBLE_INSETS);
- mStableInsets.writeToProto(proto, STABLE_INSETS);
+ mParentFrame.dumpDebug(proto, PARENT_FRAME);
+ mContentFrame.dumpDebug(proto, CONTENT_FRAME);
+ mDisplayFrame.dumpDebug(proto, DISPLAY_FRAME);
+ mVisibleFrame.dumpDebug(proto, VISIBLE_FRAME);
+ mDecorFrame.dumpDebug(proto, DECOR_FRAME);
+ mContainingFrame.dumpDebug(proto, CONTAINING_FRAME);
+ mFrame.dumpDebug(proto, FRAME);
+ mDisplayCutout.getDisplayCutout().dumpDebug(proto, CUTOUT);
+ mContentInsets.dumpDebug(proto, CONTENT_INSETS);
+ mVisibleInsets.dumpDebug(proto, VISIBLE_INSETS);
+ mStableInsets.dumpDebug(proto, STABLE_INSETS);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 0a87fda..3b97445 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -5766,9 +5766,9 @@
* @param proto Stream to write the WindowContainer object to.
* @param logLevel Determines the amount of data to be written to the Protobuf.
*/
- void writeToProtoLocked(ProtoOutputStream proto, @WindowTraceLogLevel int logLevel) {
- mPolicy.writeToProto(proto, POLICY);
- mRoot.writeToProto(proto, ROOT_WINDOW_CONTAINER, logLevel);
+ void dumpDebugLocked(ProtoOutputStream proto, @WindowTraceLogLevel int logLevel) {
+ mPolicy.dumpDebug(proto, POLICY);
+ mRoot.dumpDebug(proto, ROOT_WINDOW_CONTAINER, logLevel);
final DisplayContent topFocusedDisplayContent = mRoot.getTopFocusedDisplayContent();
if (topFocusedDisplayContent.mCurrentFocus != null) {
topFocusedDisplayContent.mCurrentFocus.writeIdentifierToProto(proto, FOCUSED_WINDOW);
@@ -6091,7 +6091,7 @@
if (useProto) {
final ProtoOutputStream proto = new ProtoOutputStream(fd);
synchronized (mGlobalLock) {
- writeToProtoLocked(proto, WindowTraceLogLevel.ALL);
+ dumpDebugLocked(proto, WindowTraceLogLevel.ALL);
}
proto.flush();
return;
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java
index e169037..ddf8e9b 100644
--- a/services/core/java/com/android/server/wm/WindowProcessController.java
+++ b/services/core/java/com/android/server/wm/WindowProcessController.java
@@ -1173,9 +1173,9 @@
pw.println(prefix + " mLastReportedConfiguration=" + mLastReportedConfiguration);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
if (mListener != null) {
- mListener.writeToProto(proto, fieldId);
+ mListener.dumpDebug(proto, fieldId);
}
}
}
diff --git a/services/core/java/com/android/server/wm/WindowProcessListener.java b/services/core/java/com/android/server/wm/WindowProcessListener.java
index 1dade15..870cbb0 100644
--- a/services/core/java/com/android/server/wm/WindowProcessListener.java
+++ b/services/core/java/com/android/server/wm/WindowProcessListener.java
@@ -60,7 +60,7 @@
/** App died :(...oh well */
void appDied();
- void writeToProto(ProtoOutputStream proto, long fieldId);
+ void dumpDebug(ProtoOutputStream proto, long fieldId);
/**
* Sets if the process is currently running a remote animation, which is taken a signal for
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 8cc0736..9372684 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -3609,7 +3609,7 @@
@CallSuper
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
boolean isVisible = isVisible();
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible) {
@@ -3617,19 +3617,19 @@
}
final long token = proto.start(fieldId);
- super.writeToProto(proto, WINDOW_CONTAINER, logLevel);
+ super.dumpDebug(proto, WINDOW_CONTAINER, logLevel);
writeIdentifierToProto(proto, IDENTIFIER);
proto.write(DISPLAY_ID, getDisplayId());
proto.write(STACK_ID, getStackId());
- mAttrs.writeToProto(proto, ATTRIBUTES);
- mGivenContentInsets.writeToProto(proto, GIVEN_CONTENT_INSETS);
- mWindowFrames.writeToProto(proto, WINDOW_FRAMES);
- mAttrs.surfaceInsets.writeToProto(proto, SURFACE_INSETS);
- mSurfacePosition.writeToProto(proto, SURFACE_POSITION);
- mWinAnimator.writeToProto(proto, ANIMATOR);
+ mAttrs.dumpDebug(proto, ATTRIBUTES);
+ mGivenContentInsets.dumpDebug(proto, GIVEN_CONTENT_INSETS);
+ mWindowFrames.dumpDebug(proto, WINDOW_FRAMES);
+ mAttrs.surfaceInsets.dumpDebug(proto, SURFACE_INSETS);
+ mSurfacePosition.dumpDebug(proto, SURFACE_POSITION);
+ mWinAnimator.dumpDebug(proto, ANIMATOR);
proto.write(ANIMATING_EXIT, mAnimatingExit);
for (int i = 0; i < mChildren.size(); i++) {
- mChildren.get(i).writeToProto(proto, CHILD_WINDOWS, logLevel);
+ mChildren.get(i).dumpDebug(proto, CHILD_WINDOWS, logLevel);
}
proto.write(REQUESTED_WIDTH, mRequestedWidth);
proto.write(REQUESTED_HEIGHT, mRequestedHeight);
@@ -5401,10 +5401,10 @@
}
@Override
- public void writeToProtoInner(ProtoOutputStream proto) {
+ public void dumpDebugInner(ProtoOutputStream proto) {
final long token = proto.start(MOVE);
- mFrom.writeToProto(proto, FROM);
- mTo.writeToProto(proto, TO);
+ mFrom.dumpDebug(proto, FROM);
+ mTo.dumpDebug(proto, TO);
proto.write(DURATION_MS, mDuration);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 94aff7b..c420291 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -1405,14 +1405,14 @@
return mWin.isAnimating(TRANSITION | PARENTS);
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- mLastClipRect.writeToProto(proto, LAST_CLIP_RECT);
+ mLastClipRect.dumpDebug(proto, LAST_CLIP_RECT);
if (mSurfaceController != null) {
- mSurfaceController.writeToProto(proto, SURFACE);
+ mSurfaceController.dumpDebug(proto, SURFACE);
}
proto.write(DRAW_STATE, mDrawState);
- mSystemDecorRect.writeToProto(proto, SYSTEM_DECOR_RECT);
+ mSystemDecorRect.dumpDebug(proto, SYSTEM_DECOR_RECT);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/wm/WindowSurfaceController.java b/services/core/java/com/android/server/wm/WindowSurfaceController.java
index 0b4ea99..5b8015b 100644
--- a/services/core/java/com/android/server/wm/WindowSurfaceController.java
+++ b/services/core/java/com/android/server/wm/WindowSurfaceController.java
@@ -510,7 +510,7 @@
return mSurfaceH;
}
- void writeToProto(ProtoOutputStream proto, long fieldId) {
+ void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(SHOWN, mSurfaceShown);
proto.write(LAYER, mSurfaceLayer);
diff --git a/services/core/java/com/android/server/wm/WindowToken.java b/services/core/java/com/android/server/wm/WindowToken.java
index 287d7cd..f81713e 100644
--- a/services/core/java/com/android/server/wm/WindowToken.java
+++ b/services/core/java/com/android/server/wm/WindowToken.java
@@ -258,18 +258,18 @@
@CallSuper
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId,
+ public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible()) {
return;
}
final long token = proto.start(fieldId);
- super.writeToProto(proto, WINDOW_CONTAINER, logLevel);
+ super.dumpDebug(proto, WINDOW_CONTAINER, logLevel);
proto.write(HASH_CODE, System.identityHashCode(this));
for (int i = 0; i < mChildren.size(); i++) {
final WindowState w = mChildren.get(i);
- w.writeToProto(proto, WINDOWS, logLevel);
+ w.dumpDebug(proto, WINDOWS, logLevel);
}
proto.write(WAITING_TO_SHOW, waitingToShow);
proto.write(PAUSED, paused);
diff --git a/services/core/java/com/android/server/wm/WindowTracing.java b/services/core/java/com/android/server/wm/WindowTracing.java
index bb66530..0be90fc 100644
--- a/services/core/java/com/android/server/wm/WindowTracing.java
+++ b/services/core/java/com/android/server/wm/WindowTracing.java
@@ -298,9 +298,9 @@
long tokenInner = os.start(WINDOW_MANAGER_SERVICE);
synchronized (mGlobalLock) {
- Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "writeToProtoLocked");
+ Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "dumpDebugLocked");
try {
- mService.writeToProtoLocked(os, mLogLevel);
+ mService.dumpDebugLocked(os, mLogLevel);
} finally {
Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
index aa6c14e..634d2f0 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -368,7 +368,7 @@
}
@Override
- public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ public void dumpDebug(ProtoOutputStream proto, long fieldId) {
}
@Override
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java b/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java
index e3691c6..c183403 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java
@@ -125,7 +125,7 @@
public void trace_dumpsWindowManagerState_whenTracing() throws Exception {
mWindowTracing.startTrace(mock(PrintWriter.class));
mWindowTracing.logState("where");
- verify(mWmMock, times(2)).writeToProtoLocked(any(), eq(WindowTraceLogLevel.TRIM));
+ verify(mWmMock, times(2)).dumpDebugLocked(any(), eq(WindowTraceLogLevel.TRIM));
}
@Test
@@ -151,7 +151,7 @@
inv.<ProtoOutputStream>getArgument(0).write(
WindowManagerTraceProto.WHERE, "TEST_WM_PROTO");
return null;
- }).when(mWmMock).writeToProtoLocked(any(), any());
+ }).when(mWmMock).dumpDebugLocked(any(), any());
mWindowTracing.logState("TEST_WHERE");
mWindowTracing.stopTrace(mock(PrintWriter.class));
diff --git a/services/usage/java/com/android/server/usage/UsageStatsProto.java b/services/usage/java/com/android/server/usage/UsageStatsProto.java
index 87e077e..932784d 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsProto.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsProto.java
@@ -410,7 +410,7 @@
final IntervalStats stats, final ConfigurationStats configStats, boolean isActive)
throws IllegalArgumentException {
final long token = proto.start(fieldId);
- configStats.mConfiguration.writeToProto(proto, IntervalStatsProto.Configuration.CONFIG);
+ configStats.mConfiguration.dumpDebug(proto, IntervalStatsProto.Configuration.CONFIG);
proto.write(IntervalStatsProto.Configuration.LAST_TIME_ACTIVE_MS,
configStats.mLastTimeActive - stats.beginTime);
proto.write(IntervalStatsProto.Configuration.TOTAL_TIME_ACTIVE_MS,
@@ -460,7 +460,7 @@
switch (event.mEventType) {
case UsageEvents.Event.CONFIGURATION_CHANGE:
if (event.mConfiguration != null) {
- event.mConfiguration.writeToProto(proto, IntervalStatsProto.Event.CONFIG);
+ event.mConfiguration.dumpDebug(proto, IntervalStatsProto.Event.CONFIG);
}
break;
case UsageEvents.Event.SHORTCUT_INVOCATION:
diff --git a/services/usage/java/com/android/server/usage/UsageStatsProtoV2.java b/services/usage/java/com/android/server/usage/UsageStatsProtoV2.java
index b68e04f..fe5da92 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsProtoV2.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsProtoV2.java
@@ -355,7 +355,7 @@
private static void writeConfigStats(ProtoOutputStream proto, final long statsBeginTime,
final ConfigurationStats configStats, boolean isActive)
throws IllegalArgumentException {
- configStats.mConfiguration.writeToProto(proto,
+ configStats.mConfiguration.dumpDebug(proto,
IntervalStatsObfuscatedProto.Configuration.CONFIG);
proto.write(IntervalStatsObfuscatedProto.Configuration.LAST_TIME_ACTIVE_MS,
configStats.mLastTimeActive - statsBeginTime);
@@ -385,7 +385,7 @@
switch (event.mEventType) {
case UsageEvents.Event.CONFIGURATION_CHANGE:
if (event.mConfiguration != null) {
- event.mConfiguration.writeToProto(proto, EventObfuscatedProto.CONFIG);
+ event.mConfiguration.dumpDebug(proto, EventObfuscatedProto.CONFIG);
}
break;
case UsageEvents.Event.STANDBY_BUCKET_CHANGED:
@@ -749,7 +749,7 @@
switch (event.mEventType) {
case UsageEvents.Event.CONFIGURATION_CHANGE:
if (event.mConfiguration != null) {
- event.mConfiguration.writeToProto(proto, PendingEventProto.CONFIG);
+ event.mConfiguration.dumpDebug(proto, PendingEventProto.CONFIG);
}
break;
case UsageEvents.Event.STANDBY_BUCKET_CHANGED:
diff --git a/startop/iorap/src/com/google/android/startop/iorap/AppLaunchEvent.java b/startop/iorap/src/com/google/android/startop/iorap/AppLaunchEvent.java
index 59f4d56..8263e0a 100644
--- a/startop/iorap/src/com/google/android/startop/iorap/AppLaunchEvent.java
+++ b/startop/iorap/src/com/google/android/startop/iorap/AppLaunchEvent.java
@@ -439,7 +439,7 @@
final ProtoOutputStream protoOutputStream =
new ProtoOutputStream(INTENT_PROTO_CHUNK_SIZE);
// Write this data out as the top-most IntentProto (i.e. it is not a sub-object).
- intent.writeToProto(protoOutputStream);
+ intent.dumpDebug(protoOutputStream);
final byte[] bytes = protoOutputStream.getBytes();
p.writeByteArray(bytes);