From 428d93afb4ff0f4c2575ac949915cbb45419768e Mon Sep 17 00:00:00 2001 From: Muralidhar Reddy Date: Thu, 3 Mar 2022 06:13:33 +0000 Subject: [PATCH] [MEP] UnsupportedOperationException is thrown when carrier app tries to download subscription. Starting with android T, old onDownloadSubscription API is deprecated and new API with portIndex is introduced. As latest LPA app is not released with new API changes, exception is occurred. Added condition to fallback to deprecated API in case if the LPA is not implemented the new API. Bug: 222257028 Test: manually tested with Google Fi activation on sunfish device Change-Id: Ifc0b828f0f60d456066386957d4bd1080bdd6ae9 --- telephony/java/android/service/euicc/EuiccService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telephony/java/android/service/euicc/EuiccService.java b/telephony/java/android/service/euicc/EuiccService.java index 7129a27c3cd6c..dc695d6a6a4b7 100644 --- a/telephony/java/android/service/euicc/EuiccService.java +++ b/telephony/java/android/service/euicc/EuiccService.java @@ -746,7 +746,7 @@ public abstract class EuiccService extends Service { result = EuiccService.this.onDownloadSubscription( slotId, portIndex, subscription, switchAfterDownload, forceDeactivateSim, resolvedBundle); - } catch (AbstractMethodError e) { + } catch (UnsupportedOperationException | AbstractMethodError e) { Log.w(TAG, "The new onDownloadSubscription(int, int, " + "DownloadableSubscription, boolean, boolean, Bundle) is not " + "implemented. Fall back to the old one.", e);