diff options
| author | Brad Ebinger <breadley@google.com> | 2021-06-30 09:30:35 -0700 |
|---|---|---|
| committer | Brad Ebinger <breadley@google.com> | 2021-06-30 09:30:35 -0700 |
| commit | 652411e898cf4c2a8158f001a699e2f22253ec03 (patch) | |
| tree | 3aeb42254b7bd4843acffcbaaec2807ca68d3e9d /src/com/android | |
| parent | 5aecbb539cc2062adc88f0abd3d8c6b9c6bb0e70 (diff) | |
| download | platform_packages_services_Telephony-652411e898cf4c2a8158f001a699e2f22253ec03.tar.gz platform_packages_services_Telephony-652411e898cf4c2a8158f001a699e2f22253ec03.tar.bz2 platform_packages_services_Telephony-652411e898cf4c2a8158f001a699e2f22253ec03.zip | |
Do not check single reg permission for destroying SipDelegate
When destroying the SipDelegate, the app may have lost single reg
permission due to it not being the default SMS app anymore. Do not
throw a SecurityException in this case, since the app would already
need a valid token (in the form of a ISipDelegate instance) in order
to call this API.
Bug: 192371276
Test: atest CtsTelephonyTestCases:SipDelegateManagerTest
Change-Id: I5681ab9ba1c4e85f4a127937250485cd4c482890
Diffstat (limited to 'src/com/android')
| -rw-r--r-- | src/com/android/phone/ImsRcsController.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/phone/ImsRcsController.java b/src/com/android/phone/ImsRcsController.java index 64e93a56d..82d64d53b 100644 --- a/src/com/android/phone/ImsRcsController.java +++ b/src/com/android/phone/ImsRcsController.java @@ -601,8 +601,11 @@ public class ImsRcsController extends IImsRcsController.Stub { @Override public void destroySipDelegate(int subId, ISipDelegate connection, int reason) { - enforceImsSingleRegistrationPermission("destroySipDelegate"); - + // Do not check permissions here - the caller needs to have a connection already from the + // create method to call this method. + if (connection == null) { + return; + } final long identity = Binder.clearCallingIdentity(); try { SipTransportController transport = getRcsFeatureController(subId).getFeature( |
