Loading services/core/java/com/android/server/incident/PendingReports.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.server.incident; package com.android.server.incident; import android.app.AppOpsManager; import android.app.AppOpsManager; import android.app.BroadcastOptions; import android.content.ComponentName; import android.content.ComponentName; import android.content.Context; import android.content.Context; import android.content.Intent; import android.content.Intent; Loading Loading @@ -358,10 +359,12 @@ class PendingReports { private void sendBroadcast(ComponentName receiver, int primaryUser) { private void sendBroadcast(ComponentName receiver, int primaryUser) { final Intent intent = new Intent(Intent.ACTION_PENDING_INCIDENT_REPORTS_CHANGED); final Intent intent = new Intent(Intent.ACTION_PENDING_INCIDENT_REPORTS_CHANGED); intent.setComponent(receiver); intent.setComponent(receiver); final BroadcastOptions options = BroadcastOptions.makeBasic(); options.setBackgroundActivityStartsAllowed(true); // Send it to the primary user. // Send it to the primary user. mContext.sendBroadcastAsUser(intent, UserHandle.getUserHandleForUid(primaryUser), mContext.sendBroadcastAsUser(intent, UserHandle.getUserHandleForUid(primaryUser), android.Manifest.permission.APPROVE_INCIDENT_REPORTS); android.Manifest.permission.APPROVE_INCIDENT_REPORTS, options.toBundle()); } } /** /** Loading Loading
services/core/java/com/android/server/incident/PendingReports.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.server.incident; package com.android.server.incident; import android.app.AppOpsManager; import android.app.AppOpsManager; import android.app.BroadcastOptions; import android.content.ComponentName; import android.content.ComponentName; import android.content.Context; import android.content.Context; import android.content.Intent; import android.content.Intent; Loading Loading @@ -358,10 +359,12 @@ class PendingReports { private void sendBroadcast(ComponentName receiver, int primaryUser) { private void sendBroadcast(ComponentName receiver, int primaryUser) { final Intent intent = new Intent(Intent.ACTION_PENDING_INCIDENT_REPORTS_CHANGED); final Intent intent = new Intent(Intent.ACTION_PENDING_INCIDENT_REPORTS_CHANGED); intent.setComponent(receiver); intent.setComponent(receiver); final BroadcastOptions options = BroadcastOptions.makeBasic(); options.setBackgroundActivityStartsAllowed(true); // Send it to the primary user. // Send it to the primary user. mContext.sendBroadcastAsUser(intent, UserHandle.getUserHandleForUid(primaryUser), mContext.sendBroadcastAsUser(intent, UserHandle.getUserHandleForUid(primaryUser), android.Manifest.permission.APPROVE_INCIDENT_REPORTS); android.Manifest.permission.APPROVE_INCIDENT_REPORTS, options.toBundle()); } } /** /** Loading