Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 1 | -- README for frameworks/opt/telephony -- |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 2 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 3 | This directory contains telephony libraries which function as the |
| 4 | implementation code for APIs in TelephonyManager, SubscriptionManager, |
| 5 | SmsManager and others. |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 6 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 7 | These libraries run in the com.android.phone process and exist to support |
| 8 | telephony services created by the user’s apps (generally carrier apps), or by |
| 9 | the system. This includes making phone calls, sending SMS/MMS, and connecting |
| 10 | to data. Many APIs are plumbed down to the radio through HIDL calls defined in |
| 11 | hardware/interfaces/radio/ hardware/interfaces/radio/config and return values |
| 12 | that are sent back up as responses. |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 13 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 14 | We define several AIDL interfaces in frameworks/base/telephony/ which we |
| 15 | implement in this directory and packages/services/Telephony. This IPC scheme |
| 16 | allows us to run public API code in the calling process, while the |
| 17 | telephony-related code runs in the privileged com.android.phone process. Such |
Jack Yu | c97b4ba | 2023-04-14 08:36:23 -0700 | [diff] [blame] | 18 | implementations include PhoneInterfaceManager, SubscriptionManagerService and |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 19 | others. |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 20 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 21 | The declaration of the com.android.phone process is in |
| 22 | packages/services/telephony and the top-level application class is PhoneApp, |
| 23 | which initializes everything else. |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 24 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 25 | -- Testing -- |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 26 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 27 | Unit tests are found in frameworks/opt/telephony/tests and can be |
| 28 | run on a device connected through ADB with the command: |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 29 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 30 | atest FrameworksTelephonyTests |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 31 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 32 | Tests can also be run individually or by class: |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 33 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 34 | atest <testClassName |
| 35 | atest <testClassName>#<testMethodName> |
Wink Saville | ff4e317 | 2013-03-22 11:10:25 -0700 | [diff] [blame] | 36 | |
Jordan Liu | da4e8b1 | 2018-09-07 18:08:24 -0700 | [diff] [blame] | 37 | For more on atest run `atest --help` |