From 947e25b1b603a7afe646481ee570f4b3f025da90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 30 May 2019 11:04:21 -0400 Subject: [PATCH 1/5] don't exclude arm64-v8a libraries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- android/app/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index eabbe60e3ea..34f5cafa8cb 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -180,7 +180,6 @@ android { packagingOptions { exclude 'META-INF/rxjava.properties' exclude '/lib/mips64/**' - exclude '/lib/arm64-v8a/**' /** Fix for: Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'. * with recent version of ndk (17.0.4754217) */ From 06d8d338cfb320bd7b98d6fd343e0daf5561bb1d Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Thu, 1 Aug 2019 14:25:25 +0200 Subject: [PATCH 2/5] setMobileSignalHandler --- .../src/main/java/im/status/ethereum/module/StatusModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java index 7777a8d8354..c1175b9e85d 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java @@ -78,7 +78,7 @@ public String getName() { @Override public void onHostResume() { // Activity `onResume` module = this; - Statusgo.setMobileSignalHandler(this); + //Statusgo.setMobileSignalHandler(this); } @Override From 8ebd2a1e2c17753162fef49641ab5d57cf908374 Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Thu, 1 Aug 2019 14:05:44 +0200 Subject: [PATCH 3/5] commit 4 don't call Statusgo --- .../status/ethereum/module/StatusModule.java | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java index c1175b9e85d..dffd8810d8b 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java @@ -258,14 +258,14 @@ private void doStartNode(final String jsonConfigString) { prettyPrintConfig(updatedJsonConfigString); - String res = Statusgo.startNode(updatedJsonConfigString); - if (res.startsWith("{\"error\":\"\"")) { - Log.d(TAG, "StartNode result: " + res); - Log.d(TAG, "Geth node started"); - } - else { - Log.e(TAG, "StartNode failed: " + res); - } + //String res = Statusgo.startNode(updatedJsonConfigString); + //if (res.startsWith("{\"error\":\"\"")) { + //Log.d(TAG, "StartNode result: " + res); + //Log.d(TAG, "Geth node started"); + //} + //else { + // Log.e(TAG, "StartNode failed: " + res); + //} } catch (JSONException e) { Log.e(TAG, "updateConfig failed: " + e.getMessage()); System.exit(1); @@ -378,7 +378,7 @@ public void stopNode() { @Override public void run() { Log.d(TAG, "stopNode"); - String res = Statusgo.stopNode(); + //String res = Statusgo.stopNode(); } }; @@ -396,9 +396,9 @@ public void login(final String json, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String result = Statusgo.login(json); + //String result = Statusgo.login(json); - callback.invoke(result); + //callback.invoke(result); } }; @@ -421,9 +421,9 @@ public void verify(final String address, final String password, final Callback c Runnable r = new Runnable() { @Override public void run() { - String result = Statusgo.verifyAccountPassword(newKeystoreDir, address, password); + //String result = Statusgo.verifyAccountPassword(newKeystoreDir, address, password); - callback.invoke(result); + //callback.invoke(result); } }; @@ -441,9 +441,9 @@ public void loginWithKeycard(final String whisperPrivateKey, final String encryp Runnable r = new Runnable() { @Override public void run() { - String result = Statusgo.loginWithKeycard(whisperPrivateKey, encryptionPublicKey); + //String result = Statusgo.loginWithKeycard(whisperPrivateKey, encryptionPublicKey); - callback.invoke(result); + //callback.invoke(result); } }; @@ -461,9 +461,9 @@ public void createAccount(final String password, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.createAccount(password); + //String res = Statusgo.createAccount(password); - callback.invoke(res); + //callback.invoke(res); } }; @@ -481,8 +481,8 @@ public void sendDataNotification(final String dataPayloadJSON, final String toke Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.sendDataNotification(dataPayloadJSON, tokensJSON); - callback.invoke(res); + //String res = Statusgo.sendDataNotification(dataPayloadJSON, tokensJSON); + //callback.invoke(res); } }; @@ -631,9 +631,9 @@ public void addPeer(final String enode, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.addPeer(enode); + //String res = Statusgo.addPeer(enode); - callback.invoke(res); + //callback.invoke(res); } }; @@ -651,9 +651,9 @@ public void recoverAccount(final String passphrase, final String password, final Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.recoverAccount(password, passphrase); + //String res = Statusgo.recoverAccount(password, passphrase); - callback.invoke(res); + //callback.invoke(res); } }; @@ -670,9 +670,9 @@ public void multiAccountGenerateAndDeriveAddresses(final String json, final Call Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.multiAccountGenerateAndDeriveAddresses(json); + //String res = Statusgo.multiAccountGenerateAndDeriveAddresses(json); - callback.invoke(res); + //callback.invoke(res); } }; @@ -689,9 +689,9 @@ public void multiAccountStoreDerived(final String json, final Callback callback) Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.multiAccountStoreDerivedAccounts(json); + //String res = Statusgo.multiAccountStoreDerivedAccounts(json); - callback.invoke(res); + //callback.invoke(res); } }; @@ -713,8 +713,8 @@ public void hashTransaction(final String txArgsJSON, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.hashTransaction(txArgsJSON); - callback.invoke(res); + //String res = Statusgo.hashTransaction(txArgsJSON); + //callback.invoke(res); } }; @@ -732,8 +732,8 @@ public void hashMessage(final String message, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.hashMessage(message); - callback.invoke(res); + //String res = Statusgo.hashMessage(message); + //callback.invoke(res); } }; @@ -751,8 +751,8 @@ public void hashTypedData(final String data, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.hashTypedData(data); - callback.invoke(res); + //String res = Statusgo.hashTypedData(data); + //callback.invoke(res); } }; @@ -771,8 +771,8 @@ public void sendTransactionWithSignature(final String txArgsJSON, final String s Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.sendTransactionWithSignature(txArgsJSON, signature); - callback.invoke(res); + //String res = Statusgo.sendTransactionWithSignature(txArgsJSON, signature); + //callback.invoke(res); } }; @@ -790,8 +790,8 @@ public void sendTransaction(final String txArgsJSON, final String password, fina Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.sendTransaction(txArgsJSON, password); - callback.invoke(res); + //String res = Statusgo.sendTransaction(txArgsJSON, password); + //callback.invoke(res); } }; @@ -809,8 +809,8 @@ public void signMessage(final String rpcParams, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.signMessage(rpcParams); - callback.invoke(res); + //String res = Statusgo.signMessage(rpcParams); + //callback.invoke(res); } }; @@ -828,8 +828,8 @@ public void signTypedData(final String data, final String account, final String Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.signTypedData(data, account, password); - callback.invoke(res); + //String res = Statusgo.signTypedData(data, account, password); + //callback.invoke(res); } }; @@ -926,8 +926,8 @@ public void callRPC(final String payload, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.callRPC(payload); - callback.invoke(res); + //String res = Statusgo.callRPC(payload); + // callback.invoke(res); } }; @@ -939,8 +939,8 @@ public void callPrivateRPC(final String payload, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.callPrivateRPC(payload); - callback.invoke(res); + // String res = Statusgo.callPrivateRPC(payload); + //callback.invoke(res); } }; @@ -955,13 +955,13 @@ public void closeApplication() { @ReactMethod public void connectionChange(final String type, final boolean isExpensive) { Log.d(TAG, "ConnectionChange: " + type + ", is expensive " + isExpensive); - Statusgo.connectionChange(type, isExpensive ? 1 : 0); + //Statusgo.connectionChange(type, isExpensive ? 1 : 0); } @ReactMethod public void appStateChange(final String type) { Log.d(TAG, "AppStateChange: " + type); - Statusgo.appStateChange(type); + //Statusgo.appStateChange(type); } private static String uniqueID = null; @@ -1024,9 +1024,9 @@ public void extractGroupMembershipSignatures(final String signaturePairs, final Runnable r = new Runnable() { @Override public void run() { - String result = Statusgo.extractGroupMembershipSignatures(signaturePairs); + //String result = Statusgo.extractGroupMembershipSignatures(signaturePairs); - callback.invoke(result); + //callback.invoke(result); } }; @@ -1044,9 +1044,9 @@ public void signGroupMembership(final String content, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String result = Statusgo.signGroupMembership(content); + //String result = Statusgo.signGroupMembership(content); - callback.invoke(result); + //callback.invoke(result); } }; @@ -1065,9 +1065,9 @@ public void updateMailservers(final String enodes, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.updateMailservers(enodes); + //String res = Statusgo.updateMailservers(enodes); - callback.invoke(res); + //callback.invoke(res); } }; @@ -1085,9 +1085,9 @@ public void chaosModeUpdate(final boolean on, final Callback callback) { Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.chaosModeUpdate(on); + //String res = Statusgo.chaosModeUpdate(on); - callback.invoke(res); + //callback.invoke(res); } }; @@ -1105,10 +1105,10 @@ public void getNodesFromContract(final String rpcEndpoint, final String contract Runnable r = new Runnable() { @Override public void run() { - String res = Statusgo.getNodesFromContract(rpcEndpoint, contractAddress); + //String res = Statusgo.getNodesFromContract(rpcEndpoint, contractAddress); - Log.d(TAG, res); - callback.invoke(res); + //Log.d(TAG, res); + //callback.invoke(res); } }; From f6063e645e0c2183ff3b96056d1ed184bfb7ffc2 Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Thu, 1 Aug 2019 19:50:02 +0200 Subject: [PATCH 4/5] enable setMobileSignalHandler --- .../src/main/java/im/status/ethereum/module/StatusModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java index dffd8810d8b..352b67db73b 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java @@ -78,7 +78,7 @@ public String getName() { @Override public void onHostResume() { // Activity `onResume` module = this; - //Statusgo.setMobileSignalHandler(this); + Statusgo.setMobileSignalHandler("wifi"); } @Override From dbf1cac35f23b0d18fc0af4590e1cee1e7bfbd52 Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Thu, 1 Aug 2019 20:04:27 +0200 Subject: [PATCH 5/5] this --- .../src/main/java/im/status/ethereum/module/StatusModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java index 352b67db73b..b27e08a3cff 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java @@ -78,7 +78,7 @@ public String getName() { @Override public void onHostResume() { // Activity `onResume` module = this; - Statusgo.setMobileSignalHandler("wifi"); + Statusgo.setMobileSignalHandler(this); } @Override