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

Commit c6beb410 authored by Paul Chang's avatar Paul Chang Committed by Automerger Merge Worker
Browse files

Merge "Send intent to let calling app know that user checks consent." into...

Merge "Send intent to let calling app know that user checks consent." into rvc-dev am: b8a9f46f am: 4c52f235

Change-Id: I6ccb2a9a799321dc1f9ff2b06877cf57ddd98b63
parents b1097b99 4c52f235
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -50,6 +50,9 @@ import java.util.List;
 */
 */
public class IncidentCompanionService extends SystemService {
public class IncidentCompanionService extends SystemService {
    static final String TAG = "IncidentCompanionService";
    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
     * Dump argument for proxying restricted image dumps to the services
@@ -89,6 +92,12 @@ public class IncidentCompanionService extends SystemService {


            final long ident = Binder.clearCallingIdentity();
            final long ident = Binder.clearCallingIdentity();
            try {
            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,
                mPendingReports.authorizeReport(callingUid, callingPackage,
                        receiverClass, reportId, flags, listener);
                        receiverClass, reportId, flags, listener);
            } finally {
            } finally {