Merge changes from topics "kpFromCarrier", "noNetCapNoMigration" am: ce27c182f0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2469686 Change-Id: I918e31c95d1a793a2d4b75212904e9219600ba1b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3302,8 +3302,6 @@ public class Vpn {
|
|||||||
mUnderlyingLinkProperties = null;
|
mUnderlyingLinkProperties = null;
|
||||||
mUnderlyingNetworkCapabilities = null;
|
mUnderlyingNetworkCapabilities = null;
|
||||||
mRetryCount = 0;
|
mRetryCount = 0;
|
||||||
|
|
||||||
startOrMigrateIkeSession(network);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -3530,11 +3528,11 @@ public class Vpn {
|
|||||||
public void onDefaultNetworkCapabilitiesChanged(@NonNull NetworkCapabilities nc) {
|
public void onDefaultNetworkCapabilitiesChanged(@NonNull NetworkCapabilities nc) {
|
||||||
final NetworkCapabilities oldNc = mUnderlyingNetworkCapabilities;
|
final NetworkCapabilities oldNc = mUnderlyingNetworkCapabilities;
|
||||||
mUnderlyingNetworkCapabilities = nc;
|
mUnderlyingNetworkCapabilities = nc;
|
||||||
// The oldNc may be null when it's not assigned yet.
|
if (oldNc == null) {
|
||||||
final boolean subIdChanged =
|
// A new default network is available.
|
||||||
(oldNc == null) || !nc.getSubscriptionIds().equals(oldNc.getSubscriptionIds());
|
startOrMigrateIkeSession(mActiveNetwork);
|
||||||
// Update carrierConfig.
|
} else if (!nc.getSubscriptionIds().equals(oldNc.getSubscriptionIds())) {
|
||||||
if (subIdChanged) {
|
// Renew carrierConfig values.
|
||||||
maybeMigrateIkeSession(mActiveNetwork);
|
maybeMigrateIkeSession(mActiveNetwork);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user