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

Commit 5a1190d7 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Jeff Sharkey
Browse files

Only allow ownership changes via shell.

Changing of subscription plan ownership is only allowed via the shell
user for debugging or testing purposes.

Bug: 148627993
Test: atest android.telephony.cts.SubscriptionManagerTest
Change-Id: I5606d8b6b7325ae55b2390ef9b437debce53b549
parent 96ca8119
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3350,6 +3350,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
     * existing plans; it simply lets the debug package define new plans.
     */
    void setSubscriptionPlansOwner(int subId, String packageName) {
        mContext.enforceCallingOrSelfPermission(NETWORK_SETTINGS, TAG);
        SystemProperties.set(PROP_SUB_PLAN_OWNER + "." + subId, packageName);
    }