Javier Varona 2017-10-04 22:47:08 -04:00
commit c51e8f3a49
3 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cy.agorise.crystalwallet"> package="cy.agorise.crystalwallet">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application <application
android:name="cy.agorise.crystalwallet.application.CrystalApplication" android:name="cy.agorise.crystalwallet.application.CrystalApplication"

View File

@ -49,10 +49,12 @@ public class GrapheneApiGenerator {
if (list.size() > 0) { if (list.size() > 0) {
if (list.get(0).getClass() == AccountProperties.class) { if (list.get(0).getClass() == AccountProperties.class) {
request.getListener().success(list.get(0),request.getId()); request.getListener().success(list.get(0),request.getId());
return;
//TODO answer a crystal model //TODO answer a crystal model
} }
} }
} }
System.out.println("ERROR : " + response.result);
request.getListener().fail(request.getId()); request.getListener().fail(request.getId());
} }
@ -63,6 +65,7 @@ public class GrapheneApiGenerator {
})); }));
Thread thread = new Thread(){ Thread thread = new Thread(){
public void run(){ public void run(){
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
try { try {
webSocket.connect(); webSocket.connect();
} catch (WebSocketException e) { } catch (WebSocketException e) {
@ -108,6 +111,7 @@ public class GrapheneApiGenerator {
})); }));
Thread thread = new Thread(){ Thread thread = new Thread(){
public void run(){ public void run(){
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
try { try {
webSocket.connect(); webSocket.connect();
} catch (WebSocketException e) { } catch (WebSocketException e) {
@ -150,6 +154,7 @@ public class GrapheneApiGenerator {
})); }));
Thread thread = new Thread(){ Thread thread = new Thread(){
public void run(){ public void run(){
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
try { try {
webSocket.connect(); webSocket.connect();
} catch (WebSocketException e) { } catch (WebSocketException e) {
@ -179,7 +184,7 @@ public class GrapheneApiGenerator {
@Override @Override
public void onSuccess(WitnessResponse response) { public void onSuccess(WitnessResponse response) {
AccountProperties accountProperties = ((WitnessResponse<AccountProperties>) response).result; AccountProperties accountProperties = ((WitnessResponse<AccountProperties>) response).result;
if(accountProperties != null){ if(accountProperties == null){
request.getListener().success(null,request.getId()); request.getListener().success(null,request.getId());
}else{ }else{
request.getListener().success(accountProperties.id,request.getId()); request.getListener().success(accountProperties.id,request.getId());
@ -193,6 +198,7 @@ public class GrapheneApiGenerator {
})); }));
Thread thread = new Thread(){ Thread thread = new Thread(){
public void run(){ public void run(){
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
try { try {
webSocket.connect(); webSocket.connect();
} catch (WebSocketException e) { } catch (WebSocketException e) {

View File

@ -34,6 +34,7 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
@Override @Override
public void onNewRequest(CryptoNetInfoRequest request) { public void onNewRequest(CryptoNetInfoRequest request) {
if (request instanceof ValidateImportBitsharesAccountRequest){ if (request instanceof ValidateImportBitsharesAccountRequest){
final ValidateImportBitsharesAccountRequest importRequest = (ValidateImportBitsharesAccountRequest) request; final ValidateImportBitsharesAccountRequest importRequest = (ValidateImportBitsharesAccountRequest) request;
ApiRequest checkAccountName = new ApiRequest(0, new ApiRequestListener() { ApiRequest checkAccountName = new ApiRequest(0, new ApiRequestListener() {
@Override @Override