diff options
| author | 2020-03-27 17:18:39 +0800 | |
|---|---|---|
| committer | 2020-03-27 20:37:52 +0800 | |
| commit | 9fc4c15318fac5d39ffb4b077bdcf45dba7e7f0b (patch) | |
| tree | 6e28defa6f2d2bd7eb8a3520da0053ce2ba6a722 | |
| parent | a7b10f5623c3f338bd5c14574e54d2e10e82f0f6 (diff) | |
Send ACTION_PENDING_INCIDENT_REPORTS_CHANGED broadcast with flags
- Send ACTION_PENDING_INCIDENT_REPORTS_CHANGED broadcast with flags to let the receiver is allowed to run at foreground priority, with a shorter timeout interval.
BUG: 145790713
Test: Flash and reboot and start bugreport, then consent dialog is shown with a shorter timeout interval.
Change-Id: I495ae483854baa07cad6b992059d351a1a41a5fd
| -rw-r--r-- | services/core/java/com/android/server/incident/PendingReports.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/incident/PendingReports.java b/services/core/java/com/android/server/incident/PendingReports.java index 9fcbab71519d..f39bebf060f7 100644 --- a/services/core/java/com/android/server/incident/PendingReports.java +++ b/services/core/java/com/android/server/incident/PendingReports.java @@ -359,6 +359,8 @@ class PendingReports { private void sendBroadcast(ComponentName receiver, int primaryUser) { final Intent intent = new Intent(Intent.ACTION_PENDING_INCIDENT_REPORTS_CHANGED); intent.setComponent(receiver); + intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); + intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); final BroadcastOptions options = BroadcastOptions.makeBasic(); options.setBackgroundActivityStartsAllowed(true); |