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

Commit 341fb0b5 authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-16.0' into v1-pie

parents 9ab201d7 7b13c0f5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import static android.net.ConnectivityManager.TETHERING_BLUETOOTH;
import static android.net.ConnectivityManager.TETHERING_INVALID;
import static android.net.ConnectivityManager.TETHERING_USB;
import static android.net.ConnectivityManager.TETHERING_WIFI;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN;
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_INTERFACE_NAME;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_MODE;
@@ -1763,6 +1764,12 @@ public class Tethering extends BaseNetworkObserver {
            }

            public void updateUpstreamNetworkState(NetworkState ns) {
                // Disable hw offload on vpn upstream interfaces.
                // setUpstreamLinkProperties() interprets null as disable.
                if (ns != null && ns.networkCapabilities != null
                        && !ns.networkCapabilities.hasCapability(NET_CAPABILITY_NOT_VPN)) {
                    ns = null;
                }
                mOffloadController.setUpstreamLinkProperties(
                        (ns != null) ? ns.linkProperties : null);
            }