当前位置: 首页>>代码示例>>Java>>正文


Java CheckDirection.INCOMING属性代码示例

本文整理汇总了Java中com.fsck.k9.activity.setup.AccountSetupCheckSettings.CheckDirection.INCOMING属性的典型用法代码示例。如果您正苦于以下问题:Java CheckDirection.INCOMING属性的具体用法?Java CheckDirection.INCOMING怎么用?Java CheckDirection.INCOMING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.fsck.k9.activity.setup.AccountSetupCheckSettings.CheckDirection的用法示例。


在下文中一共展示了CheckDirection.INCOMING属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deleteCertificate

/**
 * Examine the existing settings for an account.  If the old host/port is different from the
 * new host/port, then try and delete any (possibly non-existent) certificate stored for the
 * old host/port.
 */
public void deleteCertificate(String newHost, int newPort, CheckDirection direction) {
    Uri uri;
    if (direction == CheckDirection.INCOMING) {
        uri = Uri.parse(getStoreUri());
    } else {
        uri = Uri.parse(getTransportUri());
    }
    String oldHost = uri.getHost();
    int oldPort = uri.getPort();
    if (oldPort == -1) {
        // This occurs when a new account is created
        return;
    }
    if (!newHost.equals(oldHost) || newPort != oldPort) {
        LocalKeyStore localKeyStore = LocalKeyStore.getInstance();
        localKeyStore.deleteCertificate(oldHost, oldPort);
    }
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:23,代码来源:Account.java

示例2: addCertificate

/**
 * Add a new certificate for the incoming or outgoing server to the local key store.
 */
public void addCertificate(CheckDirection direction, X509Certificate certificate) throws CertificateException {
    Uri uri;
    if (direction == CheckDirection.INCOMING) {
        uri = Uri.parse(getStoreUri());
    } else {
        uri = Uri.parse(getTransportUri());
    }
    LocalKeyStore localKeyStore = LocalKeyStore.getInstance();
    localKeyStore.addCertificate(uri.getHost(), uri.getPort(), certificate);
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:13,代码来源:Account.java

示例3: clearCertificateErrorNotifications

public void clearCertificateErrorNotifications(Account account, CheckDirection direction) {
    boolean incoming = (direction == CheckDirection.INCOMING);
    notificationController.clearCertificateErrorNotifications(account, incoming);
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:4,代码来源:MessagingController.java


注:本文中的com.fsck.k9.activity.setup.AccountSetupCheckSettings.CheckDirection.INCOMING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。