Commit 2b4dc11f authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Check for proper SE open return values on wipe.

Bug: 9227578
Change-Id: Iff9e9512ac4d8e25a287ce40fba7c2717b4419fa
parent 2f61bcad
......@@ -748,7 +748,7 @@ public class NfcService implements DeviceHostListener {
try {
Log.i(TAG, "Executing SE wipe");
handle = doOpenSecureElementConnection();
if (handle == 0) {
if (handle < 0) {
Log.w(TAG, "Could not open the secure element");
return;
}
......@@ -772,7 +772,7 @@ public class NfcService implements DeviceHostListener {
mDeviceHost.resetTimeouts();
}
} finally {
if (handle != 0) {
if (handle >= 0) {
doDisconnect(handle);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment