CEEX v1.0.1版本的 MD5 值为:d20246587215ec3471b0d051724c6d34
以下内容为反编译后的 SupportSdkSettings.java 源代码,内容仅作参考
package zendesk.support;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.zendesk.util.CollectionUtils;
import com.zendesk.util.StringUtils;
import java.util.ArrayList;
import java.util.List;
import zendesk.core.AuthenticationType;
public class SupportSdkSettings {
private final AuthenticationType authenticationType;
private final HelpCenterSettings helpCenterSettings;
private final SupportSettings mobileSettings;
public SupportSdkSettings(SupportSettings supportSettings, HelpCenterSettings helpCenterSettings, AuthenticationType authenticationType) {
this.mobileSettings = supportSettings;
this.helpCenterSettings = helpCenterSettings;
this.authenticationType = authenticationType;
}
@Nullable
private AttachmentSettings getAttachmentSettings() {
SupportSettings supportSettings = this.mobileSettings;
if ((supportSettings == null || supportSettings.getAttachments() == null) ? false : true) {
return this.mobileSettings.getAttachments();
}
return null;
}
@Nullable
private ConversationsSettings getConversationsSettings() {
SupportSettings supportSettings = this.mobileSettings;
if ((supportSettings == null || supportSettings.getConversations() == null) ? false : true) {
return this.mobileSettings.getConversations();
}
return null;
}
public AuthenticationType getAuthenticationType() {
return this.authenticationType;
}
@NonNull
public List<String> getContactZendeskTags() {
SupportSettings supportSettings = this.mobileSettings;
return supportSettings != null && supportSettings.getContactUs() != null && CollectionUtils.isNotEmpty(this.mobileSettings.getContactUs().getTags()) ? this.mobileSettings.getContactUs().getTags() : new ArrayList();
}
@NonNull
public String getHelpCenterLocale() {
HelpCenterSettings helpCenterSettings = this.helpCenterSettings;
return helpCenterSettings != null && helpCenterSettings.getLocale() != null ? this.helpCenterSettings.getLocale() : "";
}
public long getMaxAttachmentSize() {
AttachmentSettings attachmentSettings = getAttachmentSettings();
if (attachmentSettings != null) {
return attachmentSettings.getMaxAttachmentSize();
}
return 0L;
}
public String getReferrerUrl() {
SupportSettings supportSettings = this.mobileSettings;
return (supportSettings == null || !StringUtils.hasLength(supportSettings.getReferrerUrl())) ? "https://www.zendesk.com/embeddables" : this.mobileSettings.getReferrerUrl();
}
public String getRequestSystemMessage() {
SupportSettings supportSettings = this.mobileSettings;
return (supportSettings == null || !StringUtils.hasLength(supportSettings.getSystemMessage())) ? "" : this.mobileSettings.getSystemMessage();
}
public boolean hasHelpCenterSettings() {
return this.helpCenterSettings != null;
}
public boolean isAttachmentsEnabled() {
AttachmentSettings attachmentSettings = getAttachmentSettings();
return attachmentSettings != null && attachmentSettings.isEnabled();
}
public boolean isConversationsEnabled() {
ConversationsSettings conversationsSettings = getConversationsSettings();
return conversationsSettings != null && conversationsSettings.isEnabled();
}
public boolean isHelpCenterArticleVotingEnabled() {
return hasHelpCenterSettings() && this.helpCenterSettings.isArticleVotingEnabled();
}
public boolean isHelpCenterEnabled() {
HelpCenterSettings helpCenterSettings = this.helpCenterSettings;
return helpCenterSettings != null && helpCenterSettings.isEnabled();
}
public boolean isNeverAskForEmailEnabled() {
SupportSettings supportSettings = this.mobileSettings;
return supportSettings == null || supportSettings.isNeverRequestEmailOn();
}
public boolean isShowClosedRequests() {
SupportSettings supportSettings = this.mobileSettings;
return supportSettings == null || supportSettings.isShowClosedRequests();
}
public boolean isShowReferrerLogoEnabled() {
SupportSettings supportSettings = this.mobileSettings;
return supportSettings != null && supportSettings.isShowReferrerLogo();
}
public boolean isTicketFormSupportAvailable() {
SupportSettings supportSettings = this.mobileSettings;
return (supportSettings != null && supportSettings.getTicketForms() != null) && this.mobileSettings.getTicketForms().isAvailable();
}
}