Merge "Pass in calling UID and package to dumpstate" am: bc6e433ae4
am: ae97716377
Change-Id: Ie1126fb68184c7789fe969b008ee1550d4424809
This commit is contained in:
@@ -66,10 +66,14 @@ public class BugreportManager {
|
||||
@interface BugreportErrorCode {}
|
||||
|
||||
/** The input options were invalid */
|
||||
int BUGREPORT_ERROR_INVALID_INPUT = 1;
|
||||
int BUGREPORT_ERROR_INVALID_INPUT = IDumpstateListener.BUGREPORT_ERROR_INVALID_INPUT;
|
||||
|
||||
/** A runtime error occured */
|
||||
int BUGREPORT_ERROR_RUNTIME = 2;
|
||||
int BUGREPORT_ERROR_RUNTIME = IDumpstateListener.BUGREPORT_ERROR_RUNTIME_ERROR;
|
||||
|
||||
/** User denied consent to share the bugreport */
|
||||
int BUGREPORT_ERROR_USER_DENIED_CONSENT =
|
||||
IDumpstateListener.BUGREPORT_ERROR_USER_DENIED_CONSENT;
|
||||
|
||||
/**
|
||||
* Called when taking bugreport resulted in an error.
|
||||
@@ -108,7 +112,10 @@ public class BugreportManager {
|
||||
DumpstateListener dsListener = new DumpstateListener(listener);
|
||||
|
||||
try {
|
||||
mBinder.startBugreport(bugreportFd, screenshotFd, params.getMode(), dsListener);
|
||||
// Note: mBinder can get callingUid from the binder transaction.
|
||||
mBinder.startBugreport(-1 /* callingUid */,
|
||||
mContext.getOpPackageName(), bugreportFd, screenshotFd,
|
||||
params.getMode(), dsListener);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user