mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 05:44:14 +00:00
Suppress empty access notifications
This commit is contained in:
parent
ae21985d6b
commit
2a3b35cf96
2 changed files with 5 additions and 4 deletions
|
@ -3089,7 +3089,10 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
|||
}
|
||||
|
||||
private void showAccessNotification(int uid) {
|
||||
String name = TextUtils.join(", ", Util.getApplicationNames(uid, ServiceSinkhole.this));
|
||||
List<String> apps = Util.getApplicationNames(uid, ServiceSinkhole.this);
|
||||
if (apps.size() == 0)
|
||||
return;
|
||||
String name = TextUtils.join(", ", apps);
|
||||
|
||||
Intent main = new Intent(ServiceSinkhole.this, ActivityMain.class);
|
||||
main.putExtra(ActivityMain.EXTRA_SEARCH, Integer.toString(uid));
|
||||
|
|
|
@ -406,9 +406,7 @@ public class Util {
|
|||
else {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
String[] pkgs = pm.getPackagesForUid(uid);
|
||||
if (pkgs == null)
|
||||
listResult.add(Integer.toString(uid));
|
||||
else
|
||||
if (pkgs != null)
|
||||
for (String pkg : pkgs)
|
||||
try {
|
||||
ApplicationInfo info = pm.getApplicationInfo(pkg, 0);
|
||||
|
|
Loading…
Reference in a new issue