Use unsigned calling_uid in case of bug report triggered from adb
The utility method to extract user_id and app_id from calling_uid
takes unsigned int_32. Changed the default value of calling_uid to
0 from -1 for the case when bug report is triggered by adb and calling_uid is not relevant.
Bug: 260989962
Test: tested manually by initiating a bug report through adb and
observing the BUGREPORT_STARTED broadcast in logcat.
Ignore-AOSP-First: will do it later with other headless changes.
Change-Id: I1c410853ef99c6292039382714394066a72318f7
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 5dbf7ac..8a33756 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -3586,7 +3586,7 @@
// an app; they are irrelevant here because bugreport is triggered via command line.
// Update Last ID before calling Run().
Initialize();
- status = Run(-1 /* calling_uid */, "" /* calling_package */);
+ status = Run(0 /* calling_uid */, "" /* calling_package */);
}
return status;
}