Loading telephony/java/android/telephony/SubscriptionInfo.java +0 −11 Original line number Diff line number Diff line Loading @@ -551,7 +551,6 @@ public class SubscriptionInfo implements Parcelable { * * @param context Context of the application to check. * @return whether the app is authorized to manage this subscription per its metadata. * @throws UnsupportedOperationException if this subscription is not embedded. * @hide * @deprecated - Do not use. */ Loading @@ -567,15 +566,11 @@ public class SubscriptionInfo implements Parcelable { * @param context Any context. * @param packageName Package name of the app to check. * @return whether the app is authorized to manage this subscription per its metadata. * @throws UnsupportedOperationException if this subscription is not embedded. * @hide * @deprecated - Do not use. */ @Deprecated public boolean canManageSubscription(Context context, String packageName) { if (!isEmbedded()) { throw new UnsupportedOperationException("Not an embedded subscription"); } List<UiccAccessRule> allAccessRules = getAllAccessRules(); if (allAccessRules == null) { return false; Loading Loading @@ -606,9 +601,6 @@ public class SubscriptionInfo implements Parcelable { */ @SystemApi public @Nullable List<UiccAccessRule> getAccessRules() { if (!isEmbedded()) { throw new UnsupportedOperationException("Not an embedded subscription"); } if (mNativeAccessRules == null) return null; return Arrays.asList(mNativeAccessRules); } Loading @@ -619,9 +611,6 @@ public class SubscriptionInfo implements Parcelable { * @hide */ public @Nullable List<UiccAccessRule> getAllAccessRules() { if (!isEmbedded()) { throw new UnsupportedOperationException("Not an embedded subscription"); } List<UiccAccessRule> merged = new ArrayList<>(); if (mNativeAccessRules != null) merged.addAll(getAccessRules()); if (mCarrierConfigAccessRules != null) { Loading telephony/java/android/telephony/SubscriptionManager.java +1 −6 Original line number Diff line number Diff line Loading @@ -2588,7 +2588,6 @@ public class SubscriptionManager { * * @param info The subscription to check. * @return whether the app is authorized to manage this subscription per its metadata. * @throws IllegalArgumentException if this subscription is not embedded. */ public boolean canManageSubscription(SubscriptionInfo info) { return canManageSubscription(info, mContext.getPackageName()); Loading @@ -2604,13 +2603,9 @@ public class SubscriptionManager { * @param info The subscription to check. * @param packageName Package name of the app to check. * @return whether the app is authorized to manage this subscription per its access rules. * @throws IllegalArgumentException if this subscription is not embedded. * @hide */ public boolean canManageSubscription(SubscriptionInfo info, String packageName) { if (!info.isEmbedded()) { throw new IllegalArgumentException("Not an embedded subscription"); } if (info.getAllAccessRules() == null) { return false; } Loading Loading @@ -3012,7 +3007,7 @@ public class SubscriptionManager { // to the caller. boolean hasCarrierPrivilegePermission = TelephonyManager.from(mContext) .hasCarrierPrivileges(info.getSubscriptionId()) || (info.isEmbedded() && canManageSubscription(info)); || canManageSubscription(info); return hasCarrierPrivilegePermission; } Loading Loading
telephony/java/android/telephony/SubscriptionInfo.java +0 −11 Original line number Diff line number Diff line Loading @@ -551,7 +551,6 @@ public class SubscriptionInfo implements Parcelable { * * @param context Context of the application to check. * @return whether the app is authorized to manage this subscription per its metadata. * @throws UnsupportedOperationException if this subscription is not embedded. * @hide * @deprecated - Do not use. */ Loading @@ -567,15 +566,11 @@ public class SubscriptionInfo implements Parcelable { * @param context Any context. * @param packageName Package name of the app to check. * @return whether the app is authorized to manage this subscription per its metadata. * @throws UnsupportedOperationException if this subscription is not embedded. * @hide * @deprecated - Do not use. */ @Deprecated public boolean canManageSubscription(Context context, String packageName) { if (!isEmbedded()) { throw new UnsupportedOperationException("Not an embedded subscription"); } List<UiccAccessRule> allAccessRules = getAllAccessRules(); if (allAccessRules == null) { return false; Loading Loading @@ -606,9 +601,6 @@ public class SubscriptionInfo implements Parcelable { */ @SystemApi public @Nullable List<UiccAccessRule> getAccessRules() { if (!isEmbedded()) { throw new UnsupportedOperationException("Not an embedded subscription"); } if (mNativeAccessRules == null) return null; return Arrays.asList(mNativeAccessRules); } Loading @@ -619,9 +611,6 @@ public class SubscriptionInfo implements Parcelable { * @hide */ public @Nullable List<UiccAccessRule> getAllAccessRules() { if (!isEmbedded()) { throw new UnsupportedOperationException("Not an embedded subscription"); } List<UiccAccessRule> merged = new ArrayList<>(); if (mNativeAccessRules != null) merged.addAll(getAccessRules()); if (mCarrierConfigAccessRules != null) { Loading
telephony/java/android/telephony/SubscriptionManager.java +1 −6 Original line number Diff line number Diff line Loading @@ -2588,7 +2588,6 @@ public class SubscriptionManager { * * @param info The subscription to check. * @return whether the app is authorized to manage this subscription per its metadata. * @throws IllegalArgumentException if this subscription is not embedded. */ public boolean canManageSubscription(SubscriptionInfo info) { return canManageSubscription(info, mContext.getPackageName()); Loading @@ -2604,13 +2603,9 @@ public class SubscriptionManager { * @param info The subscription to check. * @param packageName Package name of the app to check. * @return whether the app is authorized to manage this subscription per its access rules. * @throws IllegalArgumentException if this subscription is not embedded. * @hide */ public boolean canManageSubscription(SubscriptionInfo info, String packageName) { if (!info.isEmbedded()) { throw new IllegalArgumentException("Not an embedded subscription"); } if (info.getAllAccessRules() == null) { return false; } Loading Loading @@ -3012,7 +3007,7 @@ public class SubscriptionManager { // to the caller. boolean hasCarrierPrivilegePermission = TelephonyManager.from(mContext) .hasCarrierPrivileges(info.getSubscriptionId()) || (info.isEmbedded() && canManageSubscription(info)); || canManageSubscription(info); return hasCarrierPrivilegePermission; } Loading