use of com.frostwire.bittorrent.BTEngine in project frostwire by frostwire.
the class VPNDropGuard method onStatusUpdated.
@Override
public void onStatusUpdated(boolean vpnIsOn) {
boolean vpnDropProtectionOn = ConnectionSettings.VPN_DROP_PROTECTION.getValue();
BTEngine instance = BTEngine.getInstance();
if (vpnDropProtectionOn) {
if (vpnIsOn && instance.isPaused()) {
instance.resume();
}
if (!vpnIsOn && !instance.isPaused()) {
instance.pause();
}
} else if (!vpnDropProtectionOn && instance.isPaused()) {
instance.resume();
}
}
use of com.frostwire.bittorrent.BTEngine in project frostwire by frostwire.
the class StatusLine method updateFirewall.
/**
* Updates the firewall text.
*/
private void updateFirewall() {
try {
BTEngine engine = BTEngine.getInstance();
updateFirewallLabel(!engine.isFirewalled());
} catch (Throwable ignored) {
}
}
Aggregations