Have you actually tested that fix? Re-enabling that if just means that it won't return an error when Wi-Fi Direct isn't supported. So you might not have your "failed" message, but it wouldn't work either (unless samsung magic).
_ Omni developer - Android - Check my twitter for the latest updates!
<codeworkx> YIPIJAHEY SCHWEINEBACKE
Galaxy S II i9100, Galaxy Note N-7000, Galaxy S III i9300 • Asus
TF300T, TF700T • Sony
Xperia T (mint) • LG
Nexus 4, Nexus 5 • Oppo
Find 5, N1 •
and other devices you've never heard of.
Press "Thanks" if I helped !