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

Commit 4f5c1e31 authored by Jin Jeong's avatar Jin Jeong Committed by Android (Google) Code Review
Browse files

Merge "New System Api: getGroupIdLevel2" into main

parents e3b19d1c 9cccd3b3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -107,3 +107,11 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

# OWNER=jinjeong TARGET=25Q2
flag {
    name: "get_group_id_level2"
    namespace: "telephony"
    description: "This flag controls to get a group id level2."
    bug:"381171540"
}
+14 −0
Original line number Diff line number Diff line
@@ -659,6 +659,20 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
                });
    }

    /**
     * Return GroupIdLevel2 for the subscriber
     */
    public String getGroupIdLevel2ForSubscriber(int subId, String callingPackage,
            String callingFeatureId) {
        return callPhoneMethodForSubIdWithPrivilegedCheck(subId,
                "getGroupIdLevel2", (phone)-> {
                    enforceTelephonyFeatureWithException(callingPackage,
                            PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION,
                            "getGroupIdLevel2ForSubscriber");
                    return phone.getGroupIdLevel2();
                });
    }

    /** Below are utility methods that abstracts the flow that many public methods use:
     *  1. Check permission: pass, throw exception, or fails (returns false).
     *  2. clearCallingIdentity.