2018-09-08 03:08:24 +02:00
|
|
|
|
-- README for frameworks/opt/telephony --
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
This directory contains telephony libraries which function as the
|
|
|
|
|
implementation code for APIs in TelephonyManager, SubscriptionManager,
|
|
|
|
|
SmsManager and others.
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
These libraries run in the com.android.phone process and exist to support
|
|
|
|
|
telephony services created by the user’s apps (generally carrier apps), or by
|
|
|
|
|
the system. This includes making phone calls, sending SMS/MMS, and connecting
|
|
|
|
|
to data. Many APIs are plumbed down to the radio through HIDL calls defined in
|
|
|
|
|
hardware/interfaces/radio/ hardware/interfaces/radio/config and return values
|
|
|
|
|
that are sent back up as responses.
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
We define several AIDL interfaces in frameworks/base/telephony/ which we
|
|
|
|
|
implement in this directory and packages/services/Telephony. This IPC scheme
|
|
|
|
|
allows us to run public API code in the calling process, while the
|
|
|
|
|
telephony-related code runs in the privileged com.android.phone process. Such
|
2023-04-14 17:36:23 +02:00
|
|
|
|
implementations include PhoneInterfaceManager, SubscriptionManagerService and
|
2018-09-08 03:08:24 +02:00
|
|
|
|
others.
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
The declaration of the com.android.phone process is in
|
|
|
|
|
packages/services/telephony and the top-level application class is PhoneApp,
|
|
|
|
|
which initializes everything else.
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
-- Testing --
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
Unit tests are found in frameworks/opt/telephony/tests and can be
|
|
|
|
|
run on a device connected through ADB with the command:
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
atest FrameworksTelephonyTests
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
Tests can also be run individually or by class:
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
atest <testClassName
|
|
|
|
|
atest <testClassName>#<testMethodName>
|
2013-03-22 19:10:25 +01:00
|
|
|
|
|
2018-09-08 03:08:24 +02:00
|
|
|
|
For more on atest run `atest --help`
|