Fixed dumping of Controller proto message

If mController is not null, then "dumpsys activity --proto processes"
will cause the following exception

Exception occurred while dumping:
java.lang.IllegalArgumentException: Attempt to call write(long, String) with
   Message tag=37 fieldId=0x10b00000025

Bug: 135941071
Test: adb shell am monitor
      and run "adb shell dumpsys activity --proto processes" in another window
Change-Id: Ic476f09654b56e72172dd6ae03d19d775269de89
This commit is contained in:
Wally Yau
2020-01-08 10:16:43 -08:00
parent 1c61094c04
commit 0eb29f6d40

View File

@@ -7203,7 +7203,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
ActivityManagerServiceDumpProcessesProto.VR_CONTROLLER);
if (mController != null) {
final long token = proto.start(CONTROLLER);
proto.write(CONTROLLER, mController.toString());
proto.write(ActivityManagerServiceDumpProcessesProto.Controller.CONTROLLER,
mController.toString());
proto.write(IS_A_MONKEY, mControllerIsAMonkey);
proto.end(token);
}