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

Commit 85bf0441 authored by Sahil Sonar's avatar Sahil Sonar 💬 Committed by Mohammed Althaf T
Browse files

Do not run POLICY_REJECT_ALL migration based on prop

parent 5df7922b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -515,6 +515,9 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {

    private static final String PROP_SUB_PLAN_OWNER = "persist.sys.sub_plan_owner";

    private static final String PROP_SKIP_MIGRATION =
            "persist.sys.skip_network_policy_migration";

    // TODO: this needs to be kept in sync with
    //  ConnectivitySettingsManager#UIDS_ALLOWED_ON_RESTRICTED_NETWORKS
    private static final String UIDS_ALLOWED_ON_RESTRICTED_NETWORKS =
@@ -3144,7 +3147,9 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {

        // There is nothing to migrate if coming from pre-12, from nothing, or from a restore.
        final boolean isMigratingFromAtLeastAndroid12 = version >= VERSION_SUPPORTED_CARRIER_USAGE;
        if (!forRestore && lineageVersion < LINEAGE_VERSION_REINSTATED_POLICY_REJECT_ALL
        final boolean skipMigration = SystemProperties.getBoolean(PROP_SKIP_MIGRATION, false);

        if (!skipMigration && !forRestore && lineageVersion < LINEAGE_VERSION_REINSTATED_POLICY_REJECT_ALL
                && isMigratingFromAtLeastAndroid12) {
            migrateToPolicyRejectAll();
        }