你是对的。它确实是com.android.internal.telephony.Call
OEM 实现的接口。更具体地说,它是com.android.internal.telephony.Phone
需要实现的接口,它使用Call
、Connection
和更多接口。
对于您的第二个问题,Google/ASOP(Android 开源项目)实际上确实为 GSM 和 CDMA 提供了所有这些类的实现。所以在接口的android源码中有一个GSMPhone
和一个实现。CDMAPhone
Phone
https://android.googlesource.com/platform/frameworks/base
如果您不想克隆整个 Android 源代码,可以克隆 git 。(frameworks/base)/telephony/java/com/android/internal/telephony/
在gsm/
orcdma/
文件夹下查看。在这里,您将找到例如您所询问GSMCall.java
的接口的实现。com.android.internal.telephony.Call
android 电话堆栈看起来大概是这样的:
+------------------------------------+
| Phone | Contacts | (other apps) |
+------------------------------------+
|android internal telephony framework|
+------------------------------------+
| Radio Interface Layer (RIL) |
+------------------------------------+
| GSM/CDMA modem |
+------------------------------------+
Where the GSM/CDMA modem is usually supplied by some vendor, and the RIL layer needs to be customized for the specific GSM/CDMA modem used. So in practice vendors don't have to modify the existing implementation of the Call
, Connection
, Phone
, etc. interfaces in com.android.internal.telephony
package unless they want to provide support for something different than a GSM/CDMA Phone.