Workaround for devices with 3G/LTE returning false when calling hasSystemFeature(PackageManager.FEATURE_TELEPHONY)

This commit is contained in:
Marco 2015-12-19 16:23:34 +01:00
parent 6092a1653e
commit 2b3ffcbe75
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) {