Merge "Prefer default Internet network for upstream tethering."

This commit is contained in:
Treehugger Robot
2018-06-25 12:08:46 +00:00
committed by Gerrit Code Review

View File

@@ -868,6 +868,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
public boolean isTetheringSupported() {
return ConnectivityService.this.isTetheringSupported();
}
@Override
public NetworkRequest getDefaultNetworkRequest() {
return mDefaultRequest;
}
};
return new Tethering(mContext, mNetd, mStatsService, mPolicyManager,
IoThread.get().getLooper(), new MockableSystemProperties(),
@@ -885,7 +889,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
private NetworkRequest createDefaultInternetRequestForTransport(
int transportType, NetworkRequest.Type type) {
NetworkCapabilities netCap = new NetworkCapabilities();
final NetworkCapabilities netCap = new NetworkCapabilities();
netCap.addCapability(NET_CAPABILITY_INTERNET);
netCap.addCapability(NET_CAPABILITY_NOT_RESTRICTED);
if (transportType > -1) {