Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ce86481 authored by Jeff Hamilton's avatar Jeff Hamilton
Browse files

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
parent e0bd2688
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@ public final class Ndef extends BasicTagTechnology {
            return null;
        }
    }

    /**
     * Overwrite the primary NDEF message
     * @throws IOException
+0 −10
Original line number Diff line number Diff line
@@ -44,16 +44,6 @@ public final class NdefFormatable extends BasicTagTechnology {
        super(adapter, tag, tech);
    }

    /**
     * Returns whether a tag can be formatted with {@link
     * NdefFormatable#format(NdefMessage)}
     */
    public boolean canBeFormatted() throws IOException {
        checkConnected();

        throw new UnsupportedOperationException();
    }

    /**
     * Formats a tag as NDEF, if possible. You may supply a first
     * NdefMessage to be written on the tag.