mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 05:44:14 +00:00
Prevent crash
This commit is contained in:
parent
154a6baade
commit
e33d221e5e
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ public class Receiver extends BroadcastReceiver {
|
||||||
// Get application info
|
// Get application info
|
||||||
PackageManager pm = context.getPackageManager();
|
PackageManager pm = context.getPackageManager();
|
||||||
String[] packages = pm.getPackagesForUid(uid);
|
String[] packages = pm.getPackagesForUid(uid);
|
||||||
if (packages.length < 1)
|
if (packages == null || packages.length < 1)
|
||||||
throw new PackageManager.NameNotFoundException(Integer.toString(uid));
|
throw new PackageManager.NameNotFoundException(Integer.toString(uid));
|
||||||
boolean internet = Util.hasInternet(uid, context);
|
boolean internet = Util.hasInternet(uid, context);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue