am 9c8abd1d: am f23eece2: am d37059e6: Merge "Don\'t crash if an invalid always-on VPN profile is configured." into mnc-dr-dev
* commit '9c8abd1d7ab205047a7e0f131eca24b2f3019d5d': Don't crash if an invalid always-on VPN profile is configured.
This commit is contained in:
@@ -3212,6 +3212,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
final String profileName = new String(mKeyStore.get(Credentials.LOCKDOWN_VPN));
|
final String profileName = new String(mKeyStore.get(Credentials.LOCKDOWN_VPN));
|
||||||
final VpnProfile profile = VpnProfile.decode(
|
final VpnProfile profile = VpnProfile.decode(
|
||||||
profileName, mKeyStore.get(Credentials.VPN + profileName));
|
profileName, mKeyStore.get(Credentials.VPN + profileName));
|
||||||
|
if (profile == null) {
|
||||||
|
Slog.e(TAG, "Lockdown VPN configured invalid profile " + profileName);
|
||||||
|
setLockdownTracker(null);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
int user = UserHandle.getUserId(Binder.getCallingUid());
|
int user = UserHandle.getUserId(Binder.getCallingUid());
|
||||||
synchronized(mVpns) {
|
synchronized(mVpns) {
|
||||||
setLockdownTracker(new LockdownVpnTracker(mContext, mNetd, this, mVpns.get(user),
|
setLockdownTracker(new LockdownVpnTracker(mContext, mNetd, this, mVpns.get(user),
|
||||||
|
|||||||
Reference in New Issue
Block a user