Loading src/com/android/contacts/ContactsUtils.java +10 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import com.android.contacts.model.AccountTypeManager; import com.android.contacts.model.AccountWithDataSet; import com.android.contacts.test.NeededForTesting; import com.android.contacts.util.Constants; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.database.Cursor; Loading @@ -45,6 +45,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 Loading Loading @@ -270,6 +273,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; } Loading Loading
src/com/android/contacts/ContactsUtils.java +10 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import com.android.contacts.model.AccountTypeManager; import com.android.contacts.model.AccountWithDataSet; import com.android.contacts.test.NeededForTesting; import com.android.contacts.util.Constants; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.database.Cursor; Loading @@ -45,6 +45,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 Loading Loading @@ -270,6 +273,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; } Loading