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

Commit cead2839 authored by Robin Lee's avatar Robin Lee
Browse files

Permit crash report button for user profiles

Loosens the restriction for reporting an issue with an app from "same
profile" to "same user".

Fixes bug 16792315.

Change-Id: I25100a3f7030b2a74e9fe40894103677e8db6cdd
parent 00f201e4
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -10585,14 +10585,16 @@ public final class ActivityManagerService extends ActivityManagerNative
    }
    void startAppProblemLocked(ProcessRecord app) {
        if (app.userId == mCurrentUserId) {
            app.errorReportReceiver = ApplicationErrorReport.getErrorReportReceiver(
                    mContext, app.info.packageName, app.info.flags);
        } else {
        // If this app is not running under the current user, then we
        // can't give it a report button because that would require
        // launching the report UI under a different user.
        app.errorReportReceiver = null;
        for (int userId : mCurrentProfileIds) {
            if (app.userId == userId) {
                app.errorReportReceiver = ApplicationErrorReport.getErrorReportReceiver(
                        mContext, app.info.packageName, app.info.flags);
            }
        }
        skipCurrentReceiverLocked(app);
    }