summaryrefslogtreecommitdiffstats
path: root/nci/src
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2012-10-04 16:52:51 -0700
committerMartijn Coenen <maco@google.com>2012-10-11 15:17:24 -0700
commita949c74321b17f8ef1c93692064969f60815c7e4 (patch)
tree4cc361632b88b096357b1d51f4466eece1423ab3 /nci/src
parentae1b16cf81e49a438b7a86efcdd8d83c1c0666d1 (diff)
downloadpackages_apps_nfc-a949c74321b17f8ef1c93692064969f60815c7e4.zip
packages_apps_nfc-a949c74321b17f8ef1c93692064969f60815c7e4.tar.gz
packages_apps_nfc-a949c74321b17f8ef1c93692064969f60815c7e4.tar.bz2
Fast-fail SE open if it's activated in listen mode.
Users of the NFC-extras API usually want to talk to the SE once it has completed a transaction. The hard part is knowing when it is safe to connect to the SE, as it will break the connection to any reader. And when relinquishing the connection to the SE, the reader may find the device again and process another transaction. This patch adds the following two conditions for allowing to open the SE from the DH: 1) The SE may not be activated in listen mode 2) The RF field must have been off for at least 50 ms Bug: 7275484 Change-Id: Ibde32a8e2aef045c17ab76ef08c72f96edfedaef
Diffstat (limited to 'nci/src')
-rwxr-xr-xnci/src/com/android/nfc/dhimpl/NativeNfcManager.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java b/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java
index 921e266..40b9347 100755
--- a/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java
+++ b/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java
@@ -336,6 +336,14 @@ public class NativeNfcManager implements DeviceHost {
mListener.onRemoteFieldDeactivated();
}
+ private void notifySeListenActivated() {
+ mListener.onSeListenActivated();
+ }
+
+ private void notifySeListenDeactivated() {
+ mListener.onSeListenDeactivated();
+ }
+
private void notifySeApduReceived(byte[] apdu) {
mListener.onSeApduReceived(apdu);
}