Debug info: check for NetGuard

pull/194/merge
M66B 3 years ago
parent b0ef4d2705
commit d2a2550f49

@ -74,6 +74,8 @@
<package android:name="org.sufficientlysecure.keychain" />
<package android:name="org.sufficientlysecure.keychain.debug" />
<package android:name="eu.faircode.netguard" />
<intent>
<action android:name="org.openintents.openpgp.IOpenPgpService2" />
</intent>

@ -74,6 +74,8 @@
<package android:name="org.sufficientlysecure.keychain" />
<package android:name="org.sufficientlysecure.keychain.debug" />
<package android:name="eu.faircode.netguard" />
<intent>
<action android:name="org.openintents.openpgp.IOpenPgpService2" />
</intent>

@ -74,6 +74,8 @@
<package android:name="org.sufficientlysecure.keychain" />
<package android:name="org.sufficientlysecure.keychain.debug" />
<package android:name="eu.faircode.netguard" />
<intent>
<action android:name="org.openintents.openpgp.IOpenPgpService2" />
</intent>

@ -74,6 +74,8 @@
<package android:name="org.sufficientlysecure.keychain" />
<package android:name="org.sufficientlysecure.keychain.debug" />
<package android:name="eu.faircode.netguard" />
<intent>
<action android:name="org.openintents.openpgp.IOpenPgpService2" />
</intent>

@ -529,6 +529,16 @@ public class Helper {
return (ris != null && ris.size() > 0);
}
static boolean isInstalled(Context context, String pkg) {
try {
PackageManager pm = context.getPackageManager();
pm.getPackageInfo(pkg, 0);
return true;
} catch (Throwable ex) {
return false;
}
}
static boolean isComponentEnabled(Context context, Class<?> clazz) {
PackageManager pm = context.getPackageManager();
int state = pm.getComponentEnabledSetting(new ComponentName(context, clazz));

@ -1959,9 +1959,10 @@ public class Log {
size += write(os, "accounts=" + accounts.size() +
" enabled=" + enabled +
" interval=" + pollInterval +
"\r\nmetered=" + metered +
" interval=" + pollInterval + "\r\n" +
" metered=" + metered +
" VPN=" + ConnectionHelper.vpnActive(context) +
" NetGuard=" + Helper.isInstalled(context, "eu.faircode.netguard") + "\r\n" +
" optimizing=" + (ignoring == null ? null : !ignoring) +
" auto_optimize=" + auto_optimize +
"\r\n\r\n");

@ -74,6 +74,8 @@
<package android:name="org.sufficientlysecure.keychain" />
<package android:name="org.sufficientlysecure.keychain.debug" />
<package android:name="eu.faircode.netguard" />
<intent>
<action android:name="org.openintents.openpgp.IOpenPgpService2" />
</intent>

Loading…
Cancel
Save