summaryrefslogtreecommitdiff
path: root/telephony/common
AgeCommit message (Collapse)Author
2021-03-05Merge "Parse params needed for SipDelegate routing"Brad Ebinger
2021-03-04Parse params needed for SipDelegate routingBrad Ebinger
Add getViaBranchParameter and getCallId parameter to SipMessage API in order to allow the SipDelegate to quickly route SipMessages without requiring the app to peak into the headers. Bug: 181591815 Test: atest CtsTelephonyTestCases Change-Id: Iac94f73335ac5caa634b31c10a675aaf91c13af7
2021-03-02Define new permission to perform IMS RCS Reg actions and integrate ↵Brad Ebinger
ACCESS_IMS_SINGLE_REGISTRATION into APIS Move from MODIFY_PHONE_STATE to ACCESS_IMS_SINGLE_REGISTRATION as per design doc. Bug: 149426399 Bug: 173652571 Bug: 168923956 Test: atest CtsTelephonyTestCases Merged-In: I6d4ae879d9d2b347f6576ea20f9e42454b39936b Merged-In: Idabfda6853ec2a24544da5253ad0e43c47a6cc69 Change-Id: Ie0e1198c8b9cfa0bab90407c8d35273159f63302
2021-01-12Parse SIP Messages for Transaction ID in SIP transportBrad Ebinger
In cases where the framework/ImsService is not available, locally extract the transaction ID from the SipMessage in order to call the appropriate error method back to the caller. Bug: 173828358 Test: atest FrameworksTelephonyTests:SipMessageParsingUtilsTest Change-Id: I4ff5ed9ad4492e817c4a687e90d3a294e5514d8b
2020-12-11Move getTargetSdk to common locationNathan Harold
Bug: 148559042 Test: compilation Change-Id: Ib5d5e3591919287de819c4e329bacbda7befe76f
2020-11-12Merge "Move usage of Runnable::run to TelephonyUtils"Hall Liu
2020-11-11Move usage of Runnable::run to TelephonyUtilsHall Liu
Using Runnable::run in com.android.internal.telephony from this directory will conflict with any usages from frameworks/opt/telephony since the compiles apparently scopes method references at the package level. Move it to TelephonyUtils (which is in the .util sub-package) to avoid the conflict. Bug: 156779270 Test: build Change-Id: I3471162eecde869aea66533de0355b3214859098
2020-11-04Add maxTargetSdk restriction to unused APIs.Mathew Inwood
These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-10-30Merge "cleanup the isUpdatedSystemApp"Treehugger Robot
2020-09-23Create Central Version of dataStateToString()Nathan Harold
There are currently two slightly-different copies of dataStateToString(). -TelephonyManager#dataStateToString() -TelephonyRegistry#dataStateToString() The TelephonyRegistry version doesn't have a string for the DISCONNECTING state. In order to have a single copy that can be accessed from TelephonyRegistry (not mainline) and TelephonyManager (mainline), move both copies to TelephonyUtils. Bug: 149717408 Test: make; atest TelephonyRegistryTest Merged-In: I36945a8a432f7b4f0c449f7414996372e852b5b8 Change-Id: I36945a8a432f7b4f0c449f7414996372e852b5b8 (cherry picked from commit b640b1c62bdb90e81b8e21d89d658da4ba1c0f5e)
2020-09-02Merge RP1A.200720.011Xin Li
Bug: 167588565 Merged-In: Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c Change-Id: Ia8f5f008bc1f77115b644ab996aedc892fab68e7
2020-08-31Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)Xin Li
Bug: 166295507 Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27 Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-07-31Merge "[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and ↵Peter Wang
guard with permission"
2020-07-30Merge "Update language to comply with Android's inclusive language guidance"Tyler Gunn
2020-07-29Update language to comply with Android's inclusive language guidanceTyler Gunn
See https://source.android.com/setup/contribute/respectful-code for reference Test: Presubmit Bug: 161896447 Change-Id: I4142f4819f5ed3e2ffddf471b90923985e72523a
2020-07-26Allow network stack UID caller to retrieve cell identityJack Yu
For backwards compatibility, we allow phone, system UID to access cell identity through getServiceState. Cell broadcast service, which is used to be part of telephony, now is running under network stack UID. We should consider network stack UID as trustable components like system/telephony. Fix: 157618105 Test: Manual Change-Id: I9b2dfc778752e130f5c7e44c4b2e45b63ac6f918 (cherry picked from commit 56cfdd1e873c6c7762f9c7a3cde6a321b85c8ce8)
2020-07-22Skip carrier priv check for trusted UIDsHall Liu
Checking carrier privileges for UIDs with lots of shared apps can incur a significant performance hit. For UIDs that are fixed and trusted (system and phone), skip the permission check and always allow. Bug: 160971853 Test: manual verification -- observed lower rate of cache misses for getPackageInfo from com.android.phone. Change-Id: I1399cab579308479d7cf191b8795441cbcd3ff65 Merged-In: I1399cab579308479d7cf191b8795441cbcd3ff65
2020-07-16[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList andPeter Wang
guard with permission Bug: 150878235 Fix: 150878235 Test: Build Change-Id: I7f3b1f5170e032336d9b39b322c49e2b92573586 Merged-In: I7f3b1f5170e032336d9b39b322c49e2b92573586
2020-07-13Merge "Skip carrier priv check for trusted UIDs" into rvc-dev am: f1a6972937Hall Liu
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12141306 Change-Id: Iac6c6a95dc0df15e45e2ef4f25a3b92e162800b0
2020-07-13Skip carrier priv check for trusted UIDsHall Liu
Checking carrier privileges for UIDs with lots of shared apps can incur a significant performance hit. For UIDs that are fixed and trusted (system and phone), skip the permission check and always allow. Also, double the cache size for getPackageInfo in order to reduce the rate of cache misses. Bug: 160971853 Test: manual verification -- observed lower rate of cache misses for getPackageInfo from com.android.phone. Change-Id: I1399cab579308479d7cf191b8795441cbcd3ff65
2020-07-09cleanup the isUpdatedSystemAppSooraj Sasindran
cleanup the isUpdatedSystemApp function Test: build Change-Id: I543a30ec8e88586e672c2a54c0c0c55ae8f3ba41
2020-07-08Use FLAG_UPDATED_SYSTEM_APPSooraj Sasindran
Use FLAG_UPDATED_SYSTEM_APP find if an app is updated system app instead of MATCH_FACTORY_ONLY Bug: 148308979 Test: Unit test for CarrierAppUtils and system test to verify fi is not getting uninstalled Merged-In: I1991e98bb1edb7d0628a7011df7488fbf5de3579 Change-Id: I1991e98bb1edb7d0628a7011df7488fbf5de3579
2020-06-30allow CBR to write SMS databaseChen Xu
This is to support KR government requirement: CBR message should be available in SMS.inbox. The solution is to insert CBR message once displayed to users. this feature is disabled by default and OEM can turn it on for specific mcc per country/carrier regulations. Bug: 144749813 Test: Manual test on different messenger apps. Change-Id: I5535cefb32e89694094299f3b89321f735983ef1 Merged-in: I5535cefb32e89694094299f3b89321f735983ef1
2020-06-22Merge "Reorder TelephonyPermissions calls for carrier privileges" into ↵Michael Groover
rvc-dev am: f07d289b51 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11937063 Change-Id: Id740278bfbcae8754daa99a5ed34ebca8949d8be
2020-06-22Merge "Reorder TelephonyPermissions calls for carrier privileges" into rvc-devMichael Groover
2020-06-21Reorder TelephonyPermissions calls for carrier privilegesMichael Groover
The SubscriptionManager APIs that return SubscriptionInfo objects are often invoked by carrier privileged apps to obtain the details about the subscription(s). Identifier and phone number access checks currently verify requirements that typically cannot be satisfied by carrier privileged apps first before verifying an app holds carrier privileges. This commit invokes the carrier privileges check before the generic PermissionManagerService check for identifier access and moves the WRITE_SMS appop check after the READ_PHONE_STATE / carrier privilege check for phone number access. Bug: 157642567 Fixes: 73308711 Test: atest TelephonyPermissionsTest Test: atest SubscriptionControllerTest Change-Id: I0a446af5c2adaf1d6b06da221f9e236b1bdde146
2020-06-18Merge changes from topic "bugreport-stub" into rvc-dev am: 9568960297Hunter Knepshield
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11856802 Change-Id: I29f29e33157cec7f99d2966acc2a57940ff346d3
2020-06-16Reevaluate some carrier-associated apps' status on SDK changes.Hunter Knepshield
If a carrier-associated app is added to the system image after the device is initially launched (e.g. Q -> R OTA), the logic to disable apps without a corresponding SIM will not run, leaving the app in an enabled state in more cases than there should be. To safely account for this, we only reevaluate on SDK change for apps whose addedInSdk value falls within the range since the last time we evaluated carrier apps' statuses. Apps that set lower (or higher) SDK versions are ignored. We choose *not* to use minimum or target SDK version here because it's more likely to change with each OTA / prebuilt, which could cause unintended disable operations (or lack thereof). Bug: 154872019 Test: manual, QA, atest FrameworksTelephonyTests:CarrierAppUtilsTest Change-Id: I97ddfa03f34e7d00e66ce7cd508d6d2a5e83fbc2
2020-06-10Merge "Revert "Add a blacklist for preinstalled carrier apps."" into rvc-dev ↵TreeHugger Robot
am: ddb640a883 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11809242 Change-Id: I1e6065569e0d1daed0afb633356be11385a1b651
2020-06-09Revert "Add a blacklist for preinstalled carrier apps."Andrew Sapperstein
This reverts commit 1a3158b8e17cfe81e4576c9f64522704de892481. Reason for revert: The carrier for which this was needed has been updated to no longer require this change. Change-Id: I5d07bd7ce4bde11a287f44ad2ff97370d4c30db6 Merged-In: I5d07bd7ce4bde11a287f44ad2ff97370d4c30db6 Bug: 138150105 Fixes: 157957579 Test: verify that app is no longer there
2020-05-19Merge "allow CBR to write SMS database" into rvc-dev am: b44d6d6d48Chen Xu
Change-Id: I3c46cf90de5ca91a30fb603e8bc8f882bbb32b09
2020-05-14Merge "Add a helper function to query CBR package name." am: 6bf3920e7dAmit Mahajan
Change-Id: I873c17da960023340faf51bab0d611b4e0b748cb
2020-05-14Add a helper function to query CBR package name.Amit Mahajan
Test: manual Bug: 154436403 Change-Id: Id1e77abc4df88a3d5c3f28b366a7dfb415a2bbb0 Merged-in: Id1e77abc4df88a3d5c3f28b366a7dfb415a2bbb0 (cherry picked from commit 6c99ce67524871e1cd25d883287193f33fbfac3f)
2020-05-13allow CBR to write SMS databaseChen Xu
This is to support KR government requirement: CBR message should be available in SMS.inbox. The solution is to insert CBR message once displayed to users. this feature is disabled by default and OEM can turn it on for specific mcc per country/carrier regulations. Bug: 144749813 Test: Manual test on different messenger apps. Change-Id: I5535cefb32e89694094299f3b89321f735983ef1
2020-05-07Merge "Add a helper function to query CBR package name." into rvc-dev am: ↵TreeHugger Robot
20b8e917b5 Change-Id: I49771951b8784010e291ef812f62a483ace8ebe8
2020-05-06Add a helper function to query CBR package name.Amit Mahajan
Test: manual Bug: 154436403 Change-Id: Id1e77abc4df88a3d5c3f28b366a7dfb415a2bbb0 Merged-in: Id1e77abc4df88a3d5c3f28b366a7dfb415a2bbb0
2020-04-14Merge changes from topic "msisdn" am: 06a2db194fSarah Chin
Change-Id: Ic88fbfa867a105b5c687fe9481b16910eb08a226
2020-04-14Move getMsisdn and getLine1Number to READ_PHONE_NUMBERS am: 1ace38473cRobert Greenwalt
Change-Id: Ic6ccd682bf19ef5862078e3e785fe5bbf68d66df
2020-04-14Update READ_PHONE_NUMBER security checksSarah Chin
For SDK R+, READ_PRIVILEGE_PHONE_STATE and carrier privilege should allow access. Test: atest TelephonyPermissionsTest Bug: 151952050 Change-Id: Ie97d0b195937d4729875afd1e74357c1284e101f Merged-In: Ie97d0b195937d4729875afd1e74357c1284e101f
2020-04-14Move getMsisdn and getLine1Number to READ_PHONE_NUMBERSRobert Greenwalt
This is done to get dangerous stuff off the READ_PHONE_STATE permission. Also keeping READ_PHONE_STATE for apps targeting old SDK versions. Refactored getPhoneNumber to allow READ_PHONE_STATE pre-R Bug: 136160623 Test: atest SubInfoControllerTest, TelephonyPermissionsTest Change-Id: I5c0adcbe432ffcbb22ac8959792ee60da7039f15 Merged-In: I5c0adcbe432ffcbb22ac8959792ee60da7039f15
2020-04-08Merge "Fix order of uid/pid in LocationAccessPolicy" into rvc-dev am: f6d37fc03fHall Liu
Change-Id: I251886aafa2269c90461e22d53c3a388a0441a92
2020-04-07resolve merge conflicts of 2994fd8537885391ddc56c4db94f5099f28442e7 to ↵Hall Liu
qt-qpr1-dev-plus-aosp Change-Id: I1b47624f6d2f43fbb860b42483d08590d5e80ce8
2020-04-07Fix order of uid/pid in LocationAccessPolicyHall Liu
Fix the order in which uid and pid are passed into the permission check. Test: atest LocationAccessPolicyTest Fixes: 151330809 Change-Id: I479c8fc123d5a994e8cbe6489aa00bea4abca1c7 (cherry picked from commit 0cd4dbc0b3993f7e48c4a30ce715e5405fce4fbf)
2020-03-27Merge "Clean up device identifier access logging" into rvc-dev am: 01be396381Michael Groover
Change-Id: I7bc1ebbf13d1aa484923f311de189e3610443bd7
2020-03-27Merge "Clean up device identifier access logging" into rvc-devMichael Groover
2020-03-25Clean up device identifier access loggingMichael Groover
This commit removes the log message from DevicePolicyManagerService when a caller fails the access requirements as it can be confusing if the caller subsequently passes a carrier privilege check and can access identifiers, or in the case where the caller does not have access a similar entry is logged by TelephonyPermissions. The subId for which the carrier privilege check is performed is also logged to facilitate debugging. Bug: 152117976 Test: atest SubscriptionControllerTest Change-Id: I6d88d739a0d9053e8eff32d74d90009699abe8fc
2020-03-26Merge "Revert "Expose hidden resources used in telephony/common""Sarah Chin
2020-03-26Merge "Update READ_PHONE_NUMBER security checks" into rvc-dev am: b98be8b6a9TreeHugger Robot
Change-Id: I3fcdfcfc72a164021570cafaeb0e28208e378e71
2020-03-25Update READ_PHONE_NUMBER security checksSarah Chin
For SDK R+, READ_PRIVILEGE_PHONE_STATE and carrier privilege should allow access. Test: atest TelephonyPermissionsTest Bug: 151952050 Change-Id: Ie97d0b195937d4729875afd1e74357c1284e101f
2020-03-21Merge "Refactor device ID access SystemAPI to PermissionManager" into ↵Michael Groover
rvc-dev am: ffd92af9a5 Change-Id: I1e41bc3f2f5419ff8103d8688dac4508fb4ae845