summaryrefslogtreecommitdiff
path: root/telephony/common/com
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2021-05-12Add validity check to detect invalid PDUs.Amit Mahajan
Test: manual Bug: 181382933 Change-Id: I32cdca12c279bf0514a8b7d102d5b4b6b0d76314
2021-05-11Merge "Fix incorrect package in PackageChangeReceiver" am: 0ee8641209 am: ↵Anton Hansson
03c08d1f14 am: 3da1090ce6 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699739 Change-Id: Ib3596c8941803cfc7e55d47e2099d38857ade59c
2021-05-10Fix incorrect package in PackageChangeReceiverAnton Hansson
This class is meant to be internal but accidentally had the wrong package name set. Rectify that to avoid it appearing in documentation. Test: diff docs with internal filter applied, verify PCR is gone. Change-Id: I498d460a524c878aafdf4f1a4497fcc51979c343
2021-05-05Avoid spurious logging for read device identifier denial.Amit Mahajan
The change is to avoid reporting failure if the check is done as part of an intermediate step. Test: manual Bug: 151875019 Change-Id: Id181063a34d311adfd09912d1ecb3508c444e798
2021-04-30Merge "Add the ability to get Accept-Contact header params" am: 71a05ba2b4 ↵Brad Ebinger
am: 0c5b322274 am: 1c5ed5e364 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1690090 Change-Id: Ibb8e787a5acdc66049e175954376141efab9e75d
2021-04-28Add the ability to get Accept-Contact header paramsBrad Ebinger
- Add the ability to get tag param from from and to headers - Add the ability to parse Accept-Contact header feature tags that start with "+" for session tracking. Test: CtsTelephonyTestCase:SipDelegateManagerTest TeleServiceTests Bug: 173828358 Change-Id: I29aca0911a6600b99bc462ea816bdd283751ea00
2021-04-28Merge "Expose parsing util methods for telephony validation" am: 5092ae8c8b ↵Treehugger Robot
am: 2bf2f964d7 am: ad03a4a172 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1665959 Change-Id: I9116d44ad96ac2a4af5631541c6b27fe1813c81d
2021-04-26Expose parsing util methods for telephony validationBrad Ebinger
Bug: 173828358 Test: atest TeleServiceTests Change-Id: I271a36bcecb332c30f04e7fb22c45098384bc634
2021-04-21Merge "Refactor Telephony phone number access checks to LegacyPermissionMgr" ↵TreeHugger Robot
into sc-dev
2021-04-20Refactor Telephony phone number access checks to LegacyPermissionMgrMichael Groover
The TelephonyPermissions phone number access check can require several interactions with the system_server to obtain the targetSdkVersion and check the required permissions / appops for the requesting package. This commit refactors all of these checks into the LegacyPermissionManager (similar to what was previously done for the device identifier access checks), requiring only a single request to the system_server to check all non-subscriber access requirements. Fixes: 159662444 Test: atest TelephonyPermissionsTest Test: atest LegacyPermissionManagerServiceTest Test: atest SmsManagerTest Test: atest PhoneNumberTest Test: atest SubscriptionControllerTest Test: atest TelephonyManagerTest Change-Id: I6c5cdbeecc2c4a2e200dcc33eedcb9213376f1ad
2021-04-15Add null check before trying to give appOps to package.Amit Mahajan
Test: none Bug: 164209140 Change-Id: I64184e9d035be538684c42c85c869f09b048069f
2021-04-07s/enforece/enforce/Nathan Harold
Because. Bug: 157768478 Test: compilation Change-Id: I8559564a5a68fee4ed8b0543cc91ea3ca7dc36ee
2021-04-06s/enforece/enforce/Nathan Harold
Because. Bug: 157768478 Test: compilation Merged-In: I8559564a5a68fee4ed8b0543cc91ea3ca7dc36ee Change-Id: I8559564a5a68fee4ed8b0543cc91ea3ca7dc36ee
2021-03-05Merge "Parse params needed for SipDelegate routing" am: 9a13fb1dbf am: ↵Brad Ebinger
b81ca0dc24 am: 9a0a35f947 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1616689 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Idf695e8d9823448900a116a4d72d4162292ab03d
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-02-17Integrate ACCESS_IMS_SINGLE_REGISTRATION into APISBrad Ebinger
Move from MODIFY_PHONE_STATE to ACCESS_IMS_SINGLE_REGISTRATION as per design doc. Bug: 149426399 Bug: 173652571 Bug: 168923956 Test: atest CtsTelephonyTestCases Change-Id: Ie0e1198c8b9cfa0bab90407c8d35273159f63302
2021-01-15Merge "Parse SIP Messages for Transaction ID in SIP transport" am: ↵Brad Ebinger
ee0220039e am: 356c83613a am: 4a81036783 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1545324 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I261100ef4a479a2bc489b0b0fdc5526d5534adae
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-23Allow platform app to use USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER permissionMeng Wang
This permission is intended for 3rd party apps only with appops, but it's not allowed to say 'appop' without 'signature' as android:protectionLevel. So also honor platform key signed app using this permission. Bug: 174263375 Test: `atest android.telephony.cts.TelephonyManagerTest#testTelephonyManager` pass on crosshatch Change-Id: I889c9342cae09ffeeb028cede30f59f2b35b4ea7
2020-12-16Merge "Move getTargetSdk to common location" am: 9be6c4500f am: 044e52ef59 ↵Nathan Harold
am: 861a168777 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1521058 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I6f575db84203b210862981c65b99246f620ce23a
2020-12-14Send legacy default SMS change broadcast in SmsApplication.Hai Zhang
We are moving RoleManagerService into mainline, so we can't reference SmsApplication there without making it an API, and we can't simply send the broadcast in RoleManagerService because the logic isn't simple. Instead, we can simply register a role change listener in SmsApplication for sending the broadcast, similar to how it is already listening to package changes. Bug: 158736025 Test: presubmit Change-Id: I10e440499003f0ec34142a56e715caf452dbfa50
2020-12-11Move getTargetSdk to common locationNathan Harold
Bug: 148559042 Test: compilation Change-Id: Ib5d5e3591919287de819c4e329bacbda7befe76f
2020-12-10Move a subset of PermissionManager APIs into LegacyPermissionManager.Hai Zhang
And move their implementation from PermissionManagerService to LegacyPermissionService. The DefaultPermissionGrantPolicy related methods are not APIs, and are thus moved to LegacyPermissionManager and their usages are updated to use LegacyPermissionManager. The checkDeviceIdentifierAccess() method is also moved into LegacyPermissionManager, because it's merely an application of permission checking, not the permission management infra itself, and there isn't great benefit in updating it. However since it is an API, we still have to keep a delegate for it on PermissionManager, and make the delegated method @SystemApi. Bug: 158736025 Test: presubmit Test: LegacyPermissionManagerServiceTest Change-Id: Ic838f3685427217c8e0477551c3373258408983f
2020-12-08Introduce new App Ops permission USE_ICC_AUTH_WITH_DEVICE_IDENTIFIERMeng Wang
Bug: 174263375 Test: `atest android.telephony.cts.TelephonyManagerTest#testTelephonyManager` pass on crosshatch Change-Id: Ic0e919d953be0422bf78477b8de13691b25b6cc3
2020-11-12Merge "Move usage of Runnable::run to TelephonyUtils" am: 9f52302f07 am: ↵Hall Liu
e4a53f30bb am: e9f06ec2af am: 663fa0dd9a Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1496999 Change-Id: I61189a89cdcfb9fbdf865390744b5931ada9eaf3
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" am: f86cf6fb6c am: 2635bb28b4 am: ↵Treehugger Robot
9149eab591 am: 853858890b Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359902 Change-Id: I986e476cfb549ebb6e37fc81f79722b42a98361f
2020-10-30Merge "cleanup the isUpdatedSystemApp"Treehugger Robot
2020-10-29Add 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. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
2020-10-28Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang
This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
2020-10-27Add 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 Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
2020-10-06Tighten up Binder.clearCallingIdentity() usage.Jeff Sharkey
The recently added AndroidFrameworkBinderIdentity Error Prone checker examines code to ensure that any cleared identities are restored to avoid obscure security vulnerabilities. This change is a purely mechanical refactoring that adds the "final" keyword to the cleared identity to ensure that it's not accidentally modified before eventually being cleared. Here's the exact command used to generate this CL: $ find . -name "*.java" -exec sed -Ei \ 's/ (long \w+ = .+?clearCallingIdentity)/ final \1/' \ {} \; Bug: 155703208 Test: make Exempt-From-Owner-Approval: trivial refactoring Change-Id: I832c9d70c3dfcd8d669cf71939d97837becc973a
2020-09-28Rename RoleManager#getDefaultSmsPackageHall Liu
Rename to getSmsRoleHolder Fixes: 169447001 Test: atest RoleManagerTest Change-Id: I69382d460b6178e1bc229cfe5d0a613fa7bf0895
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-14[telephony] system_server should not call non forUser Settings.Secure.get* ↵Songchun Fan
methods BUG: 166312046 Test: builds Change-Id: Ib30eb22c23c7fd60ff498845a4d1876de2bb7799
2020-08-31Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)Xin Li
Bug: 166295507 Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27 Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-12Merge "Fix confusion of userId vs. uid"TreeHugger Robot
2020-07-31Merge "[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and ↵Peter Wang
guard with permission"
2020-07-31Merge "Update language to comply with Android's inclusive language guidance" ↵Tyler Gunn
am: a005cb30ed am: 3772a5b3fd am: c5ef3b9cae am: 03921ada7b am: dc82235933 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1377136 Change-Id: I99fa531f570a13fd3a27abf522383e631f86ceed
2020-07-30Fix confusion of userId vs. uidAdam Bookatz
There function was trying to get the UserHandle of a userId, but was instead treating the userId as a uid, and thereby getting the wrong UserHandle. Bug: 162543841 Test: com.android.frameworks.telephonytests (i.e. FrameworksTelephonyTests) Change-Id: I2b6f9c92f1d101fe18a5fdf54b85aa5acf9c94b0
2020-07-30Merge "Update language to comply with Android's inclusive language guidance" ↵Tyler Gunn
am: a005cb30ed am: 3772a5b3fd Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1377136 Change-Id: I2f838a951cec8f6e7af82a0cd08d99d6045f3952
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-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