am b79173f6: Changed technology close() to reconnect to the tag instead of physical disconnect.

* commit 'b79173f6602359d00a1a89f4d6505a44d461d796':
  Changed technology close() to reconnect to the tag instead of physical disconnect.
This commit is contained in:
Martijn Coenen
2010-12-10 20:40:40 -08:00
committed by Android Git Automerger
2 changed files with 5 additions and 1 deletions

View File

@ -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);

View File

@ -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);
}