Merge "Fix warnings from static analysis tool."
This commit is contained in:
@@ -124,6 +124,9 @@ public final class NdefFormatable extends BasicTagTechnology {
|
|||||||
try {
|
try {
|
||||||
int serviceHandle = mTag.getServiceHandle();
|
int serviceHandle = mTag.getServiceHandle();
|
||||||
INfcTag tagService = mTag.getTagService();
|
INfcTag tagService = mTag.getTagService();
|
||||||
|
if (tagService == null) {
|
||||||
|
throw new IOException();
|
||||||
|
}
|
||||||
int errorCode = tagService.formatNdef(serviceHandle, MifareClassic.KEY_DEFAULT);
|
int errorCode = tagService.formatNdef(serviceHandle, MifareClassic.KEY_DEFAULT);
|
||||||
switch (errorCode) {
|
switch (errorCode) {
|
||||||
case ErrorCodes.SUCCESS:
|
case ErrorCodes.SUCCESS:
|
||||||
|
|||||||
Reference in New Issue
Block a user