Loading telephony/java/android/telephony/SubscriptionManager.java +11 −18 Original line number Diff line number Diff line Loading @@ -3396,16 +3396,12 @@ public class SubscriptionManager { if (iSub != null) { groupUuid = iSub.createSubscriptionGroup(subIdArray, pkgForDebug); } else { if (!isSystemProcess()) { throw new IllegalStateException("telephony service is null."); } } } catch (RemoteException ex) { loge("createSubscriptionGroup RemoteException " + ex); if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } return groupUuid; } Loading Loading @@ -3446,17 +3442,13 @@ public class SubscriptionManager { if (iSub != null) { iSub.addSubscriptionsIntoGroup(subIdArray, groupUuid, pkgForDebug); } else { if (!isSystemProcess()) { throw new IllegalStateException("telephony service is null."); } } } catch (RemoteException ex) { loge("addSubscriptionsIntoGroup RemoteException " + ex); if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } } private boolean isSystemProcess() { return Process.myUid() == Process.SYSTEM_UID; Loading Loading @@ -3497,17 +3489,13 @@ public class SubscriptionManager { if (iSub != null) { iSub.removeSubscriptionsFromGroup(subIdArray, groupUuid, callingPackage); } else { if (!isSystemProcess()) { throw new IllegalStateException("telephony service is null."); } } } catch (RemoteException ex) { loge("removeSubscriptionsFromGroup RemoteException " + ex); if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } } /** * Get subscriptionInfo list of subscriptions that are in the same group of given subId. Loading Loading @@ -3562,6 +3550,11 @@ public class SubscriptionManager { } } // TODO(b/296125268) Really this method should throw, but it's common enough that for // system callers it's worth having a little magic for the system process until it's // made safer. if (result == null) result = Collections.emptyList(); return result; } Loading Loading
telephony/java/android/telephony/SubscriptionManager.java +11 −18 Original line number Diff line number Diff line Loading @@ -3396,16 +3396,12 @@ public class SubscriptionManager { if (iSub != null) { groupUuid = iSub.createSubscriptionGroup(subIdArray, pkgForDebug); } else { if (!isSystemProcess()) { throw new IllegalStateException("telephony service is null."); } } } catch (RemoteException ex) { loge("createSubscriptionGroup RemoteException " + ex); if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } return groupUuid; } Loading Loading @@ -3446,17 +3442,13 @@ public class SubscriptionManager { if (iSub != null) { iSub.addSubscriptionsIntoGroup(subIdArray, groupUuid, pkgForDebug); } else { if (!isSystemProcess()) { throw new IllegalStateException("telephony service is null."); } } } catch (RemoteException ex) { loge("addSubscriptionsIntoGroup RemoteException " + ex); if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } } private boolean isSystemProcess() { return Process.myUid() == Process.SYSTEM_UID; Loading Loading @@ -3497,17 +3489,13 @@ public class SubscriptionManager { if (iSub != null) { iSub.removeSubscriptionsFromGroup(subIdArray, groupUuid, callingPackage); } else { if (!isSystemProcess()) { throw new IllegalStateException("telephony service is null."); } } } catch (RemoteException ex) { loge("removeSubscriptionsFromGroup RemoteException " + ex); if (!isSystemProcess()) { ex.rethrowAsRuntimeException(); } } } /** * Get subscriptionInfo list of subscriptions that are in the same group of given subId. Loading Loading @@ -3562,6 +3550,11 @@ public class SubscriptionManager { } } // TODO(b/296125268) Really this method should throw, but it's common enough that for // system callers it's worth having a little magic for the system process until it's // made safer. if (result == null) result = Collections.emptyList(); return result; } Loading