正在查看: OVO v3.139.0 应用的 Chat.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OVO v3.139.0 应用的 Chat.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package zendesk.chat;
import android.content.Context;
import o.i.wpe;
import o.i.z09;
public enum Chat {
INSTANCE;
private static final String BASE_URL = "https://widget-mediator.zopim.com";
static final String LOG_TAG = "Chat";
static final String NOT_INITIALIZED_LOG = "Chat SDK needs to be initialized first. Call Chat.INSTANCE.init(...)";
static final String SDK_VARIANT = "Chat";
static final VisitorPath VISITOR_PATH = VisitorPath.create("Mobile Chat - Android", "Zendesk Chat SDK v3.4.0");
private ChatProvidersComponent chatProvidersComponent;
public void clearCache() {
ChatProvidersComponent chatProvidersComponent = this.chatProvidersComponent;
if (chatProvidersComponent == null) {
z09.b("Chat", NOT_INITIALIZED_LOG, new Object[0]);
} else {
chatProvidersComponent.cacheManager().clearCache();
}
}
public ChatProvidersComponent component() {
ChatProvidersComponent chatProvidersComponent = this.chatProvidersComponent;
if (chatProvidersComponent != null) {
return chatProvidersComponent;
}
z09.b("Chat", NOT_INITIALIZED_LOG, new Object[0]);
return null;
}
public ChatProvidersConfiguration getChatProvidersConfiguration() {
ChatProvidersComponent chatProvidersComponent = this.chatProvidersComponent;
if (chatProvidersComponent != null) {
return chatProvidersComponent.chatProvidersConfigurationStore().getChatProvidersConfiguration();
}
z09.b("Chat", NOT_INITIALIZED_LOG, new Object[0]);
return null;
}
public boolean hasIdentity() {
ChatProvidersComponent chatProvidersComponent = this.chatProvidersComponent;
if (chatProvidersComponent != null) {
return chatProvidersComponent.identityManager().hasIdentity();
}
z09.b("Chat", NOT_INITIALIZED_LOG, new Object[0]);
return false;
}
public void init(Context context, String str) {
init(context, str, "");
}
public Providers providers() {
return component();
}
public void reset() {
this.chatProvidersComponent = null;
}
public void resetIdentity(CompletionCallback<Void> completionCallback) {
setIdentity(null, completionCallback);
}
public void setChatProvidersConfiguration(ChatProvidersConfiguration chatProvidersConfiguration) {
ChatProvidersComponent chatProvidersComponent = this.chatProvidersComponent;
if (chatProvidersComponent == null) {
z09.b("Chat", NOT_INITIALIZED_LOG, new Object[0]);
} else {
chatProvidersComponent.chatProvidersConfigurationStore().setChatProvidersConfiguration(chatProvidersConfiguration);
}
}
public void setIdentity(JwtAuthenticator jwtAuthenticator, CompletionCallback<Void> completionCallback) {
ChatProvidersComponent chatProvidersComponent = this.chatProvidersComponent;
if (chatProvidersComponent == null) {
z09.b("Chat", NOT_INITIALIZED_LOG, new Object[0]);
} else {
chatProvidersComponent.identityManager().setIdentity(jwtAuthenticator, completionCallback);
setChatProvidersConfiguration(ChatProvidersConfiguration.builder(getChatProvidersConfiguration()).withVisitorInfo(VisitorInfo.builder().build()).build());
}
}
public void init(Context context, String str, String str2) {
if (context == null) {
z09.b("Chat", "Chat cannot be initialized without providing a context", new Object[0]);
} else if (wpe.b(str)) {
z09.b("Chat", "Chat cannot be initialized without providing an account key", new Object[0]);
} else {
init(DaggerChatProvidersComponent.builder().chatConfig(new ChatConfig(str, str2, VISITOR_PATH, BASE_URL)).context(context.getApplicationContext()).build());
}
}
public void resetIdentity() {
setIdentity(null, null);
}
public void setIdentity(JwtAuthenticator jwtAuthenticator) {
setIdentity(jwtAuthenticator, null);
}
public void init(ChatProvidersComponent chatProvidersComponent) {
this.chatProvidersComponent = chatProvidersComponent;
}
}