diff options
| -rw-r--r-- | core/java/android/nfc/INfcTag.aidl | 1 | ||||
| -rw-r--r-- | core/java/android/nfc/technology/BasicTagTechnology.java | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/nfc/INfcTag.aidl b/core/java/android/nfc/INfcTag.aidl index 69e5bc7d3a88..852ab5ede25d 100644 --- a/core/java/android/nfc/INfcTag.aidl +++ b/core/java/android/nfc/INfcTag.aidl @@ -25,6 +25,7 @@ interface INfcTag { int close(int nativeHandle); int connect(int nativeHandle); + int reconnect(int nativeHandle); int[] getTechList(int nativeHandle); byte[] getUid(int nativeHandle); boolean isNdef(int nativeHandle); diff --git a/core/java/android/nfc/technology/BasicTagTechnology.java b/core/java/android/nfc/technology/BasicTagTechnology.java index ba8bd559cfc2..a50c10b1926f 100644 --- a/core/java/android/nfc/technology/BasicTagTechnology.java +++ b/core/java/android/nfc/technology/BasicTagTechnology.java @@ -162,7 +162,10 @@ import android.util.Log; public void close() { mIsConnected = false; try { - mTagService.close(mTag.getServiceHandle()); + /* Note that we don't want to physically disconnect the tag, + * but just reconnect to it to reset its state + */ + mTagService.reconnect(mTag.getServiceHandle()); } catch (RemoteException e) { attemptDeadServiceRecovery(e); } |