OSDN Git Service

DO NOT MERGE
authorNick Pelly <npelly@google.com>
Tue, 1 Feb 2011 07:27:37 +0000 (23:27 -0800)
committerNick Pelly <npelly@google.com>
Tue, 1 Feb 2011 19:12:56 +0000 (11:12 -0800)
commit17bf5e3ccfe961e6cc967327ab092cfbd6568ddd
treed01df3ce83eb001adb6f2b317f0fa0b92ad3b6f2
parent22ad6243d7c9081e4f1a13097cfa4638cf42c3fe
DO NOT MERGE

Cherry-pick from GB to HC, updating 11.xml.

Final final final Gingerbread MR API changes.

This is it. I promise.

ACTION_TECHNOLOGY_DISCOVERED -> ACTION_TECH_DISCOVERED
    This was missed in our technology->tech rename.

Hide TagTechnology.reconnect()
    This is used to reset any per-connection state in a tag, by reconnecting
    to it. The first problem is that it belongs on Tag, not TagTechnology. The
    second problem is that it may become redundant once we add Tag.rediscover()
    which will also reconnect to the tag, and will also return a new Tag with
    newly created technologies enumerated. And the third and most significant
    problem is that you can already achieve the same result by just calling
    close() followed by connect().

Hide Tag.createMockTag()
    This API cannot be used reliably. First it requires using int[] for the
    technology list, but those int constants are now hidden. Second it requires
    knowledge of the extras parcel used to fill technology specific data - also
    not public.

Introduce TagTechnology.isConnected()
    Every child class already impelmented this, and given that connect() and
    close() are defined on the interface, then isConnected() should be there
    too.

Modify Ndef.getType to return a string (not int)
    Allows more flexibility in adding new NDEF types. Current public strings are
    org.nfcforum.ndef.type1
    org.nfcforum.ndef.type2
    org.nfcforum.ndef.type3
    org.nfcforum.ndef.type4
    com.nxp.ndef.mifareclassic

Add NdefFormatable.formatReadOnly()
    This allows you to make the tag read-only at the same time as performing
    format and write. It is important because we currently don't have any
    public API to re-enumerate a tag technology list after making a tag
    NDEF compatible, so you can't perform the format as a seperate step
    without physically removing the tag from field and returning it.

Modify Readonly -> ReadOnly

Make Tag class final

Change-Id: Ifa8a17741fcc95776ffdba42f611eadb036aaf2d
api/10.xml
api/11.xml
api/current.xml
core/java/android/nfc/NfcAdapter.java
core/java/android/nfc/Tag.java
core/java/android/nfc/tech/BasicTagTechnology.java
core/java/android/nfc/tech/Ndef.java
core/java/android/nfc/tech/NdefFormatable.java
core/java/android/nfc/tech/TagTechnology.java