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
1 changed files with 2 additions and 1 deletions

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) {