Merge "Skip lockdown setup if user is not up yet" into nyc-dev am: d646b3d67f

am: 2149ad57fd

* commit '2149ad57fda5b04a07a9ae7af723a358f7e29d2b':
  Skip lockdown setup if user is not up yet
This commit is contained in:
Robin Lee
2016-03-14 13:28:27 +00:00
committed by android-build-merger

View File

@@ -3256,8 +3256,12 @@ public class ConnectivityService extends IConnectivityManager.Stub
}
int user = UserHandle.getUserId(Binder.getCallingUid());
synchronized(mVpns) {
setLockdownTracker(new LockdownVpnTracker(mContext, mNetd, this, mVpns.get(user),
profile));
Vpn vpn = mVpns.get(user);
if (vpn == null) {
Slog.w(TAG, "VPN for user " + user + " not ready yet. Skipping lockdown");
return false;
}
setLockdownTracker(new LockdownVpnTracker(mContext, mNetd, this, vpn, profile));
}
} else {
setLockdownTracker(null);