Java Code Examples for de.blinkt.openvpn.core.VpnStatus#logInfo()

The following examples show how to use de.blinkt.openvpn.core.VpnStatus#logInfo() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VoidVpnService.java    From bitmask_android with GNU General Public License v3.0 6 votes vote down vote up
private void establishBlockingVpn() {
    try {
        VpnStatus.logInfo(getProviderFormattedString(getResources(), R.string.void_vpn_establish));
        VpnStatus.updateStateString(STATE_ESTABLISH, "",
                R.string.void_vpn_establish, ConnectionStatus.LEVEL_BLOCKING);
        Builder builder = prepareBlockingVpnProfile();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)  {
            builder.addDisallowedApplication(getPackageName());
        }

        fd = builder.establish();
    } catch (Exception e) {
        // Catch any exception
        e.printStackTrace();
        VpnStatus.logError(R.string.void_vpn_error_establish);
    }
}
 
Example 2
Source File: LogFragment.java    From bitmask_android with GNU General Public License v3.0 5 votes vote down vote up
void clearLog() {
    // Actually is probably called from GUI Thread as result of the user
    // pressing a button. But better safe than sorry
    VpnStatus.clearLog();
    VpnStatus.logInfo(R.string.logCleared);
    mHandler.sendEmptyMessage(MESSAGE_CLEARLOG);
}
 
Example 3
Source File: FirewallManager.java    From bitmask_android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onFirewallStarted(boolean success) {
    if (success) {
        VpnStatus.logInfo("[FIREWALL] Custom rules established");
    } else {
        VpnStatus.logError("[FIREWALL] Could not establish custom rules.");
    }
}
 
Example 4
Source File: FirewallManager.java    From bitmask_android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onFirewallStopped(boolean success) {
    if (success) {
        VpnStatus.logInfo("[FIREWALL] Custom rules deleted");
    } else {
        VpnStatus.logError("[FIREWALL] Could not delete custom rules");
    }
}
 
Example 5
Source File: FirewallManager.java    From bitmask_android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onTetheringStarted(boolean success) {
    if (success) {
        VpnStatus.logInfo("[FIREWALL] Rules for tethering enabled");
    } else {
        VpnStatus.logError("[FIREWALL] Could not enable rules for tethering.");
    }
}
 
Example 6
Source File: FirewallManager.java    From bitmask_android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onTetheringStopped(boolean success) {
    if (success) {
        VpnStatus.logInfo("[FIREWALL] Rules for tethering successfully disabled");
    } else {
        VpnStatus.logError("[FIREWALL] Could not disable rules for tethering.");
    }
}