Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 728b80a3 authored by Nikhil Kumar's avatar Nikhil Kumar Committed by Android (Google) Code Review
Browse files

Merge "Send REMOTE_BUGREPORT request to the SYSTEM user." into udc-dev

parents e3c89655 398a937c
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -7316,7 +7316,14 @@ public class ActivityManagerService extends IActivityManager.Stub
            // Send broadcast to shell to trigger bugreport using Bugreport API
            // Always start the shell process on the current user to ensure that
            // the foreground user can see all bugreport notifications.
            mContext.sendBroadcastAsUser(triggerShellBugreport, getCurrentUser().getUserHandle());
            // In case of BUGREPORT_MODE_REMOTE send the broadcast to SYSTEM user as the device
            // owner apps are running on the SYSTEM user.
            if (bugreportType == BugreportParams.BUGREPORT_MODE_REMOTE) {
                mContext.sendBroadcastAsUser(triggerShellBugreport, UserHandle.SYSTEM);
            } else {
                mContext.sendBroadcastAsUser(triggerShellBugreport,
                        getCurrentUser().getUserHandle());
            }
        } finally {
            Binder.restoreCallingIdentity(identity);
        }