summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/nfc/NfcService.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index acac182e..60f4f85b 100644
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -336,6 +336,9 @@ public class NfcService implements DeviceHostListener {
boolean mNotifyDispatchFailed;
boolean mNotifyReadFailed;
+ // for recording the latest Tag object cookie
+ long mCookieUpToDate = 0;
+
private NfcDispatcher mNfcDispatcher;
private PowerManager mPowerManager;
private KeyguardManager mKeyguard;
@@ -2055,6 +2058,23 @@ public class NfcService implements DeviceHostListener {
public boolean getExtendedLengthApdusSupported() throws RemoteException {
return mDeviceHost.getExtendedLengthApdusSupported();
}
+
+ @Override
+ public void setTagUpToDate(long cookie) throws RemoteException {
+ if (DBG) Log.d(TAG, "Register Tag " + Long.toString(cookie) + " as the latest");
+ mCookieUpToDate = cookie;
+ }
+
+ @Override
+ public boolean isTagUpToDate(long cookie) throws RemoteException {
+ if (mCookieUpToDate == cookie) {
+ if (DBG) Log.d(TAG, "Tag " + Long.toString(cookie) + " is up to date");
+ return true;
+ }
+
+ if (DBG) Log.d(TAG, "Tag " + Long.toString(cookie) + " is out of date");
+ return false;
+ }
}
final class NfcDtaService extends INfcDta.Stub {