From 17f74b4774fa44a12738f4d70e1928c00947548f Mon Sep 17 00:00:00 2001 From: dtvv Date: Sat, 18 Aug 2018 12:48:37 -0500 Subject: [PATCH] -Correct OnErrorWebSocker to OnErrorWebSocket --- .../apigenerator/GrapheneApiGenerator.java | 10 +++++----- .../crystalwallet/network/CryptoNetManager.java | 6 ++---- .../agorise/crystalwallet/network/WebSocketThread.java | 6 ++---- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/GrapheneApiGenerator.java b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/GrapheneApiGenerator.java index fb915ee..3c2dcca 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/GrapheneApiGenerator.java +++ b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/GrapheneApiGenerator.java @@ -93,7 +93,7 @@ public abstract class GrapheneApiGenerator { * * Interface to catch only errors in connection with sockets * */ - private static GrapheneApiGenerator.OnErrorWebSocker onErrorWebSocker; + private static OnErrorWebSocket onErrorWebSocket; /* * @@ -247,7 +247,7 @@ public abstract class GrapheneApiGenerator { } }), CryptoNetManager.getURL(CryptoNet.BITSHARES)); thread.setActivity(activity); //To catch websocket errors to user interface - thread.setOnErrorWebSocker(onErrorWebSocker); //To deliver websocket errors to user interface + thread.setOnErrorWebSocker(onErrorWebSocket); //To deliver websocket errors to user interface thread.start(); } @@ -740,15 +740,15 @@ public abstract class GrapheneApiGenerator { GrapheneApiGenerator.onResponsesWebSocker = onResponsesWebSocker; } - public static void setOnErrorWebSocker(OnErrorWebSocker onErrorWebSocker) { - GrapheneApiGenerator.onErrorWebSocker = onErrorWebSocker; + public static void setOnErrorWebSocket(OnErrorWebSocket onErrorWebSocket) { + GrapheneApiGenerator.onErrorWebSocket = onErrorWebSocket; } /* * * Interface to catch errors in connection with sockets * */ - public interface OnErrorWebSocker{ + public interface OnErrorWebSocket { void onError(Exception exception); } diff --git a/app/src/main/java/cy/agorise/crystalwallet/network/CryptoNetManager.java b/app/src/main/java/cy/agorise/crystalwallet/network/CryptoNetManager.java index c4f2dc6..8084096 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/network/CryptoNetManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/network/CryptoNetManager.java @@ -2,11 +2,9 @@ package cy.agorise.crystalwallet.network; import android.app.Activity; import android.support.annotation.NonNull; -import android.util.Log; import java.util.ArrayList; import java.util.Collections; -import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; @@ -70,7 +68,7 @@ public abstract class CryptoNetManager { public static void addCryptoNetURL(CryptoNet crypto, String[] urls, final Activity activity, - final GrapheneApiGenerator.OnErrorWebSocker onErrorWebSocker, + final GrapheneApiGenerator.OnErrorWebSocket onErrorWebSocker, final boolean showNormalError){ addCryptoNetURL(crypto,urls,activity,onErrorWebSocker,null,showNormalError); } @@ -95,7 +93,7 @@ public abstract class CryptoNetManager { public static void addCryptoNetURL(CryptoNet crypto, String[] urls, final Activity activity, - final GrapheneApiGenerator.OnErrorWebSocker onErrorWebSocker, + final GrapheneApiGenerator.OnErrorWebSocket onErrorWebSocker, final GrapheneApiGenerator.OnResponsesWebSocket onResponsesWebSocket, final boolean showNormalError) { diff --git a/app/src/main/java/cy/agorise/crystalwallet/network/WebSocketThread.java b/app/src/main/java/cy/agorise/crystalwallet/network/WebSocketThread.java index f2cf5c0..3c5c433 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/network/WebSocketThread.java +++ b/app/src/main/java/cy/agorise/crystalwallet/network/WebSocketThread.java @@ -5,7 +5,6 @@ import android.util.Log; import android.widget.Toast; import com.neovisionaries.ws.client.WebSocket; -import com.neovisionaries.ws.client.WebSocketException; import com.neovisionaries.ws.client.WebSocketFactory; import com.neovisionaries.ws.client.WebSocketListener; @@ -14,7 +13,6 @@ import java.util.HashMap; import cy.agorise.crystalwallet.activities.LoadingActivity; import cy.agorise.crystalwallet.apigenerator.GrapheneApiGenerator; -import cy.agorise.crystalwallet.dialogs.material.DialogMaterial; /** * Created by henry on 8/10/2017. @@ -43,7 +41,7 @@ public class WebSocketThread extends Thread { * * Interface to catch only errors in connection with sockets * */ - private GrapheneApiGenerator.OnErrorWebSocker onErrorWebSocker; + private GrapheneApiGenerator.OnErrorWebSocket onErrorWebSocker; /* * @@ -239,7 +237,7 @@ public class WebSocketThread extends Thread { } - public void setOnErrorWebSocker(GrapheneApiGenerator.OnErrorWebSocker onErrorWebSocker) { + public void setOnErrorWebSocker(GrapheneApiGenerator.OnErrorWebSocket onErrorWebSocker) { this.onErrorWebSocker = onErrorWebSocker; }