package com.seewo.libnfc.tools;

import android.nfc.NfcAdapter;
import android.util.Log;
import com.seewo.vcommons.constants.SeewoIntent;
import java.lang.reflect.Method;

/* JADX INFO: loaded from: classes.dex */
public class NfcAdapterInsider {
    private static final String TAG = "NfcAdapterInsider";

    private NfcAdapterInsider() {
    }

    public static boolean enable(NfcAdapter nfcAdapter) {
        try {
            Method method = nfcAdapter.getClass().getMethod(SeewoIntent.KEY_SET_WOL_SLOT, new Class[0]);
            method.setAccessible(true);
            return Boolean.valueOf(method.invoke(nfcAdapter, new Object[0]).toString()).booleanValue();
        } catch (Exception e) {
            Log.e(TAG, e.getMessage(), e);
            return false;
        }
    }

    public static boolean disable(NfcAdapter nfcAdapter) {
        try {
            Method method = nfcAdapter.getClass().getMethod("disable", new Class[0]);
            method.setAccessible(true);
            return Boolean.valueOf(method.invoke(nfcAdapter, new Object[0]).toString()).booleanValue();
        } catch (Exception e) {
            Log.e(TAG, e.getMessage(), e);
            return false;
        }
    }
}
