summaryrefslogtreecommitdiff
path: root/app/src/main/java/com/javispedro
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2021-03-26 20:17:44 +0100
committerJavier <dev.git@javispedro.com>2021-03-26 20:17:44 +0100
commitc6ef99ae64b2c1fe399f13ac7c9634cc33db57b1 (patch)
treef0e748cd8bc3096ad11c653e39201fc6a683d29f /app/src/main/java/com/javispedro
parent6b2dd5b290850301472a7097c84f76972b43b507 (diff)
downloadrempe-c6ef99ae64b2c1fe399f13ac7c9634cc33db57b1.tar.gz
rempe-c6ef99ae64b2c1fe399f13ac7c9634cc33db57b1.zip
close handle on requestaccess failure
Diffstat (limited to 'app/src/main/java/com/javispedro')
-rw-r--r--app/src/main/java/com/javispedro/rempe/Device.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/com/javispedro/rempe/Device.java b/app/src/main/java/com/javispedro/rempe/Device.java
index 9258393..f4f2cce 100644
--- a/app/src/main/java/com/javispedro/rempe/Device.java
+++ b/app/src/main/java/com/javispedro/rempe/Device.java
@@ -177,6 +177,9 @@ public class Device {
mCurState = initialDeviceState;
if (resultCode == RequestAccessResult.SUCCESS) {
setEnvPcc(result);
+ } else {
+ mEnvPccHandle.close();
+ mEnvPccHandle = null;
}
if (mObserver != null) {
mObserver.onDeviceSearchFinished(resultCode);