diff options
| author | 2020-03-23 21:38:28 +0800 | |
|---|---|---|
| committer | 2020-03-24 20:48:00 +0800 | |
| commit | e9de2639e0ad5913f90b5b85da7e15eb2665fe30 (patch) | |
| tree | 155a9c9833d14678ffb8523c39027271ea2db73e | |
| parent | a9fbd8e4d8e924d3803908e89b41ca9f09cd6368 (diff) | |
Send intent to let calling app know that user checks consent.
BUG: 151349662
Test: Build pass
Change-Id: I7bd8c9d52735135dfe8cc64b08c3dbd6e1a4b6c0
| -rw-r--r-- | services/core/java/com/android/server/incident/IncidentCompanionService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/incident/IncidentCompanionService.java b/services/core/java/com/android/server/incident/IncidentCompanionService.java index 87fe785ca614..ad08663a7d76 100644 --- a/services/core/java/com/android/server/incident/IncidentCompanionService.java +++ b/services/core/java/com/android/server/incident/IncidentCompanionService.java @@ -50,6 +50,9 @@ import java.util.List; */ public class IncidentCompanionService extends SystemService { static final String TAG = "IncidentCompanionService"; + // TODO(b/152289743): Expose below intent. + private static final String INTENT_CHECK_USER_CONSENT = + "com.android.internal.intent.action.CHECK_USER_CONSENT"; /** * Dump argument for proxying restricted image dumps to the services @@ -89,6 +92,12 @@ public class IncidentCompanionService extends SystemService { final long ident = Binder.clearCallingIdentity(); try { + Intent intent = new Intent(INTENT_CHECK_USER_CONSENT); + intent.setPackage(callingPackage); + intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); + intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); + getContext().sendBroadcast(intent, android.Manifest.permission.DUMP); + mPendingReports.authorizeReport(callingUid, callingPackage, receiverClass, reportId, flags, listener); } finally { |