Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d36eb99 authored by rambowang's avatar rambowang Committed by Rambo Wang
Browse files

Fix CarrierApiTest#testOpportunistic CTS case failure

setOpportunistic in SubscriptionManagerService tris to call
method TelephonyPermissions.enforceAnyPermissionGrantedOrCarrierPrivileges
with the second and third parameter (subscription id v.s. calling uid) reversed.

This CL fixes the issue by calling the same method with righ parameters.

Bug: 335101735
Test: atest CarrierApiTest
Change-Id: Iba4b001da7f13f5adef27a6c24ab48981c959c3f
(cherry picked from commit 15f3b326)
parent 3d72680f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2486,7 +2486,7 @@ public class SubscriptionManagerService extends ISub.Stub {
    })
    public int setOpportunistic(boolean opportunistic, int subId, @NonNull String callingPackage) {
        TelephonyPermissions.enforceAnyPermissionGrantedOrCarrierPrivileges(
                mContext, Binder.getCallingUid(), subId, true, "setOpportunistic",
                mContext, subId, Binder.getCallingUid(), true, "setOpportunistic",
                Manifest.permission.MODIFY_PHONE_STATE);

        enforceTelephonyFeatureWithException(callingPackage, "setOpportunistic");