List of usage examples for android.net.wifi WifiManager getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:ua.mkh.settings.full.MainActivity.java
public static boolean isSharingWiFi(final WifiManager manager) { try {//from w w w.ja va 2 s.c o m final Method method = manager.getClass().getDeclaredMethod("isWifiApEnabled"); method.setAccessible(true); //in the case of visibility change in future APIs return (Boolean) method.invoke(manager); } catch (final Throwable ignored) { } return false; }