Loading core/java/android/nfc/INfcTag.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -44,5 +44,6 @@ interface INfcTag Tag rediscover(int nativehandle); int setTimeout(int technology, int timeout); int getTimeout(int technology); void resetTimeouts(); } core/java/android/nfc/tech/IsoDep.java +18 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,24 @@ public final class IsoDep extends BasicTagTechnology { } } /** * Gets the currently set timeout of {@link #transceive} in milliseconds. * * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. * * @return timeout value in milliseconds * @hide */ // TODO Unhide for ICS public int getTimeout() { try { return mTag.getTagService().getTimeout(TagTechnology.ISO_DEP); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return 0; } } /** * Return the ISO-DEP historical bytes for {@link NfcA} tags. * <p>Does not cause any RF activity and does not block. Loading core/java/android/nfc/tech/MifareClassic.java +18 −0 Original line number Diff line number Diff line Loading @@ -597,6 +597,24 @@ public final class MifareClassic extends BasicTagTechnology { } } /** * Gets the currently set timeout of {@link #transceive} in milliseconds. * * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. * * @return timeout value in milliseconds * @hide */ // TODO Unhide for ICS public int getTimeout() { try { return mTag.getTagService().getTimeout(TagTechnology.MIFARE_CLASSIC); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return 0; } } private static void validateSector(int sector) { // Do not be too strict on upper bounds checking, since some cards // have more addressable memory than they report. For example, Loading core/java/android/nfc/tech/MifareUltralight.java +18 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,24 @@ public final class MifareUltralight extends BasicTagTechnology { } } /** * Gets the currently set timeout of {@link #transceive} in milliseconds. * * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. * * @return timeout value in milliseconds * @hide */ // TODO Unhide for ICS public int getTimeout() { try { return mTag.getTagService().getTimeout(TagTechnology.MIFARE_ULTRALIGHT); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return 0; } } private static void validatePageIndex(int pageIndex) { // Do not be too strict on upper bounds checking, since some cards // may have more addressable memory than they report. Loading core/java/android/nfc/tech/NfcA.java +18 −0 Original line number Diff line number Diff line Loading @@ -141,4 +141,22 @@ public final class NfcA extends BasicTagTechnology { Log.e(TAG, "NFC service dead", e); } } /** * Gets the currently set timeout of {@link #transceive} in milliseconds. * * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. * * @return timeout value in milliseconds * @hide */ // TODO Unhide for ICS public int getTimeout() { try { return mTag.getTagService().getTimeout(TagTechnology.NFC_A); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return 0; } } } Loading
core/java/android/nfc/INfcTag.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -44,5 +44,6 @@ interface INfcTag Tag rediscover(int nativehandle); int setTimeout(int technology, int timeout); int getTimeout(int technology); void resetTimeouts(); }
core/java/android/nfc/tech/IsoDep.java +18 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,24 @@ public final class IsoDep extends BasicTagTechnology { } } /** * Gets the currently set timeout of {@link #transceive} in milliseconds. * * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. * * @return timeout value in milliseconds * @hide */ // TODO Unhide for ICS public int getTimeout() { try { return mTag.getTagService().getTimeout(TagTechnology.ISO_DEP); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return 0; } } /** * Return the ISO-DEP historical bytes for {@link NfcA} tags. * <p>Does not cause any RF activity and does not block. Loading
core/java/android/nfc/tech/MifareClassic.java +18 −0 Original line number Diff line number Diff line Loading @@ -597,6 +597,24 @@ public final class MifareClassic extends BasicTagTechnology { } } /** * Gets the currently set timeout of {@link #transceive} in milliseconds. * * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. * * @return timeout value in milliseconds * @hide */ // TODO Unhide for ICS public int getTimeout() { try { return mTag.getTagService().getTimeout(TagTechnology.MIFARE_CLASSIC); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return 0; } } private static void validateSector(int sector) { // Do not be too strict on upper bounds checking, since some cards // have more addressable memory than they report. For example, Loading
core/java/android/nfc/tech/MifareUltralight.java +18 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,24 @@ public final class MifareUltralight extends BasicTagTechnology { } } /** * Gets the currently set timeout of {@link #transceive} in milliseconds. * * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. * * @return timeout value in milliseconds * @hide */ // TODO Unhide for ICS public int getTimeout() { try { return mTag.getTagService().getTimeout(TagTechnology.MIFARE_ULTRALIGHT); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return 0; } } private static void validatePageIndex(int pageIndex) { // Do not be too strict on upper bounds checking, since some cards // may have more addressable memory than they report. Loading
core/java/android/nfc/tech/NfcA.java +18 −0 Original line number Diff line number Diff line Loading @@ -141,4 +141,22 @@ public final class NfcA extends BasicTagTechnology { Log.e(TAG, "NFC service dead", e); } } /** * Gets the currently set timeout of {@link #transceive} in milliseconds. * * <p class="note">Requires the {@link android.Manifest.permission#NFC} permission. * * @return timeout value in milliseconds * @hide */ // TODO Unhide for ICS public int getTimeout() { try { return mTag.getTagService().getTimeout(TagTechnology.NFC_A); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return 0; } } }