From 263608cc0d6642d793cc650e0a544e09f3d6815e Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Sun, 1 Sep 2013 12:46:13 -0500 Subject: Add authenticator_activity. --- src/clojure/io/cons/carddav_sync/authenticator.clj | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/clojure/io/cons/carddav_sync/authenticator.clj') 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] -- cgit v1.2.3-18-g5258