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

Commit 1e9793f9 authored by Jack Yu's avatar Jack Yu
Browse files

Fixed CTS CtsUsageStatsTestCases test cases

We used the current RAT to load different carrier configuration to
determine whether the connection of a certain APN type is metered or
not. When the device is switched to IWLAN, the existing default
APN connection on cellular will be marked as unmetered based on
the current logic. This logic will be refactored when IWLAN full mode
is supported in Q.

For the short term workaround for P, we'll just mark default APN as
metered when the device is on IWLAN.

Test: CtsUsageStatsTestCases
Bug: 74540336, 77504652
Change-Id: Ib098e80d2bfd10e74c0b0dacf2cf2f217a66f7e4
parent 51c1904b
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -2068,9 +2068,14 @@ public class CarrierConfigManager {
                new String[]{"default", "mms", "dun", "supl"});
                new String[]{"default", "mms", "dun", "supl"});
        sDefaults.putStringArray(KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS,
        sDefaults.putStringArray(KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS,
                new String[]{"default", "mms", "dun", "supl"});
                new String[]{"default", "mms", "dun", "supl"});
        // By default all APNs are unmetered if the device is on IWLAN.
        // By default all APNs should be unmetered if the device is on IWLAN. However, we add
        // default APN as metered here as a workaround for P because in some cases, a data
        // connection was brought up on cellular, but later on the device camped on IWLAN. That
        // data connection was incorrectly treated as unmetered due to the current RAT IWLAN.
        // Marking it as metered for now can workaround the issue.
        // Todo: This will be fixed in Q when IWLAN full refactoring is completed.
        sDefaults.putStringArray(KEY_CARRIER_METERED_IWLAN_APN_TYPES_STRINGS,
        sDefaults.putStringArray(KEY_CARRIER_METERED_IWLAN_APN_TYPES_STRINGS,
                new String[]{});
                new String[]{"default"});


        sDefaults.putIntArray(KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY,
        sDefaults.putIntArray(KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY,
                new int[]{
                new int[]{