diff options
author | Nick Pelly <npelly@google.com> | 2010-10-22 12:43:18 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2010-10-22 16:31:04 -0700 |
commit | 785e31f549df8e90f6b8c76f88b6885eaff8e2fc (patch) | |
tree | 135a37fa122acfb1689f4ec4cab330e5cb77a728 /canon | |
parent | 3bfa1d4899444b7c8c240f568224d3e704896350 (diff) | |
download | android_packages_apps_Tag-785e31f549df8e90f6b8c76f88b6885eaff8e2fc.tar.gz android_packages_apps_Tag-785e31f549df8e90f6b8c76f88b6885eaff8e2fc.tar.bz2 android_packages_apps_Tag-785e31f549df8e90f6b8c76f88b6885eaff8e2fc.zip |
Update Tag app for new Tag mock constructors.
Change-Id: I92d2f3bcff23f737c77da5c1c4a2e55b725c0ac1
Signed-off-by: Nick Pelly <npelly@google.com>
Diffstat (limited to 'canon')
-rw-r--r-- | canon/src/com/android/apps/tagcanon/TagCanon.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/canon/src/com/android/apps/tagcanon/TagCanon.java b/canon/src/com/android/apps/tagcanon/TagCanon.java index a636dbe..508f81e 100644 --- a/canon/src/com/android/apps/tagcanon/TagCanon.java +++ b/canon/src/com/android/apps/tagcanon/TagCanon.java @@ -30,6 +30,7 @@ import android.nfc.NdefMessage; import android.nfc.NdefRecord; import android.nfc.NdefTag; import android.nfc.NfcAdapter; +import android.nfc.Tag; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; @@ -112,7 +113,9 @@ public class TagCanon extends ListActivity { this.title = title; try { NdefMessage[] msgs = new NdefMessage[] { new NdefMessage(bytes) }; - this.tag = new NdefTag(NdefTag.TARGET_TYPE_4, UID, 0, msgs); + this.tag = NdefTag.createMockNdefTag(UID, new String[] { Tag.TARGET_ISO_14443_4 }, + null, null, new String[] { NdefTag.TARGET_TYPE_4 }, + new NdefMessage[][] { msgs }); } catch (Exception e) { throw new RuntimeException("Failed to create tag description", e); } @@ -121,7 +124,9 @@ public class TagCanon extends ListActivity { public TagDescription(String title, NdefMessage[] msgs) { this.title = title; try { - this.tag = new NdefTag(NdefTag.TARGET_TYPE_4, UID, 0, msgs); + this.tag = NdefTag.createMockNdefTag(UID, new String[] { Tag.TARGET_ISO_14443_4 }, + null, null, new String[] { NdefTag.TARGET_TYPE_4 }, + new NdefMessage[][] { msgs }); } catch (Exception e) { throw new RuntimeException("Failed to create tag description", e); } |