Initially load CA certificates when the main Activity is created
authorTobias Brunner <tobias@strongswan.org>
Wed, 18 Jul 2012 11:43:34 +0000 (13:43 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 13 Aug 2012 09:00:24 +0000 (11:00 +0200)
src/frontends/android/src/org/strongswan/android/ui/MainActivity.java

index 1db6827..d2a7eec 100644 (file)
@@ -17,6 +17,8 @@
 
 package org.strongswan.android.ui;
 
+import org.strongswan.android.logic.TrustedCertificateManager;
+
 import android.app.ActionBar;
 import android.app.Activity;
 import android.content.Intent;
@@ -34,6 +36,15 @@ public class MainActivity extends Activity
 
                ActionBar bar = getActionBar();
                bar.setDisplayShowTitleEnabled(false);
+
+               /* load CA certificates in a background thread */
+               new Thread(new Runnable() {
+                       @Override
+                       public void run()
+                       {
+                               TrustedCertificateManager.getInstance().load();
+                       }
+               }).start();
        }
 
        private void startVpnService()