Loading src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java +10 −3 Original line number Original line Diff line number Diff line Loading @@ -4129,6 +4129,9 @@ public class SubscriptionManagerService extends ISub.Stub { * Returns whether the given subscription is associated with the calling user. * Returns whether the given subscription is associated with the calling user. * * * @param subscriptionId the subscription ID of the subscription * @param subscriptionId the subscription ID of the subscription * @param callingPackage The package making the call * @param callingFeatureId The feature in the package * * @return {@code true} if the subscription is associated with the user that the calling process * @return {@code true} if the subscription is associated with the user that the calling process * is running in; {@code false} otherwise. * is running in; {@code false} otherwise. * * Loading @@ -4136,9 +4139,13 @@ public class SubscriptionManagerService extends ISub.Stub { * @throws SecurityException if the caller doesn't have permissions required. * @throws SecurityException if the caller doesn't have permissions required. */ */ @Override @Override public boolean isSubscriptionAssociatedWithCallingUser(int subscriptionId) { public boolean isSubscriptionAssociatedWithCallingUser(int subscriptionId, enforcePermissions("isSubscriptionAssociatedWithCallingUser", @NonNull String callingPackage, @Nullable String callingFeatureId) { Manifest.permission.READ_PHONE_STATE); if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mContext, subscriptionId, callingPackage, callingFeatureId, "isSubscriptionAssociatedWithCallingUser")) { throw new SecurityException("Need READ_PHONE_STATE, READ_PRIVILEGED_PHONE_STATE, or " + "carrier privilege"); } UserHandle myUserHandle = UserHandle.of(UserHandle.getCallingUserId()); UserHandle myUserHandle = UserHandle.of(UserHandle.getCallingUserId()); return mFeatureFlags.subscriptionUserAssociationQuery() return mFeatureFlags.subscriptionUserAssociationQuery() Loading Loading
src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java +10 −3 Original line number Original line Diff line number Diff line Loading @@ -4129,6 +4129,9 @@ public class SubscriptionManagerService extends ISub.Stub { * Returns whether the given subscription is associated with the calling user. * Returns whether the given subscription is associated with the calling user. * * * @param subscriptionId the subscription ID of the subscription * @param subscriptionId the subscription ID of the subscription * @param callingPackage The package making the call * @param callingFeatureId The feature in the package * * @return {@code true} if the subscription is associated with the user that the calling process * @return {@code true} if the subscription is associated with the user that the calling process * is running in; {@code false} otherwise. * is running in; {@code false} otherwise. * * Loading @@ -4136,9 +4139,13 @@ public class SubscriptionManagerService extends ISub.Stub { * @throws SecurityException if the caller doesn't have permissions required. * @throws SecurityException if the caller doesn't have permissions required. */ */ @Override @Override public boolean isSubscriptionAssociatedWithCallingUser(int subscriptionId) { public boolean isSubscriptionAssociatedWithCallingUser(int subscriptionId, enforcePermissions("isSubscriptionAssociatedWithCallingUser", @NonNull String callingPackage, @Nullable String callingFeatureId) { Manifest.permission.READ_PHONE_STATE); if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mContext, subscriptionId, callingPackage, callingFeatureId, "isSubscriptionAssociatedWithCallingUser")) { throw new SecurityException("Need READ_PHONE_STATE, READ_PRIVILEGED_PHONE_STATE, or " + "carrier privilege"); } UserHandle myUserHandle = UserHandle.of(UserHandle.getCallingUserId()); UserHandle myUserHandle = UserHandle.of(UserHandle.getCallingUserId()); return mFeatureFlags.subscriptionUserAssociationQuery() return mFeatureFlags.subscriptionUserAssociationQuery() Loading