if (wifi == null) {
            return Status.UNSUPPORTED;
        } else if (ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_WIFI_STATE) != PackageManager.PERMISSION_GRANTED) {
            return Status.NEEDS_PERMISSION;
        } else if (wifi.isWifiEnabled()) {