Skip to content

Commit 3ce8648

Browse files
committed
Remove canBeFormatted().
It's not easy to determine if this is possible, so instead apps should attempt a format and handle errors in the format request. Change-Id: I078a208b849e71ef3fb6b5970a9111ece4a2d201
1 parent e0bd268 commit 3ce8648

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

core/java/android/nfc/technology/Ndef.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public NdefMessage getNdefMessage() throws IOException, FormatException {
140140
return null;
141141
}
142142
}
143+
143144
/**
144145
* Overwrite the primary NDEF message
145146
* @throws IOException

core/java/android/nfc/technology/NdefFormatable.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ public NdefFormatable(NfcAdapter adapter, Tag tag, int tech, Bundle extras) thro
4444
super(adapter, tag, tech);
4545
}
4646

47-
/**
48-
* Returns whether a tag can be formatted with {@link
49-
* NdefFormatable#format(NdefMessage)}
50-
*/
51-
public boolean canBeFormatted() throws IOException {
52-
checkConnected();
53-
54-
throw new UnsupportedOperationException();
55-
}
56-
5747
/**
5848
* Formats a tag as NDEF, if possible. You may supply a first
5949
* NdefMessage to be written on the tag.

0 commit comments

Comments
 (0)