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

Commit 266e0a38 authored by Mathias Jeppsson's avatar Mathias Jeppsson Committed by Johan Redestig
Browse files

NFC: getNdefMessage() should throw exception if no tag in field.

According to documentation, an TagLostException should be thrown, if
the tag has been moved out of field when reading NDEF message.

Change-Id: Ib7e485ed442027fdebd5bc7a46101fbca0c88bdb
parent 1ff4293e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -278,6 +278,8 @@ public final class Ndef extends BasicTagTechnology {
                    throw new TagLostException();
                }
                return msg;
            } else if (!tagService.isPresent(serviceHandle)) {
                throw new TagLostException();
            } else {
                return null;
            }