Merge "Do not crash clients when service is not available" into udc-dev am: 5434a53c8e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21574159

Change-Id: Ib1768abaa49f6c3a11c21525528e6195e364a6f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jack Yu
2023-02-24 06:22:19 +00:00
committed by Automerger Merge Worker

View File

@@ -4401,7 +4401,6 @@ public class SubscriptionManager {
* *
* @throws IllegalArgumentException if subscription is invalid. * @throws IllegalArgumentException if subscription is invalid.
* @throws SecurityException if the caller doesn't have permissions required. * @throws SecurityException if the caller doesn't have permissions required.
* @throws IllegalStateException if subscription service is not available.
* *
* @hide * @hide
*/ */
@@ -4418,8 +4417,7 @@ public class SubscriptionManager {
if (iSub != null) { if (iSub != null) {
return iSub.getSubscriptionUserHandle(subscriptionId); return iSub.getSubscriptionUserHandle(subscriptionId);
} else { } else {
throw new IllegalStateException("[getSubscriptionUserHandle]: " Log.e(LOG_TAG, "[getSubscriptionUserHandle]: subscription service unavailable");
+ "subscription service unavailable");
} }
} catch (RemoteException ex) { } catch (RemoteException ex) {
ex.rethrowAsRuntimeException(); ex.rethrowAsRuntimeException();