diff options
| author | 2010-12-10 11:54:26 -0800 | |
|---|---|---|
| committer | 2010-12-10 22:07:46 -0600 | |
| commit | b79173f6602359d00a1a89f4d6505a44d461d796 (patch) | |
| tree | 8b0f432a14e21e17b14232aa22d06469984e878c | |
| parent | fc5a3b6cfb85679e82a39730c7154b55b0711a0c (diff) | |
Changed technology close() to reconnect to the tag instead of physical disconnect.
Change-Id: I8935e4aae452adeec472c0b3ff3c77f1400a264e
| -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); } |