Do not print Intent ClipData in logcat/dumpsys output.

Change-Id: I7472248777bcff01a8db3be707c19dfab098213a
Fix: 142834800
Test: the reproduce steps in b/142834800
This commit is contained in:
Hui Yu
2019-10-22 15:35:53 -07:00
parent 5a23400610
commit 6d5c3b9636
6 changed files with 10 additions and 11 deletions

View File

@@ -1069,9 +1069,8 @@ public class ClipData implements Parcelable {
if (!first) {
b.append(' ');
}
mItems.get(0).toShortString(b);
if (mItems.size() > 1) {
b.append(" ...");
for (int i=0; i<mItems.size(); i++) {
b.append("{...}");
}
}
}

View File

@@ -508,7 +508,7 @@ public final class PendingIntentRecord extends IIntentSender.Stub {
}
if (key.requestIntent != null) {
pw.print(prefix); pw.print("requestIntent=");
pw.println(key.requestIntent.toShortString(false, true, true, true));
pw.println(key.requestIntent.toShortString(false, true, true, false));
}
if (sent || canceled) {
pw.print(prefix); pw.print("sent="); pw.print(sent);

View File

@@ -256,7 +256,7 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
}
if (intent != null) {
intent.getIntent().writeToProto(proto, ServiceRecordProto.INTENT, false, true, false,
true);
false);
}
proto.write(ServiceRecordProto.PACKAGE_NAME, packageName);
proto.write(ServiceRecordProto.PROCESS_NAME, processName);
@@ -358,7 +358,7 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
void dump(PrintWriter pw, String prefix) {
pw.print(prefix); pw.print("intent={");
pw.print(intent.getIntent().toShortString(false, true, false, true));
pw.print(intent.getIntent().toShortString(false, true, false, false));
pw.println('}');
pw.print(prefix); pw.print("packageName="); pw.println(packageName);
pw.print(prefix); pw.print("processName="); pw.println(processName);

View File

@@ -751,7 +751,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
pw.print(" launchedFromPackage="); pw.print(launchedFromPackage);
pw.print(" userId="); pw.println(mUserId);
pw.print(prefix); pw.print("app="); pw.println(app);
pw.print(prefix); pw.println(intent.toInsecureStringWithClip());
pw.print(prefix); pw.println(intent.toInsecureString());
pw.print(prefix); pw.print("rootOfTask="); pw.print(isRootOfTask());
pw.print(" task="); pw.println(task);
pw.print(prefix); pw.print("taskAffinity="); pw.println(taskAffinity);
@@ -846,7 +846,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
if (intent == null) {
pw.println("null");
} else {
pw.println(intent.toShortString(false, true, false, true));
pw.println(intent.toShortString(false, true, false, false));
}
}
}

View File

@@ -2247,7 +2247,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
// Complete + brief == give a summary. Isn't that obvious?!?
if (lastTask.intent != null) {
pw.print(prefix); pw.print(" ");
pw.println(lastTask.intent.toInsecureStringWithClip());
pw.println(lastTask.intent.toInsecureString());
}
}
}

View File

@@ -2371,14 +2371,14 @@ class TaskRecord extends ConfigurationContainer {
if (intent != null) {
StringBuilder sb = new StringBuilder(128);
sb.append(prefix); sb.append("intent={");
intent.toShortString(sb, false, true, false, true);
intent.toShortString(sb, false, true, false, false);
sb.append('}');
pw.println(sb.toString());
}
if (affinityIntent != null) {
StringBuilder sb = new StringBuilder(128);
sb.append(prefix); sb.append("affinityIntent={");
affinityIntent.toShortString(sb, false, true, false, true);
affinityIntent.toShortString(sb, false, true, false, false);
sb.append('}');
pw.println(sb.toString());
}