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

Commit 928cb3f9 authored by William Luh's avatar William Luh Committed by Android Git Automerger
Browse files

am aa396d3e: resolved conflicts for merge of 8df53636 to jb-mr1-dev

* commit 'aa396d3e':
  Set explicit destination for CALL_PRIVILEGED
parents f31bca4f aa396d3e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.contacts;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
@@ -46,6 +47,9 @@ public class ContactsUtils {
    private static final String TAG = "ContactsUtils";
    private static final String WAIT_SYMBOL_AS_STRING = String.valueOf(PhoneNumberUtils.WAIT);

    private static final ComponentName CALL_INTENT_DESTINATION = new ComponentName(
            "com.android.phone", "com.android.phone.PrivilegedOutgoingCallBroadcaster");

    private static int sThumbnailSize = -1;

    // TODO find a proper place for the canonical version of these
@@ -268,6 +272,12 @@ public class ContactsUtils {
        if (callOrigin != null) {
            intent.putExtra(DialtactsActivity.EXTRA_CALL_ORIGIN, callOrigin);
        }

        // Set phone as an explicit component of CALL_PRIVILEGED intent.
        // Setting destination explicitly prevents other apps from capturing this Intent since,
        // unlike SendBroadcast, there is no API for specifying a permission on startActivity.
        intent.setComponent(CALL_INTENT_DESTINATION);

        return intent;
    }