Merge "Do not crash clients when service is not available" into udc-dev

This commit is contained in:
Jack Yu
2023-02-24 03:37:27 +00:00
committed by Android (Google) Code Review

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();