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

Commit ee00c053 authored by Jack Yu's avatar Jack Yu
Browse files

Only tearing down restricted metered data when data is enabled

Reverted the behavior introduced in ag/2091549 that causes
restricted unmetered IMS data connection disconnected.

Test: Manual
bug: 63279719
Change-Id: I03e19cb66f29e8b0f06e66ff64d64575b9345a47
parent 17a99fb6
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -904,11 +904,12 @@ public class DcTracker extends Handler {
                    if (dcac != null) {
                        final NetworkCapabilities netCaps = dcac.getNetworkCapabilitiesSync();
                        if (netCaps != null && !netCaps.hasCapability(NetworkCapabilities
                                .NET_CAPABILITY_NOT_RESTRICTED)) {
                                .NET_CAPABILITY_NOT_RESTRICTED) && !netCaps.hasCapability(
                                NetworkCapabilities.NET_CAPABILITY_NOT_METERED)) {
                            if (DBG) {
                                log("Tearing down restricted net:" + apnContext);
                                log("Tearing down restricted metered net:" + apnContext);
                            }
                            // Tearing down the restricted data call (metered or unmetered) when
                            // Tearing down the restricted metered data call when
                            // conditions change. This will allow reestablishing a new unrestricted
                            // data connection.
                            apnContext.setReason(Phone.REASON_DATA_ENABLED);