1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-02-24 07:10:50 +00:00

Merge pull request #202 from marco-scavuzzo/master

Workaround for devices with 3G/LTE returning false when calling hasSy…
This commit is contained in:
Marcel Bokhorst 2015-12-19 16:49:50 +01:00
commit 312f5b5417

View file

@ -84,7 +84,8 @@ public class Util {
public static boolean hasTelephony(Context context) {
PackageManager pm = context.getPackageManager();
return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) ||
context.getSystemService(Context.TELEPHONY_SERVICE)!=null;
}
public static boolean hasWifi(Context context) {