Browse Source

JNI-158: Android activity - remove keyserver stuff

JNI-158
heck 5 months ago
parent
commit
3b9b7c74ae
2 changed files with 3 additions and 77 deletions
  1. +3
    -56
      androidTests/app/src/main/java/com/pep/k9/MainActivity.java
  2. +0
    -21
      androidTests/app/src/main/res/layout/activity_main.xml

+ 3
- 56
androidTests/app/src/main/java/com/pep/k9/MainActivity.java View File

@ -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:


+ 0
- 21
androidTests/app/src/main/res/layout/activity_main.xml View File

@ -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