Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which activity handles Intent.ACTION_CALL_PRIVILEGED?

I've been digging for awhile into the source of the Contacts app on Android to find out which Activity handles Intent.ACTION_CALL_PRIVILEGED. Unfortunately, I couldn't find its source code. Does anyone know how it's called, or even better where I can find it's source? Thank you!

like image 884
mobilekid Avatar asked Feb 19 '10 14:02

mobilekid


1 Answers

Oddly enough, the Phone application handles call-related events. ;)

You can watch ActivityManager output in logcat to see which component handles a particular Intent.

From the Contacts source code:

Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
    Uri.fromParts("tel", number, null));
startActivity(intent);

You can reproduce this Intent on the command line:
adb -e shell am start -a android.intent.action.CALL_PRIVILEGED -d tel:12345

Which results in the following (nicely-formatted) logcat output:

Starting activity: Intent { 
    act=android.intent.action.CALL_PRIVILEGED 
    dat=tel:12345
    flg=0x10000000
    cmp=com.android.phone/.PrivilegedOutgoingCallBroadcaster
}

This shows you that the com.android.phone application handles this particular Intent.

like image 54
Christopher Orr Avatar answered Sep 30 '22 19:09

Christopher Orr