Snap for 4531101 from 102f5632fb02fe9ef440410edf8b28e6612e1c72 to pi-release
Change-Id: I844a3836a4d070a8396707295e54e93c5abc2d61
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.server;
|
|||||||
import static android.Manifest.permission.DUMP;
|
import static android.Manifest.permission.DUMP;
|
||||||
import static android.net.IpSecManager.INVALID_RESOURCE_ID;
|
import static android.net.IpSecManager.INVALID_RESOURCE_ID;
|
||||||
import static android.system.OsConstants.AF_INET;
|
import static android.system.OsConstants.AF_INET;
|
||||||
|
import static android.system.OsConstants.EINVAL;
|
||||||
import static android.system.OsConstants.IPPROTO_UDP;
|
import static android.system.OsConstants.IPPROTO_UDP;
|
||||||
import static android.system.OsConstants.SOCK_DGRAM;
|
import static android.system.OsConstants.SOCK_DGRAM;
|
||||||
import static com.android.internal.util.Preconditions.checkNotNull;
|
import static com.android.internal.util.Preconditions.checkNotNull;
|
||||||
@@ -1220,7 +1221,11 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
info.getSpiRecord(direction).getSpi());
|
info.getSpiRecord(direction).getSpi());
|
||||||
}
|
}
|
||||||
} catch (ServiceSpecificException e) {
|
} catch (ServiceSpecificException e) {
|
||||||
// FIXME: get the error code and throw is at an IOException from Errno Exception
|
if (e.errorCode == EINVAL) {
|
||||||
|
throw new IllegalArgumentException(e.toString());
|
||||||
|
} else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user