Inter Process Communication and AIDL in the androidinternaltelephony Package

Many of the internal packages use the remote methods feature discussed in "Remote Methods and AIDL" on page 265. The TelephonyManager and PhoneStateListener classes rely on this to communicate with PhoneApp. The ServiceManager class is also used.

PhoneApp

Internal telephony API

GSM telephony implementation RIL

: G'SMRUbraVy

Figure 15-1. Layers of telephony packages

To marshall data for remote methods, the package includes AIDL files. For instance, the following AIDL comes from IPhoneStateListener.aidl:

oneway interface IPhoneStateListener {

void onServiceStateChanged(in ServiceState serviceState); void onSignalStrengthChanged(int asu); void onMessageWaitingIndicatorChanged(boolean mwi); void onCallForwardingIndicatorChanged(boolean cfi);

// we use bundle here instead of CellLocation so it can get the right subclass void onCellLocationChanged(in Bundle location);

void onCallStateChanged(int state, String incomingNumber);

void onDataConnectionStateChanged(int state);

void onDataActivity(int direction);

0 0

Post a comment