mirror of https://github.com/M66B/NetGuard.git
Workaround for devices with 3G/LTE returning false when calling hasSystemFeature(PackageManager.FEATURE_TELEPHONY)
This commit is contained in:
parent
6092a1653e
commit
2b3ffcbe75
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue