diff options
author | David Barksdale <amatus@amatus.name> | 2013-09-01 12:46:13 -0500 |
---|---|---|
committer | David Barksdale <amatus@amatus.name> | 2013-09-01 12:46:13 -0500 |
commit | 263608cc0d6642d793cc650e0a544e09f3d6815e (patch) | |
tree | 7ca6271f571e475158ce1e652d69cb872611c3fe /src/clojure/io/cons/carddav_sync/authenticator.clj | |
parent | 05fb3de39b40c22dda902b25705b2272df30e7e9 (diff) |
Add authenticator_activity.
Diffstat (limited to 'src/clojure/io/cons/carddav_sync/authenticator.clj')
-rw-r--r-- | src/clojure/io/cons/carddav_sync/authenticator.clj | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/clojure/io/cons/carddav_sync/authenticator.clj b/src/clojure/io/cons/carddav_sync/authenticator.clj index 99aefe7..c8bd349 100644 --- a/src/clojure/io/cons/carddav_sync/authenticator.clj +++ b/src/clojure/io/cons/carddav_sync/authenticator.clj @@ -1,18 +1,27 @@ (ns io.cons.carddav_sync.authenticator (:use io.cons.carddav_sync.log) + (:import android.accounts.AccountManager + android.content.Intent + android.os.Bundle + io.cons.carddav_sync.authenticator_activity) (:gen-class :extends android.accounts.AbstractAccountAuthenticator - :state state + :state context :init init)) (defn -init [context] - [[context] nil]) + [[context] context]) (defn -addAccount [this response accountType authTokenType requiredFeatures options] (log-i "addAccount") - nil) + (let [intent (Intent. (.context this) authenticator_activity) + bundle (Bundle.)] + (.putExtra intent AccountManager/KEY_ACCOUNT_AUTHENTICATOR_RESPONSE + response) + (.putParcelable bundle AccountManager/KEY_INTENT intent) + bundle)) (defn -confirmCredentials [this response account options] |