Merge "Always startOrMigrate connection when caps change"
This commit is contained in:
@@ -3744,12 +3744,10 @@ public class Vpn {
|
|||||||
+ mUnderlyingNetworkCapabilities + " to " + nc);
|
+ mUnderlyingNetworkCapabilities + " to " + nc);
|
||||||
final NetworkCapabilities oldNc = mUnderlyingNetworkCapabilities;
|
final NetworkCapabilities oldNc = mUnderlyingNetworkCapabilities;
|
||||||
mUnderlyingNetworkCapabilities = nc;
|
mUnderlyingNetworkCapabilities = nc;
|
||||||
if (oldNc == null) {
|
if (oldNc == null || !nc.getSubscriptionIds().equals(oldNc.getSubscriptionIds())) {
|
||||||
// A new default network is available.
|
// A new default network is available, or the subscription has changed.
|
||||||
|
// Try to migrate the session, or failing that, start a new one.
|
||||||
startOrMigrateIkeSession(mActiveNetwork);
|
startOrMigrateIkeSession(mActiveNetwork);
|
||||||
} else if (!nc.getSubscriptionIds().equals(oldNc.getSubscriptionIds())) {
|
|
||||||
// Renew carrierConfig values.
|
|
||||||
maybeMigrateIkeSessionAndUpdateVpnTransportInfo(mActiveNetwork);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user