.class public Lcom/helpshift/chat/HSChatEventsHandler; .super Ljava/lang/Object; .source "SourceFile" # instance fields .field public final configManager:Lcom/helpshift/config/HSConfigManager; .field public final genericDataManager:Lcom/helpshift/storage/HSGenericDataManager; .field public final nativeToSdkxMigrator:Lcom/helpshift/migrator/NativeToSdkxMigrator; .field public final resourceCacheManager:Lcom/helpshift/cache/HelpshiftResourceCacheManager; .field public final services:Lcom/helpshift/concurrency/HSThreadingService; .field public uiCallback:Ljava/lang/ref/WeakReference; .field public final userManager:Lcom/helpshift/user/UserManager; # direct methods .method public constructor (Lcom/helpshift/user/UserManager;Lcom/helpshift/concurrency/HSThreadingService;Lcom/helpshift/config/HSConfigManager;Lcom/helpshift/cache/HelpshiftResourceCacheManager;Lcom/helpshift/storage/HSGenericDataManager;Lcom/helpshift/migrator/NativeToSdkxMigrator;)V .locals 0 .line 41 invoke-direct {p0}, Ljava/lang/Object;->()V iput-object p2, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; iput-object p1, p0, Lcom/helpshift/chat/HSChatEventsHandler;->userManager:Lcom/helpshift/user/UserManager; iput-object p3, p0, Lcom/helpshift/chat/HSChatEventsHandler;->configManager:Lcom/helpshift/config/HSConfigManager; iput-object p4, p0, Lcom/helpshift/chat/HSChatEventsHandler;->resourceCacheManager:Lcom/helpshift/cache/HelpshiftResourceCacheManager; iput-object p5, p0, Lcom/helpshift/chat/HSChatEventsHandler;->genericDataManager:Lcom/helpshift/storage/HSGenericDataManager; iput-object p6, p0, Lcom/helpshift/chat/HSChatEventsHandler;->nativeToSdkxMigrator:Lcom/helpshift/migrator/NativeToSdkxMigrator; return-void .end method .method public static synthetic access$000(Lcom/helpshift/chat/HSChatEventsHandler;)Lcom/helpshift/config/HSConfigManager; .locals 0 .line 25 iget-object p0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->configManager:Lcom/helpshift/config/HSConfigManager; return-object p0 .end method .method public static synthetic access$100(Lcom/helpshift/chat/HSChatEventsHandler;)Lcom/helpshift/user/UserManager; .locals 0 .line 25 iget-object p0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->userManager:Lcom/helpshift/user/UserManager; return-object p0 .end method .method public static synthetic access$200(Lcom/helpshift/chat/HSChatEventsHandler;)Lcom/helpshift/storage/HSGenericDataManager; .locals 0 .line 25 iget-object p0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->genericDataManager:Lcom/helpshift/storage/HSGenericDataManager; return-object p0 .end method .method public static synthetic access$300(Lcom/helpshift/chat/HSChatEventsHandler;)Ljava/lang/ref/WeakReference; .locals 0 .line 25 iget-object p0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->uiCallback:Ljava/lang/ref/WeakReference; return-object p0 .end method .method public static synthetic access$400(Lcom/helpshift/chat/HSChatEventsHandler;)Lcom/helpshift/cache/HelpshiftResourceCacheManager; .locals 0 .line 25 iget-object p0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->resourceCacheManager:Lcom/helpshift/cache/HelpshiftResourceCacheManager; return-object p0 .end method # virtual methods .method public addWebviewToCurrentUI(Landroid/webkit/WebView;)V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 257 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$12; invoke-direct {v1, p0, p1}, Lcom/helpshift/chat/HSChatEventsHandler$12;->(Lcom/helpshift/chat/HSChatEventsHandler;Landroid/webkit/WebView;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runOnUIThread(Ljava/lang/Runnable;)V return-void .end method .method public final deleteAllCachedFilesOfWebchat()V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 248 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$11; invoke-direct {v1, p0}, Lcom/helpshift/chat/HSChatEventsHandler$11;->(Lcom/helpshift/chat/HSChatEventsHandler;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runSerial(Ljava/lang/Runnable;)V return-void .end method .method public getHelpcenterData()V .locals 1 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->uiCallback:Ljava/lang/ref/WeakReference; .line 101 invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/helpshift/chat/HSWebchatToUiCallback; if-eqz v0, :cond_0 .line 103 invoke-interface {v0}, Lcom/helpshift/chat/HSWebchatToUiCallback;->setHelpcenterData()V :cond_0 return-void .end method .method public onReceivePushTokenSyncRequestData(Ljava/lang/String;)V .locals 1 iget-object p1, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 113 new-instance v0, Lcom/helpshift/chat/HSChatEventsHandler$3; invoke-direct {v0, p0}, Lcom/helpshift/chat/HSChatEventsHandler$3;->(Lcom/helpshift/chat/HSChatEventsHandler;)V invoke-virtual {p1, v0}, Lcom/helpshift/concurrency/HSThreadingService;->runSerial(Ljava/lang/Runnable;)V return-void .end method .method public onRemoveAnonymousUser()V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 126 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$4; invoke-direct {v1, p0}, Lcom/helpshift/chat/HSChatEventsHandler$4;->(Lcom/helpshift/chat/HSChatEventsHandler;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runSerial(Ljava/lang/Runnable;)V return-void .end method .method public onRemoveLocalStorage(Ljava/lang/String;)V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 88 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$2; invoke-direct {v1, p0, p1}, Lcom/helpshift/chat/HSChatEventsHandler$2;->(Lcom/helpshift/chat/HSChatEventsHandler;Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runSerial(Ljava/lang/Runnable;)V return-void .end method .method public onSetLocalStorage(Ljava/lang/String;)V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 73 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$1; invoke-direct {v1, p0, p1}, Lcom/helpshift/chat/HSChatEventsHandler$1;->(Lcom/helpshift/chat/HSChatEventsHandler;Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runSerial(Ljava/lang/Runnable;)V return-void .end method .method public onUiConfigChange(Ljava/lang/String;)V .locals 2 .line 269 invoke-virtual {p0, p1}, Lcom/helpshift/chat/HSChatEventsHandler;->saveUiConfigDataForWebchat(Ljava/lang/String;)V iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 270 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$13; invoke-direct {v1, p0, p1}, Lcom/helpshift/chat/HSChatEventsHandler$13;->(Lcom/helpshift/chat/HSChatEventsHandler;Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runOnUIThread(Ljava/lang/Runnable;)V return-void .end method .method public onUserAuthenticationFailure()V .locals 2 .line 230 invoke-virtual {p0}, Lcom/helpshift/chat/HSChatEventsHandler;->deleteAllCachedFilesOfWebchat()V iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 231 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$10; invoke-direct {v1, p0}, Lcom/helpshift/chat/HSChatEventsHandler$10;->(Lcom/helpshift/chat/HSChatEventsHandler;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runOnUIThread(Ljava/lang/Runnable;)V return-void .end method .method public onWebchatClosed()V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 193 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$7; invoke-direct {v1, p0}, Lcom/helpshift/chat/HSChatEventsHandler$7;->(Lcom/helpshift/chat/HSChatEventsHandler;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runOnUIThread(Ljava/lang/Runnable;)V return-void .end method .method public onWebchatError()V .locals 2 .line 217 invoke-virtual {p0}, Lcom/helpshift/chat/HSChatEventsHandler;->deleteAllCachedFilesOfWebchat()V iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 218 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$9; invoke-direct {v1, p0}, Lcom/helpshift/chat/HSChatEventsHandler$9;->(Lcom/helpshift/chat/HSChatEventsHandler;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runOnUIThread(Ljava/lang/Runnable;)V return-void .end method .method public onWebchatLoaded()V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 205 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$8; invoke-direct {v1, p0}, Lcom/helpshift/chat/HSChatEventsHandler$8;->(Lcom/helpshift/chat/HSChatEventsHandler;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runOnUIThread(Ljava/lang/Runnable;)V return-void .end method .method public openFileChooser(Landroid/content/Intent;I)V .locals 1 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->uiCallback:Ljava/lang/ref/WeakReference; .line 300 invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/helpshift/chat/HSWebchatToUiCallback; if-eqz v0, :cond_0 .line 302 invoke-interface {v0, p1, p2}, Lcom/helpshift/chat/HSWebchatToUiCallback;->openFileChooser(Landroid/content/Intent;I)V :cond_0 return-void .end method .method public requestConversationMetadata(Ljava/lang/String;)V .locals 1 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->uiCallback:Ljava/lang/ref/WeakReference; .line 314 invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/helpshift/chat/HSWebchatToUiCallback; if-eqz v0, :cond_0 .line 316 invoke-interface {v0, p1}, Lcom/helpshift/chat/HSWebchatToUiCallback;->requestConversationMetadata(Ljava/lang/String;)V :cond_0 return-void .end method .method public final saveUiConfigDataForWebchat(Ljava/lang/String;)V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 282 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$14; invoke-direct {v1, p0, p1}, Lcom/helpshift/chat/HSChatEventsHandler$14;->(Lcom/helpshift/chat/HSChatEventsHandler;Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runSerial(Ljava/lang/Runnable;)V return-void .end method .method public sdkxMigrationLogSynced(Z)V .locals 1 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->nativeToSdkxMigrator:Lcom/helpshift/migrator/NativeToSdkxMigrator; .line 63 invoke-virtual {v0, p1}, Lcom/helpshift/migrator/NativeToSdkxMigrator;->setErrorLogsSyncedWithWebchat(Z)V return-void .end method .method public sendIntentToSystemApp(Landroid/content/Intent;)V .locals 1 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->uiCallback:Ljava/lang/ref/WeakReference; .line 307 invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/helpshift/chat/HSWebchatToUiCallback; if-eqz v0, :cond_0 .line 309 invoke-interface {v0, p1}, Lcom/helpshift/chat/HSWebchatToUiCallback;->sendIntentToSystemApp(Landroid/content/Intent;)V :cond_0 return-void .end method .method public setAttachmentFilePathCallback(Landroid/webkit/ValueCallback;)V .locals 1 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->uiCallback:Ljava/lang/ref/WeakReference; .line 293 invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/helpshift/chat/HSWebchatToUiCallback; if-eqz v0, :cond_0 .line 295 invoke-interface {v0, p1}, Lcom/helpshift/chat/HSWebchatToUiCallback;->setAttachmentFilePathCallback(Landroid/webkit/ValueCallback;)V :cond_0 return-void .end method .method public setGenericSdkData(Ljava/lang/String;)V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 156 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$5; invoke-direct {v1, p0, p1}, Lcom/helpshift/chat/HSChatEventsHandler$5;->(Lcom/helpshift/chat/HSChatEventsHandler;Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runSerial(Ljava/lang/Runnable;)V return-void .end method .method public setIssueExistsForUser(Ljava/lang/String;)V .locals 2 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->services:Lcom/helpshift/concurrency/HSThreadingService; .line 171 new-instance v1, Lcom/helpshift/chat/HSChatEventsHandler$6; invoke-direct {v1, p0, p1}, Lcom/helpshift/chat/HSChatEventsHandler$6;->(Lcom/helpshift/chat/HSChatEventsHandler;Ljava/lang/String;)V invoke-virtual {v0, v1}, Lcom/helpshift/concurrency/HSThreadingService;->runSerial(Ljava/lang/Runnable;)V return-void .end method .method public setPollingStatus(Ljava/lang/String;)V .locals 2 .line 141 :try_start_0 new-instance v0, Lorg/json/JSONObject; invoke-direct {v0, p1}, Lorg/json/JSONObject;->(Ljava/lang/String;)V const-string p1, "shouldPoll" const/4 v1, 0x0 .line 142 invoke-virtual {v0, p1, v1}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z move-result p1 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->userManager:Lcom/helpshift/user/UserManager; .line 143 invoke-virtual {v0, p1}, Lcom/helpshift/user/UserManager;->setShouldPollFlag(Z)V :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception p1 const-string v0, "wbEvntHndlr" const-string v1, "Error getting polling status" .line 146 invoke-static {v0, v1, p1}, Lcom/helpshift/log/HSLogger;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V :goto_0 return-void .end method .method public setUiEventsListener(Lcom/helpshift/chat/HSWebchatToUiCallback;)V .locals 1 .line 51 new-instance v0, Ljava/lang/ref/WeakReference; invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;->(Ljava/lang/Object;)V iput-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->uiCallback:Ljava/lang/ref/WeakReference; return-void .end method .method public webchatJsFileLoaded()V .locals 1 iget-object v0, p0, Lcom/helpshift/chat/HSChatEventsHandler;->uiCallback:Ljava/lang/ref/WeakReference; .line 321 invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/helpshift/chat/HSWebchatToUiCallback; if-eqz v0, :cond_0 .line 323 invoke-interface {v0}, Lcom/helpshift/chat/HSWebchatToUiCallback;->webchatJsFileLoaded()V :cond_0 return-void .end method