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

Commit 248dc9ea 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:15f3b32643f11b8837c6909b5137d4ebfa861b97)
Merged-In: Iba4b001da7f13f5adef27a6c24ab48981c959c3f
Change-Id: Iba4b001da7f13f5adef27a6c24ab48981c959c3f
parent ce820631
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2379,7 +2379,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);

        long token = Binder.clearCallingIdentity();