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

Commit e33620bf authored by zhouwenjie's avatar zhouwenjie Committed by android-build-merger
Browse files

Merge "Allow permission controller to start background activities" into qt-dev

am: 574cbd19

Change-Id: I35d9b5f3c5f1bcc7ca54c72da8dfef5d42fdd9d4
parents b9e4f619 574cbd19
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.incident;

import android.app.AppOpsManager;
import android.app.BroadcastOptions;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -358,10 +359,12 @@ class PendingReports {
    private void sendBroadcast(ComponentName receiver, int primaryUser) {
        final Intent intent = new Intent(Intent.ACTION_PENDING_INCIDENT_REPORTS_CHANGED);
        intent.setComponent(receiver);
        final BroadcastOptions options = BroadcastOptions.makeBasic();
        options.setBackgroundActivityStartsAllowed(true);

        // Send it to the primary user.
        mContext.sendBroadcastAsUser(intent, UserHandle.getUserHandleForUid(primaryUser),
                android.Manifest.permission.APPROVE_INCIDENT_REPORTS);
                android.Manifest.permission.APPROVE_INCIDENT_REPORTS, options.toBundle());
    }

    /**