public static boolean run(boolean newValue) { try { INfcAdapter adapter = INfcAdapter.Stub.asInterface(ServiceManager.getService("nfc")); return newValue ? adapter.enable() : adapter.disable(true); } catch (Throwable e) { return false; } }
static boolean run(boolean newValue) { try { INfcAdapter adapter = INfcAdapter.Stub.asInterface(ServiceManager.getService("nfc")); return newValue ? adapter.enable() : adapter.disable(true); } catch (Throwable e) { return false; } }