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

Commit 5d0e3a34 authored by Jack Yu's avatar Jack Yu
Browse files

Temporary fix to prevent TEMPORARILY_NOT_METERED leak

Currently we are seeing TEMPORARILY_NOT_METERED occurs on non-5G
devices. This fix adds more checks to prevent incorrect
TEMPORARILY_NOT_METERED being set. Before we root cause the issue,
we only allow this bit when all of the following conditions met.

1. Devices should support 5G.
2. Carriers should support 5G unmetered data.
3. Device should camp on 5G network.

This temporary fix should be removed after we root cause the issue.

Bug: 176119724
Test: Manual
Merged-In: I2b987d24851cdb16d8457b0ec5c546ace5485ed0
Change-Id: I2b987d24851cdb16d8457b0ec5c546ace5485ed0
parent 6e816f44
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3928,6 +3928,13 @@ public class CarrierConfigManager {
    public static final String KEY_USE_LOWER_MTU_VALUE_IF_BOTH_RECEIVED =
            "use_lower_mtu_value_if_both_received";

    /**
     * Indicates temporarily unmetered mobile data is supported by the carrier.
     * @hide
     */
    public static final String KEY_NETWORK_TEMP_NOT_METERED_SUPPORTED_BOOL =
            "network_temp_not_metered_supported_bool";

    /** The default value for every variable. */
    private final static PersistableBundle sDefaults;

@@ -4466,6 +4473,7 @@ public class CarrierConfigManager {
        sDefaults.putBoolean(KEY_DISABLE_DUN_APN_WHILE_ROAMING_WITH_PRESET_APN_BOOL, false);
        sDefaults.putString(KEY_DEFAULT_PREFERRED_APN_NAME_STRING, "");
        sDefaults.putBoolean(KEY_USE_LOWER_MTU_VALUE_IF_BOTH_RECEIVED, false);
        sDefaults.putBoolean(KEY_NETWORK_TEMP_NOT_METERED_SUPPORTED_BOOL, false);
    }

    /**