move echobot code for testing out of the way

This commit is contained in:
Dan Ballard 2017-09-06 20:33:45 -07:00
parent 6baa48596b
commit 1e48f69691
1 changed files with 12 additions and 13 deletions

View File

@ -2,6 +2,7 @@ package im.ricochet.androidod;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.StrictMode;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
import android.text.Editable; import android.text.Editable;
@ -93,19 +94,6 @@ public class ConnectActivity extends AppCompatActivity {
addressText.setText(connectToAddress); addressText.setText(connectToAddress);
validateOnionAddress(); validateOnionAddress();
/*Log.i(TAG, "Ready!");
connectStatusText.setText("Ready!");
ProgressBar progressBar = (ProgressBar)findViewById(im.ricochet.androidod.R.id.progressBar);
progressBar.setVisibility(View.GONE);
Log.i(TAG, "Setting thread policy perms");
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
Log.i(TAG, "Starting Echo Bot");
//GoRicochetMobile.echoBot(privateKey);
new EchoBot(privateKey).execute();
*/
} }
private void setIdentity(String privateKey) { private void setIdentity(String privateKey) {
@ -169,6 +157,17 @@ public class ConnectActivity extends AppCompatActivity {
} }
} }
/********** TESTING by standing up an echobot **********88/
private void echoBot(String privateKey) {
// Test echobot
Log.i(TAG, "Setting thread policy perms");
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
Log.i(TAG, "Starting Echo Bot");
new EchoBot(privateKey).execute();
}
private class EchoBot extends AsyncTask<Void, Void, Void> { private class EchoBot extends AsyncTask<Void, Void, Void> {
String privateKey; String privateKey;