Code example for FragmentActivity

Methods: finish, setResult

0
        NetworkInfo netInfo = cm.getActiveNetworkInfo();
        return netInfo != null && netInfo.isConnected();
    } 
 
    public void close() { 
        setResult(EXIT_RESULT_CODE);
        finish(); 
    } 
 
    protected MartusCrypto getSecurity() 
    { 
        return AppConfig.getInstance().getCrypto(); 
    } 
 
    protected void verifySignedPrefsFile(String fileName) throws MartusUtilities.FileVerificationException {
        File prefsFile = getPrefsFile(fileName);
        if (prefsFile.exists()) {
            File sigFile = new File(prefsFile.getParent(), prefsFile.getName() + ".sig");
            MartusUtilities.verifyFileAndSignature(prefsFile, sigFile, getSecurity(), getSecurity().getPublicKeyString());
        } 
    }