@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == REQUEST_CODE_INSTALL && resultCode == RESULT_OK) {
            File jsk = new File(getCacheDir(),
                    getIntent().getStringExtra(EXTRA_ALIAS) + JKS.KEY_JKS_FILE_EXTENSION);
            try {
                if(!jsk.exists() && !jsk.createNewFile()) {
                    throw new IOException("Create jks file failed.");
                }
            } catch (IOException e) {
                NetBareLog.wtf(e);
            }
        }
        finish();
    }
A translucent activity uses to install self-signed certificate.

@author Megatron King
@since 2018-11-10 21:18
netbare-core/src/main/java/com/github/megatronking/netbare/ssl/CertificateInstallActivity.java