mob*_*kid 6 android android-intent android-activity
我一直在挖掘Android 上的Contacts应用程序的源代码,以找出哪个Activity处理Intent.ACTION_CALL_PRIVILEGED.不幸的是,我找不到它的源代码.有谁知道它是如何调用的,甚至更好的地方我能找到它的来源?谢谢!
Chr*_*Orr 11
奇怪的是,Phone应用程序处理与呼叫相关的事件.;)
您可以ActivityManager在logcat中查看输出以查看哪个组件处理特定的组件Intent.
来自Contacts源代码:
Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
Uri.fromParts("tel", number, null));
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
您可以Intent在命令行上重现此:
adb -e shell am start -a android.intent.action.CALL_PRIVILEGED -d tel:12345
这导致以下(格式良好的)logcat输出:
Starting activity: Intent {
act=android.intent.action.CALL_PRIVILEGED
dat=tel:12345
flg=0x10000000
cmp=com.android.phone/.PrivilegedOutgoingCallBroadcaster
}
这表明com.android.phone应用程序处理此特定Intent.
| 归档时间: |
|
| 查看次数: |
6949 次 |
| 最近记录: |