Merge changes from topic "am-24a1d38b9196448ba01be8ca57067403"
* changes: Merge "Revert "Whitelist START_ACTIVITIES_FROM_BACKGROUND permission for"" into qt-dev am:269907a310am:9530705038am:cd01c44e93Merge "Allow permission controller to start background activities" into qt-dev am:574cbd1987am:b67bcb731bam:61b1464759
This commit is contained in:
committed by
Android (Google) Code Review
commit
0660531df1
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user