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

Commit 9cccd3b3 authored by jinjeong's avatar jinjeong
Browse files

New System Api: getGroupIdLevel2

- add new flag

Bug: b/381171540
Test: atest
FLAG: com.android.internal.telephony.flags.get_group_id_level2
Change-Id: Ie49c055747f6e5e9f676ba0afe9f31700868b8ba
parent 12b6dddf
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.