JNI-158: Android activity - remove keyserver stuff

master
heck 2 years ago
parent bc035e2910
commit 3b9b7c74ae

@ -260,7 +260,6 @@ public class MainActivity extends AppCompatActivity {
@BindView(R.id.bRunTypes) Button runTypes;
@BindView(R.id.bRunAliceBob) Button runIntegration;
@BindView(R.id.bRunServerLookup) Button runLookup;
@BindView(R.id.bRunGenKey) Button runGenKey;
@BindView(R.id.encrypt_and_decrypt) Button runEncryptAndDecrypt;
@BindView(R.id.encrypt_and_decrypt_without_key) Button runEncryptAndDecryptWithoutKey;
@ -287,11 +286,6 @@ public class MainActivity extends AppCompatActivity {
runIntegration.setText(TESTING);
new RunTestTask().execute(6);
}
@OnClick(R.id.bRunServerLookup)
public void runLookup() {
runLookup.setText(TESTING);
new RunTestTask().execute(2);
}
@OnClick(R.id.bRunGenKey)
public void runGenKey() {
runGenKey.setText(TESTING);
@ -390,10 +384,6 @@ public class MainActivity extends AppCompatActivity {
testPEpTypes();
}
private void runTestKeyserverLookup() throws pEpException, InterruptedException, IOException {
testKeyserverLookup();
}
private void runTestKeyGen() throws pEpException, InterruptedException, IOException {
testKeyGen();
}
@ -1494,46 +1484,6 @@ public class MainActivity extends AppCompatActivity {
msg.setAttachments(attachments);
}
/*
tests its possible to find the fingerprint on server
*/
public void testKeyserverLookup() throws pEpException, IOException, AssertionError, InterruptedException {
log("TEST: ", "Test keyserver lookup loaded");
Engine e;
e = new Engine();
long lastTime = System.currentTimeMillis();
e.startKeyserverLookup();
log("engine.startLookup", String.valueOf(System.currentTimeMillis() - lastTime));
Identity vb = new Identity();
vb.username = "pEpDontAssert";
vb.address = "vb@ulm.ccc.de";
vb.user_id = "SsI6H9";
updateIdentityOnEngine(e, vb);
int count = 0;
while (count++ < 5000) {
Thread.sleep(1);
}
String fpr = e.updateIdentity(vb).fpr;
log("PEPTEST", "keyserver test fpr");
log("PEPTEST", fpr != null ? fpr : "NULL");
if (fpr == null) throw new AssertionError();
lastTime = System.currentTimeMillis();
e.stopKeyserverLookup();
log("engine.stopLookup", String.valueOf(System.currentTimeMillis() - lastTime));
lastTime = System.currentTimeMillis();
e.close();
log("engine.close", String.valueOf(System.currentTimeMillis() - lastTime));
log("TEST: ", "Test keyserver lookup finished");
}
/*
tests I can get my own fingerprint
*/
@ -1927,18 +1877,15 @@ public class MainActivity extends AppCompatActivity {
runTestPEpTypes();
return 1;
case 2:
runTestKeyserverLookup();
return 2;
case 3:
runEncryptAndDecryptTest();
return 3;
case 4:
case 3:
runEncryptAndDecryptWithoutKeyTest();
return 4;
case 5:
case 4:
runColorRatingsTest();
return 5;
case 6:
case 5:
runIntegrationTest();
return 6;
case 16:

@ -57,27 +57,6 @@
android:text="Run" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Server Lookup"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Button
android:id="@+id/bRunServerLookup"
style="?android:attr/buttonStyleSmall"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Run" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

Loading…
Cancel
Save