diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/clojure/io/cons/carddav_sync/authenticator.clj | 8 | ||||
-rw-r--r-- | src/clojure/io/cons/carddav_sync/authenticator_activity.clj | 2 | ||||
-rw-r--r-- | src/java/io/cons/carddav_sync/SplashActivity.java | 16 |
3 files changed, 11 insertions, 15 deletions
diff --git a/src/clojure/io/cons/carddav_sync/authenticator.clj b/src/clojure/io/cons/carddav_sync/authenticator.clj index 2bd6b00..ca90f62 100644 --- a/src/clojure/io/cons/carddav_sync/authenticator.clj +++ b/src/clojure/io/cons/carddav_sync/authenticator.clj @@ -4,7 +4,7 @@ (:import android.accounts.AccountManager android.content.Intent android.os.Bundle - [io.cons.carddav_sync authenticator_activity SplashActivity]) + io.cons.carddav_sync.authenticator_activity) (:gen-class :extends android.accounts.AbstractAccountAuthenticator :state context @@ -17,12 +17,10 @@ (defn -addAccount [this response accountType authTokenType requiredFeatures options] (log-i "addAccount") - (let [selector (Intent. (.context this) authenticator_activity) - intent (Intent. (.context this) SplashActivity) + (let [intent (Intent. (.context this) authenticator_activity) bundle (Bundle.)] - (.putExtra selector AccountManager/KEY_ACCOUNT_AUTHENTICATOR_RESPONSE + (.putExtra intent AccountManager/KEY_ACCOUNT_AUTHENTICATOR_RESPONSE response) - (.setSelector intent selector) (.putParcelable bundle AccountManager/KEY_INTENT intent) bundle)) diff --git a/src/clojure/io/cons/carddav_sync/authenticator_activity.clj b/src/clojure/io/cons/carddav_sync/authenticator_activity.clj index 1c8535a..bf8025c 100644 --- a/src/clojure/io/cons/carddav_sync/authenticator_activity.clj +++ b/src/clojure/io/cons/carddav_sync/authenticator_activity.clj @@ -1,6 +1,7 @@ (ns io.cons.carddav_sync.authenticator_activity (:use io.cons.carddav_sync.log [neko.activity :only [defactivity set-content-view!]] + [neko.init :only [init]] [neko.resource :only [get-resource]] [neko.threading :only [on-ui]] [neko.ui :only [make-ui]] @@ -48,6 +49,7 @@ (defn -onCreate [this savedInstanceState] (.superOnCreate this savedInstanceState) + (init this) (on-ui (set-content-view! this (make-ui [:scroll-view {} diff --git a/src/java/io/cons/carddav_sync/SplashActivity.java b/src/java/io/cons/carddav_sync/SplashActivity.java index b6b2b84..9bdc24e 100644 --- a/src/java/io/cons/carddav_sync/SplashActivity.java +++ b/src/java/io/cons/carddav_sync/SplashActivity.java @@ -23,16 +23,12 @@ public class SplashActivity extends Activity { public void onCreate(Bundle bundle) { super.onCreate(bundle); - Intent selector = getIntent().getSelector(); - if (selector == null) { - selector = new Intent("io.cons.carddav_sync.MAIN"); - } if (firstLaunch) { firstLaunch = false; setupSplash(); - loadClojure(selector); + loadClojure(); } else { - proceed(selector); + proceed(); } } @@ -47,12 +43,12 @@ public class SplashActivity extends Activity { circleView.startAnimation(rotation); } - public void proceed(final Intent selector) { - startActivity(selector); + public void proceed() { + startActivity(new Intent("io.cons.carddav_sync.MAIN")); finish(); } - public void loadClojure(final Intent selector) { + public void loadClojure() { new Thread(new Runnable(){ @Override public void run() { @@ -63,7 +59,7 @@ public class SplashActivity extends Activity { Var INIT = RT.var("neko.application", "init-application"); INIT.invoke(SplashActivity.this.getApplication()); - proceed(selector); + proceed(); } }).start(); } |