From 273a74f532f86ac879895fa4c230b0aa76710c1c Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Fri, 6 Mar 2020 10:36:06 -0800 Subject: [PATCH] API Review: Clarify deprecated docs and rethrow from system server 1) Clarify why there are new APIs being added as @deprecated (backwards compatibility), and 2) onLineIdentificationSupplementaryServiceResponse should throw an exception instead of silently failing. Test: atest CtsTelephonyTestCases FrameworksTelephonyTests Bug: 149997057 Bug: 143987946 Fixes: 151172761 Merged-In: I5c2bacad43917a6ecad49dcf9d3213b3472534cc Change-Id: I5c2bacad43917a6ecad49dcf9d3213b3472534cc --- telephony/java/android/telephony/ims/ImsUtListener.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/telephony/java/android/telephony/ims/ImsUtListener.java b/telephony/java/android/telephony/ims/ImsUtListener.java index bc12404461c77..460a032ce7e04 100644 --- a/telephony/java/android/telephony/ims/ImsUtListener.java +++ b/telephony/java/android/telephony/ims/ImsUtListener.java @@ -49,7 +49,8 @@ public class ImsUtListener { * {@link ImsSsInfo#CLIR_STATUS_TEMPORARILY_RESTRICTED}, and * {@link ImsSsInfo#CLIR_STATUS_TEMPORARILY_ALLOWED}. * @deprecated Use {@link #onLineIdentificationSupplementaryServiceResponse(int, ImsSsInfo)} - * instead. + * instead, this key has been added for backwards compatibility with older proprietary + * implementations only and is being phased out. */ @Deprecated public static final String BUNDLE_KEY_CLIR = "queryClir"; @@ -60,7 +61,8 @@ public class ImsUtListener { * response. The value will be an instance of {@link ImsSsInfo}, which contains the response to * the query. * @deprecated Use {@link #onLineIdentificationSupplementaryServiceResponse(int, ImsSsInfo)} - * instead. + * instead, this key has been added for backwards compatibility with older proprietary + * implementations only and is being phased out. */ @Deprecated public static final String BUNDLE_KEY_SSINFO = "imsSsInfo"; @@ -123,7 +125,7 @@ public class ImsUtListener { try { mServiceInterface.lineIdentificationSupplementaryServiceResponse(id, configuration); } catch (RemoteException e) { - Log.w(LOG_TAG, "onLineIdentificationSupplementaryServicesResponse: remote exception"); + e.rethrowFromSystemServer(); } }