Browse Source

OC-2633: Fixes for comments in code. PR #347

masensio 11 years ago
parent
commit
10dac35232

+ 3 - 16
oc_framework/src/com/owncloud/android/oc_framework/operations/RemoteOperationResult.java

@@ -52,9 +52,9 @@ import android.util.Log;
  * @author David A. Velasco
  * @author David A. Velasco
  */
  */
 public class RemoteOperationResult implements Serializable {
 public class RemoteOperationResult implements Serializable {
-
+	
 	/** Generated - should be refreshed every time the class changes!! */
 	/** Generated - should be refreshed every time the class changes!! */
-	private static final long serialVersionUID = -2469951225222759283L;
+	private static final long serialVersionUID = -8257349554488668693L;
     
     
     private static final String TAG = "RemoteOperationResult";
     private static final String TAG = "RemoteOperationResult";
     
     
@@ -91,7 +91,6 @@ public class RemoteOperationResult implements Serializable {
         ACCOUNT_NOT_NEW, 
         ACCOUNT_NOT_NEW, 
         ACCOUNT_NOT_THE_SAME,
         ACCOUNT_NOT_THE_SAME,
         INVALID_CHARACTER_IN_NAME,
         INVALID_CHARACTER_IN_NAME,
-        JSON_EXCEPTION
     }
     }
 
 
     private boolean mSuccess = false;
     private boolean mSuccess = false;
@@ -101,13 +100,11 @@ public class RemoteOperationResult implements Serializable {
     private String mRedirectedLocation;
     private String mRedirectedLocation;
 
 
     private ArrayList<RemoteFile> mFiles;
     private ArrayList<RemoteFile> mFiles;
-    private String mUserName;
     
     
     public RemoteOperationResult(ResultCode code) {
     public RemoteOperationResult(ResultCode code) {
         mCode = code;
         mCode = code;
         mSuccess = (code == ResultCode.OK || code == ResultCode.OK_SSL || code == ResultCode.OK_NO_SSL);
         mSuccess = (code == ResultCode.OK || code == ResultCode.OK_SSL || code == ResultCode.OK_NO_SSL);
         mFiles = null;
         mFiles = null;
-        setUserName("");
     }
     }
 
 
     private RemoteOperationResult(boolean success, int httpCode) {
     private RemoteOperationResult(boolean success, int httpCode) {
@@ -196,9 +193,6 @@ public class RemoteOperationResult implements Serializable {
                 mCode = ResultCode.SSL_ERROR;
                 mCode = ResultCode.SSL_ERROR;
             }
             }
 
 
-        } else if (e instanceof JSONException) {
-        	mCode = ResultCode.JSON_EXCEPTION;
-        	
         } else {
         } else {
             mCode = ResultCode.UNKNOWN_ERROR;
             mCode = ResultCode.UNKNOWN_ERROR;
         }
         }
@@ -303,6 +297,7 @@ public class RemoteOperationResult implements Serializable {
                 
                 
             } else if (mException instanceof JSONException) {
             } else if (mException instanceof JSONException) {
             	return "JSON exception";
             	return "JSON exception";
+            	
             } else {
             } else {
                 return "Unexpected exception";
                 return "Unexpected exception";
             }
             }
@@ -358,12 +353,4 @@ public class RemoteOperationResult implements Serializable {
                 mRedirectedLocation.toLowerCase().contains("wayf")));
                 mRedirectedLocation.toLowerCase().contains("wayf")));
     }
     }
 
 
-	public String getUserName() {
-		return mUserName;
-	}
-
-	public void setUserName(String mUserName) {
-		this.mUserName = mUserName;
-	}
-
 }
 }

+ 19 - 29
oc_framework/src/com/owncloud/android/oc_framework/operations/remote/GetUserNameRemoteOperation.java

@@ -46,25 +46,19 @@ public class GetUserNameRemoteOperation extends RemoteOperation {
 	private static final String TAG = GetUserNameRemoteOperation.class.getSimpleName();
 	private static final String TAG = GetUserNameRemoteOperation.class.getSimpleName();
 
 
 	// HEADER
 	// HEADER
-	private static final String TAG_HEADER_OCS_API = "OCS-APIREQUEST";
-	private static final String TAG_HEADER_OCS_API_VALUE = "true";
-	
-	private static final String TAG_HEADER_CONTENT = "Content-Type";
-	private static final String TAG_HEADER_CONTENT_VALUE = "application/xml";
-	private static final String TAG_HEADER_COOKIE = "Cookie";
+	private static final String HEADER_OCS_API = "OCS-APIREQUEST";
+	private static final String HEADER_OCS_API_VALUE = "true";
 
 
 	// OCS Route
 	// OCS Route
-	private static final String TAG_OCS_ROUTE ="/index.php/ocs/cloud/user?format=json"; 
+	private static final String OCS_ROUTE ="/index.php/ocs/cloud/user?format=json"; 
 
 
 	// JSON Node names
 	// JSON Node names
-	private static final String TAG_OCS = "ocs";
-	private static final String TAG_DATA = "data";
-	private static final String TAG_ID = "id";
-	private static final String TAG_DISPLAY_NAME= "display-name";
-	private static final String TAG_EMAIL= "email";
-
-	private String mUrl;
-	private String mSessionCookie;
+	private static final String NODE_OCS = "ocs";
+	private static final String NODE_DATA = "data";
+	private static final String NODE_ID = "id";
+	private static final String NODE_DISPLAY_NAME= "display-name";
+	private static final String NODE_EMAIL= "email";
+
 	private String mUserName;
 	private String mUserName;
 
 
 	public String getUserName() {
 	public String getUserName() {
@@ -72,9 +66,7 @@ public class GetUserNameRemoteOperation extends RemoteOperation {
 	}
 	}
 
 
 	
 	
-	public GetUserNameRemoteOperation(String url, String sessioncookie) {
-		mUrl = url;
-		mSessionCookie = sessioncookie;
+	public GetUserNameRemoteOperation() {
 	}
 	}
 
 
 	@Override
 	@Override
@@ -83,12 +75,10 @@ public class GetUserNameRemoteOperation extends RemoteOperation {
         int status = -1;
         int status = -1;
         
         
         // Get Method
         // Get Method
-        GetMethod get = new GetMethod(mUrl + TAG_OCS_ROUTE);
-        Log.d(TAG, "URL ------> " + mUrl + TAG_OCS_ROUTE);
+        GetMethod get = new GetMethod(client.getBaseUri() + OCS_ROUTE);
+        Log.d(TAG, "URL ------> " + client.getBaseUri() + OCS_ROUTE);
         // Add the Header
         // Add the Header
-        get.addRequestHeader(TAG_HEADER_CONTENT, TAG_HEADER_CONTENT_VALUE);
-        get.addRequestHeader(TAG_HEADER_OCS_API, TAG_HEADER_OCS_API_VALUE);
-        get.setRequestHeader(TAG_HEADER_COOKIE, mSessionCookie);
+        get.addRequestHeader(HEADER_OCS_API, HEADER_OCS_API_VALUE);
         
         
         //Get the user
         //Get the user
         try {
         try {
@@ -101,15 +91,15 @@ public class GetUserNameRemoteOperation extends RemoteOperation {
 
 
 				 // Parse the response
 				 // Parse the response
 				 JSONObject respJSON = new JSONObject(response);
 				 JSONObject respJSON = new JSONObject(response);
-				 JSONObject respOCS = respJSON.getJSONObject(TAG_OCS);
-				 JSONObject respData = respOCS.getJSONObject(TAG_DATA);
-				 String id = respData.getString(TAG_ID);
-				 String displayName = respData.getString(TAG_DISPLAY_NAME);
-				 String email = respData.getString(TAG_EMAIL);
+				 JSONObject respOCS = respJSON.getJSONObject(NODE_OCS);
+				 JSONObject respData = respOCS.getJSONObject(NODE_DATA);
+				 String id = respData.getString(NODE_ID);
+				 String displayName = respData.getString(NODE_DISPLAY_NAME);
+				 String email = respData.getString(NODE_EMAIL);
 				 
 				 
 				 // Result
 				 // Result
 				 result = new RemoteOperationResult(isSuccess(status), status, (get != null ? get.getResponseHeaders() : null));
 				 result = new RemoteOperationResult(isSuccess(status), status, (get != null ? get.getResponseHeaders() : null));
-				 result.setUserName(displayName);
+				 mUserName =  displayName;
 				 
 				 
 				 Log.d(TAG, "Response: " + id + " - " + displayName + " - " + email);
 				 Log.d(TAG, "Response: " + id + " - " + displayName + " - " + email);
 				 
 				 

+ 42 - 75
src/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -18,8 +18,6 @@
 
 
 package com.owncloud.android.authentication;
 package com.owncloud.android.authentication;
 
 
-import java.util.concurrent.ExecutionException;
-
 import android.accounts.Account;
 import android.accounts.Account;
 import android.accounts.AccountManager;
 import android.accounts.AccountManager;
 import android.app.AlertDialog;
 import android.app.AlertDialog;
@@ -31,7 +29,6 @@ import android.content.SharedPreferences;
 import android.graphics.Rect;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
 import android.net.Uri;
-import android.os.AsyncTask;
 import android.os.Bundle;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.preference.PreferenceManager;
@@ -55,9 +52,9 @@ import android.widget.TextView.OnEditorActionListener;
 import com.actionbarsherlock.app.SherlockDialogFragment;
 import com.actionbarsherlock.app.SherlockDialogFragment;
 import com.owncloud.android.MainApp;
 import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.R;
+import com.owncloud.android.authentication.SsoWebViewClient.SsoWebViewClientListener;
 import com.owncloud.android.oc_framework.accounts.AccountTypeUtils;
 import com.owncloud.android.oc_framework.accounts.AccountTypeUtils;
 import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
 import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
-import com.owncloud.android.oc_framework.accounts.SsoWebViewClient.SsoWebViewClientListener;
 import com.owncloud.android.oc_framework.network.webdav.OwnCloudClientFactory;
 import com.owncloud.android.oc_framework.network.webdav.OwnCloudClientFactory;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
 import com.owncloud.android.operations.OAuth2GetAccessToken;
 import com.owncloud.android.operations.OAuth2GetAccessToken;
@@ -794,10 +791,41 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
             } else {
             } else {
                 onAuthorizationCheckFinish((ExistenceCheckRemoteOperation)operation, result);
                 onAuthorizationCheckFinish((ExistenceCheckRemoteOperation)operation, result);
             }
             }
+        } else if (operation instanceof GetUserNameRemoteOperation) {
+            onGetUserNameFinish((GetUserNameRemoteOperation) operation, result);
+             
         }
         }
+        
     }
     }
 
 
-
+    private void onGetUserNameFinish(GetUserNameRemoteOperation operation, RemoteOperationResult result) {
+        if (result.isSuccess()) {
+            boolean success = false;
+            String username = operation.getUserName();
+            
+            if ( mAction == ACTION_CREATE) {
+                mUsernameInput.setText(username);
+                createAccount();
+                success = true;
+            } else {
+                
+                if (!mUsernameInput.getText().toString().equals(username)) {
+                    // fail - not a new account, but an existing one; disallow
+                    result = new RemoteOperationResult(ResultCode.ACCOUNT_NOT_THE_SAME); 
+                    updateAuthStatusIconAndText(result);
+                    showAuthStatus();
+                    Log_OC.d(TAG, result.getLogMessage());
+                } else {
+                  updateToken();
+                  success = true;
+                }
+            }
+            
+            if (success)
+                finish();
+        }
+        
+    }
 
 
     private void onSamlBasedFederatedSingleSignOnAuthorizationStart(RemoteOperation operation, RemoteOperationResult result) {
     private void onSamlBasedFederatedSingleSignOnAuthorizationStart(RemoteOperation operation, RemoteOperationResult result) {
         try {
         try {
@@ -1123,7 +1151,8 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
                 success = createAccount();
                 success = createAccount();
 
 
             } else {
             } else {
-                success = updateToken();
+                updateToken();
+                success = true;
             }
             }
 
 
             if (success) {
             if (success) {
@@ -1169,7 +1198,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
      * Sets the proper response to get that the Account Authenticator that started this activity saves 
      * Sets the proper response to get that the Account Authenticator that started this activity saves 
      * a new authorization token for mAccount.
      * a new authorization token for mAccount.
      */
      */
-    private boolean updateToken() {
+    private void updateToken() {
         Bundle response = new Bundle();
         Bundle response = new Bundle();
         response.putString(AccountManager.KEY_ACCOUNT_NAME, mAccount.name);
         response.putString(AccountManager.KEY_ACCOUNT_NAME, mAccount.name);
         response.putString(AccountManager.KEY_ACCOUNT_TYPE, mAccount.type);
         response.putString(AccountManager.KEY_ACCOUNT_TYPE, mAccount.type);
@@ -1181,20 +1210,6 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
             
             
         } else if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType)) {
         } else if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType)) {
             
             
-            String username= getUserNameForSaml();
-            if (username == null)
-                return false;
-            
-            if (!mUsernameInput.getText().toString().equals(username)) {
-                // fail - not a new account, but an existing one; disallow
-                RemoteOperationResult result = new RemoteOperationResult(ResultCode.ACCOUNT_NOT_THE_SAME); 
-                updateAuthStatusIconAndText(result);
-                showAuthStatus();
-                Log_OC.d(TAG, result.getLogMessage());
-                
-                return false;
-            }
-            
             response.putString(AccountManager.KEY_AUTHTOKEN, mAuthToken);
             response.putString(AccountManager.KEY_AUTHTOKEN, mAuthToken);
             // the next line is necessary; by now, notifications are calling directly to the AuthenticatorActivity to update, without AccountManager intervention
             // the next line is necessary; by now, notifications are calling directly to the AuthenticatorActivity to update, without AccountManager intervention
             mAccountMgr.setAuthToken(mAccount, mAuthTokenType, mAuthToken);
             mAccountMgr.setAuthToken(mAccount, mAuthTokenType, mAuthToken);
@@ -1205,7 +1220,6 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         }
         }
         setAccountAuthenticatorResult(response);
         setAccountAuthenticatorResult(response);
         
         
-        return true;
     }
     }
 
 
 
 
@@ -1223,12 +1237,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
 
 
         Uri uri = Uri.parse(mHostBaseUrl);
         Uri uri = Uri.parse(mHostBaseUrl);
         String username = mUsernameInput.getText().toString().trim();
         String username = mUsernameInput.getText().toString().trim();
-        if (isSaml) {
-            username = getUserNameForSaml();
-            if (username == null)
-                return false;
-
-        } else if (isOAuth) {
+        if (isOAuth) {
             username = "OAuth_user" + (new java.util.Random(System.currentTimeMillis())).nextLong();
             username = "OAuth_user" + (new java.util.Random(System.currentTimeMillis())).nextLong();
         }            
         }            
         String accountName = username + "@" + uri.getHost();
         String accountName = username + "@" + uri.getHost();
@@ -1588,16 +1597,11 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         
         
         if (sessionCookie != null && sessionCookie.length() > 0) {
         if (sessionCookie != null && sessionCookie.length() > 0) {
             mAuthToken = sessionCookie;
             mAuthToken = sessionCookie;
-            boolean success = false;
-            if (mAction == ACTION_CREATE) {
-                success = createAccount();
-        
-            } else {
-                success = updateToken();
-            }
-            if (success) {
-                finish();
-            }
+
+            GetUserNameRemoteOperation getUserOperation = new GetUserNameRemoteOperation();            
+            WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl), getApplicationContext(), true);
+            client.setSsoSessionCookie(mAuthToken);
+            getUserOperation.execute(client, this, mHandler);
         }
         }
 
 
             
             
@@ -1648,41 +1652,4 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         return super.onTouchEvent(event);
         return super.onTouchEvent(event);
     }
     }
     
     
-    
-    /**
-     * Asynchronous task to get the SAML User name from OCS-API
-     *
-     */
-    private class GetUserNameTask extends AsyncTask<Void, Void, String>{
-
-        @Override
-        protected String doInBackground(Void... params) {
-            
-            GetUserNameRemoteOperation getUserOperation = new GetUserNameRemoteOperation(mHostBaseUrl, mAuthToken);
-            WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl), getApplicationContext(), true);
-            RemoteOperationResult result = getUserOperation.execute(client);
-          
-            return result.getUserName();
-        }
-        
-    }
-
-    /**
-     * Get the user name form OCS-API
-     * @return username
-     */
-    private String getUserNameForSaml(){
-
-        GetUserNameTask getUserTask = new GetUserNameTask();
-        String username = null;
-        try {
-            username = getUserTask.execute().get();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        } catch (ExecutionException e) {
-            e.printStackTrace();
-        }
-
-        return username;
-    }
 }
 }

+ 17 - 16
oc_framework/src/com/owncloud/android/oc_framework/accounts/SsoWebViewClient.java → src/com/owncloud/android/authentication/SsoWebViewClient.java

@@ -15,15 +15,16 @@
  *
  *
  */
  */
 
 
-package com.owncloud.android.oc_framework.accounts;
+package com.owncloud.android.authentication;
 
 
 import java.lang.ref.WeakReference;
 import java.lang.ref.WeakReference;
 
 
+import com.owncloud.android.utils.Log_OC;
+
 import android.graphics.Bitmap;
 import android.graphics.Bitmap;
 import android.net.http.SslError;
 import android.net.http.SslError;
 import android.os.Handler;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Message;
-import android.util.Log;
 import android.view.KeyEvent;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.View;
 import android.webkit.CookieManager;
 import android.webkit.CookieManager;
@@ -73,13 +74,13 @@ public class SsoWebViewClient extends WebViewClient {
 
 
     @Override
     @Override
     public void onPageStarted (WebView view, String url, Bitmap favicon) {
     public void onPageStarted (WebView view, String url, Bitmap favicon) {
-        Log.d(TAG, "onPageStarted : " + url);
+        Log_OC.d(TAG, "onPageStarted : " + url);
         super.onPageStarted(view, url, favicon);
         super.onPageStarted(view, url, favicon);
     }
     }
     
     
     @Override
     @Override
     public void onFormResubmission (WebView view, Message dontResend, Message resend) {
     public void onFormResubmission (WebView view, Message dontResend, Message resend) {
-        Log.d(TAG, "onFormResubMission ");
+        Log_OC.d(TAG, "onFormResubMission ");
 
 
         // necessary to grant reload of last page when device orientation is changed after sending a form
         // necessary to grant reload of last page when device orientation is changed after sending a form
         resend.sendToTarget();
         resend.sendToTarget();
@@ -92,7 +93,7 @@ public class SsoWebViewClient extends WebViewClient {
     
     
     @Override
     @Override
     public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) {
     public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) {
-        Log.e(TAG, "onReceivedError : " + failingUrl + ", code " + errorCode + ", description: " + description);
+        Log_OC.e(TAG, "onReceivedError : " + failingUrl + ", code " + errorCode + ", description: " + description);
         if (!failingUrl.equals(mLastReloadedUrlAtError)) {
         if (!failingUrl.equals(mLastReloadedUrlAtError)) {
             view.reload();
             view.reload();
             mLastReloadedUrlAtError = failingUrl;
             mLastReloadedUrlAtError = failingUrl;
@@ -104,13 +105,13 @@ public class SsoWebViewClient extends WebViewClient {
     
     
     @Override
     @Override
     public void onPageFinished (WebView view, String url) {
     public void onPageFinished (WebView view, String url) {
-        Log.d(TAG, "onPageFinished : " + url);
+        Log_OC.d(TAG, "onPageFinished : " + url);
         mLastReloadedUrlAtError = null;
         mLastReloadedUrlAtError = null;
         if (url.startsWith(mTargetUrl)) {
         if (url.startsWith(mTargetUrl)) {
             view.setVisibility(View.GONE);
             view.setVisibility(View.GONE);
             CookieManager cookieManager = CookieManager.getInstance();
             CookieManager cookieManager = CookieManager.getInstance();
             final String cookies = cookieManager.getCookie(url);
             final String cookies = cookieManager.getCookie(url);
-            Log.d(TAG, "Cookies: " + cookies);
+            Log_OC.d(TAG, "Cookies: " + cookies);
             if (mListenerHandler != null && mListenerRef != null) {
             if (mListenerHandler != null && mListenerRef != null) {
                 // this is good idea because onPageFinished is not running in the UI thread
                 // this is good idea because onPageFinished is not running in the UI thread
                 mListenerHandler.post(new Runnable() {
                 mListenerHandler.post(new Runnable() {
@@ -130,50 +131,50 @@ public class SsoWebViewClient extends WebViewClient {
     
     
     @Override
     @Override
     public void doUpdateVisitedHistory (WebView view, String url, boolean isReload) {
     public void doUpdateVisitedHistory (WebView view, String url, boolean isReload) {
-        Log.d(TAG, "doUpdateVisitedHistory : " + url);
+        Log_OC.d(TAG, "doUpdateVisitedHistory : " + url);
     }
     }
     
     
     @Override
     @Override
     public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) {
     public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) {
-        Log.d(TAG, "onReceivedSslError : " + error);
+        Log_OC.d(TAG, "onReceivedSslError : " + error);
         handler.proceed();
         handler.proceed();
     }
     }
     
     
     @Override
     @Override
     public void onReceivedHttpAuthRequest (WebView view, HttpAuthHandler handler, String host, String realm) {
     public void onReceivedHttpAuthRequest (WebView view, HttpAuthHandler handler, String host, String realm) {
-        Log.d(TAG, "onReceivedHttpAuthRequest : " + host);
+        Log_OC.d(TAG, "onReceivedHttpAuthRequest : " + host);
     }
     }
 
 
     @Override
     @Override
     public WebResourceResponse shouldInterceptRequest (WebView view, String url) {
     public WebResourceResponse shouldInterceptRequest (WebView view, String url) {
-        Log.d(TAG, "shouldInterceptRequest : " + url);
+        Log_OC.d(TAG, "shouldInterceptRequest : " + url);
         return null;
         return null;
     }
     }
     
     
     @Override
     @Override
     public void onLoadResource (WebView view, String url) {
     public void onLoadResource (WebView view, String url) {
-        Log.d(TAG, "onLoadResource : " + url);   
+        Log_OC.d(TAG, "onLoadResource : " + url);   
     }
     }
     
     
     @Override
     @Override
     public void onReceivedLoginRequest (WebView view, String realm, String account, String args) {
     public void onReceivedLoginRequest (WebView view, String realm, String account, String args) {
-        Log.d(TAG, "onReceivedLoginRequest : " + realm + ", " + account + ", " + args);
+        Log_OC.d(TAG, "onReceivedLoginRequest : " + realm + ", " + account + ", " + args);
     }
     }
     
     
     @Override
     @Override
     public void onScaleChanged (WebView view, float oldScale, float newScale) {
     public void onScaleChanged (WebView view, float oldScale, float newScale) {
-        Log.d(TAG, "onScaleChanged : " + oldScale + " -> " + newScale);
+        Log_OC.d(TAG, "onScaleChanged : " + oldScale + " -> " + newScale);
         super.onScaleChanged(view, oldScale, newScale);
         super.onScaleChanged(view, oldScale, newScale);
     }
     }
 
 
     @Override
     @Override
     public void onUnhandledKeyEvent (WebView view, KeyEvent event) {
     public void onUnhandledKeyEvent (WebView view, KeyEvent event) {
-        Log.d(TAG, "onUnhandledKeyEvent : " + event);
+        Log_OC.d(TAG, "onUnhandledKeyEvent : " + event);
     }
     }
     
     
     @Override
     @Override
     public boolean shouldOverrideKeyEvent (WebView view, KeyEvent event) {
     public boolean shouldOverrideKeyEvent (WebView view, KeyEvent event) {
-        Log.d(TAG, "shouldOverrideKeyEvent : " + event);
+        Log_OC.d(TAG, "shouldOverrideKeyEvent : " + event);
         return false;
         return false;
     }
     }
 
 

+ 2 - 2
src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java

@@ -36,8 +36,8 @@ import android.webkit.WebView;
 
 
 import com.actionbarsherlock.app.SherlockDialogFragment;
 import com.actionbarsherlock.app.SherlockDialogFragment;
 import com.owncloud.android.R;
 import com.owncloud.android.R;
-import com.owncloud.android.oc_framework.accounts.SsoWebViewClient;
-import com.owncloud.android.oc_framework.accounts.SsoWebViewClient.SsoWebViewClientListener;
+import com.owncloud.android.authentication.SsoWebViewClient;
+import com.owncloud.android.authentication.SsoWebViewClient.SsoWebViewClientListener;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
 import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
 import com.owncloud.android.utils.Log_OC;
 import com.owncloud.android.utils.Log_OC;