From: masensio Date: Tue, 14 Jan 2014 10:12:31 +0000 (+0100) Subject: Merge branch 'develop' into refactor_remote_saml_authentication X-Git-Tag: oc-android-1.5.5~73^2~8 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/b5ca58b712f9404d0afa00a7915ec183fa3ea29a?hp=bd5f59d3762ec7de779ec4944b149acdf7222190 Merge branch 'develop' into refactor_remote_saml_authentication --- diff --git a/oc_framework/src/com/owncloud/android/oc_framework/accounts/AccountUtils.java b/oc_framework/src/com/owncloud/android/oc_framework/accounts/AccountUtils.java index 810f3eba..20e5b078 100644 --- a/oc_framework/src/com/owncloud/android/oc_framework/accounts/AccountUtils.java +++ b/oc_framework/src/com/owncloud/android/oc_framework/accounts/AccountUtils.java @@ -24,6 +24,7 @@ import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.AccountsException; import android.content.Context; +import android.net.Uri; public class AccountUtils { public static final String WEBDAV_PATH_1_2 = "/webdav/owncloud.php"; @@ -34,6 +35,9 @@ public class AccountUtils { public static final String CARDDAV_PATH_2_0 = "/apps/contacts/carddav.php"; public static final String CARDDAV_PATH_4_0 = "/remote/carddav.php"; public static final String STATUS_PATH = "/status.php"; + + // Key for UserName in Saml Cookie + private static final String KEY_OC_USERNAME_EQUALS = "oc_username="; /** * @@ -125,5 +129,23 @@ public class AccountUtils { return mFailedAccount; } } + + /** + * Get the UserName for the SamlSso cookie + * @param authToken + * @return userName + */ + public static String getUserNameForSamlSso(String authToken) { + if (authToken != null) { + String [] cookies = authToken.split(";"); + for (int i=0; i. + * + */ + +package com.owncloud.android.oc_framework.accounts; + +import java.lang.ref.WeakReference; + +import android.graphics.Bitmap; +import android.net.http.SslError; +import android.os.Handler; +import android.os.Message; +import android.util.Log; +import android.view.KeyEvent; +import android.view.View; +import android.webkit.CookieManager; +import android.webkit.HttpAuthHandler; +import android.webkit.SslErrorHandler; +import android.webkit.WebResourceResponse; +import android.webkit.WebView; +import android.webkit.WebViewClient; + + +/** + * Custom {@link WebViewClient} client aimed to catch the end of a single-sign-on process + * running in the {@link WebView} that is attached to. + * + * Assumes that the single-sign-on is kept thanks to a cookie set at the end of the + * authentication process. + * + * @author David A. Velasco + */ +public class SsoWebViewClient extends WebViewClient { + + private static final String TAG = SsoWebViewClient.class.getSimpleName(); + + public interface SsoWebViewClientListener { + public void onSsoFinished(String sessionCookie); + } + + private Handler mListenerHandler; + private WeakReference mListenerRef; + private String mTargetUrl; + private String mLastReloadedUrlAtError; + + public SsoWebViewClient (Handler listenerHandler, SsoWebViewClientListener listener) { + mListenerHandler = listenerHandler; + mListenerRef = new WeakReference(listener); + mTargetUrl = "fake://url.to.be.set"; + mLastReloadedUrlAtError = null; + } + + public String getTargetUrl() { + return mTargetUrl; + } + + public void setTargetUrl(String targetUrl) { + mTargetUrl = targetUrl; + } + + @Override + public void onPageStarted (WebView view, String url, Bitmap favicon) { + Log.d(TAG, "onPageStarted : " + url); + super.onPageStarted(view, url, favicon); + } + + @Override + public void onFormResubmission (WebView view, Message dontResend, Message resend) { + Log.d(TAG, "onFormResubMission "); + + // necessary to grant reload of last page when device orientation is changed after sending a form + resend.sendToTarget(); + } + + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + return false; + } + + @Override + public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) { + Log.e(TAG, "onReceivedError : " + failingUrl + ", code " + errorCode + ", description: " + description); + if (!failingUrl.equals(mLastReloadedUrlAtError)) { + view.reload(); + mLastReloadedUrlAtError = failingUrl; + } else { + mLastReloadedUrlAtError = null; + super.onReceivedError(view, errorCode, description, failingUrl); + } + } + + @Override + public void onPageFinished (WebView view, String url) { + Log.d(TAG, "onPageFinished : " + url); + mLastReloadedUrlAtError = null; + if (url.startsWith(mTargetUrl)) { + view.setVisibility(View.GONE); + CookieManager cookieManager = CookieManager.getInstance(); + final String cookies = cookieManager.getCookie(url); + Log.d(TAG, "Cookies: " + cookies); + if (mListenerHandler != null && mListenerRef != null) { + // this is good idea because onPageFinished is not running in the UI thread + mListenerHandler.post(new Runnable() { + @Override + public void run() { + SsoWebViewClientListener listener = mListenerRef.get(); + if (listener != null) { + // Send Cookies to the listener + listener.onSsoFinished(cookies); + } + } + }); + } + } else { + Log.d(TAG, "URL==> " + url + " mTarget==> " + mTargetUrl); + } + } + + + @Override + public void doUpdateVisitedHistory (WebView view, String url, boolean isReload) { + Log.d(TAG, "doUpdateVisitedHistory : " + url); + } + + @Override + public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { + Log.d(TAG, "onReceivedSslError : " + error); + handler.proceed(); + } + + @Override + public void onReceivedHttpAuthRequest (WebView view, HttpAuthHandler handler, String host, String realm) { + Log.d(TAG, "onReceivedHttpAuthRequest : " + host); + } + + @Override + public WebResourceResponse shouldInterceptRequest (WebView view, String url) { + Log.d(TAG, "shouldInterceptRequest : " + url); + return null; + } + + @Override + public void onLoadResource (WebView view, String url) { + Log.d(TAG, "onLoadResource : " + url); + } + + @Override + public void onReceivedLoginRequest (WebView view, String realm, String account, String args) { + Log.d(TAG, "onReceivedLoginRequest : " + realm + ", " + account + ", " + args); + } + + @Override + public void onScaleChanged (WebView view, float oldScale, float newScale) { + Log.d(TAG, "onScaleChanged : " + oldScale + " -> " + newScale); + super.onScaleChanged(view, oldScale, newScale); + } + + @Override + public void onUnhandledKeyEvent (WebView view, KeyEvent event) { + Log.d(TAG, "onUnhandledKeyEvent : " + event); + } + + @Override + public boolean shouldOverrideKeyEvent (WebView view, KeyEvent event) { + Log.d(TAG, "shouldOverrideKeyEvent : " + event); + return false; + } + +} diff --git a/oc_framework/src/com/owncloud/android/oc_framework/operations/RemoteOperationResult.java b/oc_framework/src/com/owncloud/android/oc_framework/operations/RemoteOperationResult.java index 58accf9f..ada12d25 100644 --- a/oc_framework/src/com/owncloud/android/oc_framework/operations/RemoteOperationResult.java +++ b/oc_framework/src/com/owncloud/android/oc_framework/operations/RemoteOperationResult.java @@ -33,6 +33,7 @@ import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.jackrabbit.webdav.DavException; +import org.json.JSONException; import com.owncloud.android.oc_framework.accounts.AccountUtils.AccountNotFoundException; import com.owncloud.android.oc_framework.network.CertificateCombinedException; @@ -89,7 +90,8 @@ public class RemoteOperationResult implements Serializable { ACCOUNT_EXCEPTION, ACCOUNT_NOT_NEW, ACCOUNT_NOT_THE_SAME, - INVALID_CHARACTER_IN_NAME + INVALID_CHARACTER_IN_NAME, + JSON_EXCEPTION } private boolean mSuccess = false; @@ -99,11 +101,13 @@ public class RemoteOperationResult implements Serializable { private String mRedirectedLocation; private ArrayList mFiles; + private String mUserName; public RemoteOperationResult(ResultCode code) { mCode = code; mSuccess = (code == ResultCode.OK || code == ResultCode.OK_SSL || code == ResultCode.OK_NO_SSL); mFiles = null; + setUserName(""); } private RemoteOperationResult(boolean success, int httpCode) { @@ -192,6 +196,9 @@ public class RemoteOperationResult implements Serializable { mCode = ResultCode.SSL_ERROR; } + } else if (e instanceof JSONException) { + mCode = ResultCode.JSON_EXCEPTION; + } else { mCode = ResultCode.UNKNOWN_ERROR; } @@ -294,6 +301,8 @@ public class RemoteOperationResult implements Serializable { } else if (mException instanceof AccountsException) { return "Exception while using account"; + } else if (mException instanceof JSONException) { + return "JSON exception"; } else { return "Unexpected exception"; } @@ -349,4 +358,12 @@ public class RemoteOperationResult implements Serializable { mRedirectedLocation.toLowerCase().contains("wayf"))); } + public String getUserName() { + return mUserName; + } + + public void setUserName(String mUserName) { + this.mUserName = mUserName; + } + } diff --git a/oc_framework/src/com/owncloud/android/oc_framework/operations/remote/GetUserNameRemoteOperation.java b/oc_framework/src/com/owncloud/android/oc_framework/operations/remote/GetUserNameRemoteOperation.java new file mode 100644 index 00000000..d8e7626b --- /dev/null +++ b/oc_framework/src/com/owncloud/android/oc_framework/operations/remote/GetUserNameRemoteOperation.java @@ -0,0 +1,137 @@ + +/* ownCloud Android client application + * Copyright (C) 2012-2013 ownCloud Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +package com.owncloud.android.oc_framework.operations.remote; + +import java.io.IOException; + +import org.apache.commons.httpclient.HttpException; +import org.apache.commons.httpclient.methods.GetMethod; +import org.apache.http.HttpStatus; +import org.json.JSONException; +import org.json.JSONObject; + +import android.util.Log; + +import com.owncloud.android.oc_framework.network.webdav.WebdavClient; +import com.owncloud.android.oc_framework.operations.RemoteOperation; +import com.owncloud.android.oc_framework.operations.RemoteOperationResult; + + +/** + * @author masensio + * + * Get the UserName for a SAML connection, from a JSON with the format: + * id + * display-name + * email + */ + +public class GetUserNameRemoteOperation extends RemoteOperation { + + private static final String TAG = GetUserNameRemoteOperation.class.getSimpleName(); + + // 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"; + + // OCS Route + private static final String TAG_OCS_ROUTE ="/index.php/ocs/cloud/user?format=json"; + + // 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 String mUserName; + + public String getUserName() { + return mUserName; + } + + + public GetUserNameRemoteOperation(String url, String sessioncookie) { + mUrl = url; + mSessionCookie = sessioncookie; + } + + @Override + protected RemoteOperationResult run(WebdavClient client) { + RemoteOperationResult result = null; + int status = -1; + + // Get Method + GetMethod get = new GetMethod(mUrl + TAG_OCS_ROUTE); + Log.d(TAG, "URL ------> " + mUrl + TAG_OCS_ROUTE); + // 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 the user + try { + status = client.executeMethod(get); + if(isSuccess(status)) { + Log.d(TAG, "Obtain RESPONSE"); + String response = get.getResponseBodyAsString(); + + Log.d(TAG, "GET RESPONSE.................... " + response); + + // Parse the 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); + + // Result + result = new RemoteOperationResult(isSuccess(status), status, (get != null ? get.getResponseHeaders() : null)); + result.setUserName(displayName); + + Log.d(TAG, "Response: " + id + " - " + displayName + " - " + email); + + } + } catch (HttpException e) { + result = new RemoteOperationResult(e); + e.printStackTrace(); + } catch (IOException e) { + result = new RemoteOperationResult(e); + e.printStackTrace(); + } catch (JSONException e) { + result = new RemoteOperationResult(e); + e.printStackTrace(); + } finally { + get.releaseConnection(); + } + + return result; + } + + private boolean isSuccess(int status) { + return (status == HttpStatus.SC_OK); + } + +} diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index 456e284b..dd918e61 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -18,6 +18,8 @@ package com.owncloud.android.authentication; +import java.util.concurrent.ExecutionException; + import android.accounts.Account; import android.accounts.AccountManager; import android.app.AlertDialog; @@ -29,6 +31,7 @@ import android.content.SharedPreferences; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.net.Uri; +import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; @@ -52,9 +55,9 @@ import android.widget.TextView.OnEditorActionListener; import com.actionbarsherlock.app.SherlockDialogFragment; import com.owncloud.android.MainApp; 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.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.WebdavClient; import com.owncloud.android.operations.OAuth2GetAccessToken; @@ -64,6 +67,7 @@ import com.owncloud.android.oc_framework.operations.RemoteOperation; import com.owncloud.android.oc_framework.operations.RemoteOperationResult; import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode; import com.owncloud.android.oc_framework.operations.remote.ExistenceCheckRemoteOperation; +import com.owncloud.android.oc_framework.operations.remote.GetUserNameRemoteOperation; import com.owncloud.android.ui.dialog.SamlWebViewDialog; import com.owncloud.android.ui.dialog.SslValidatorDialog; import com.owncloud.android.ui.dialog.SslValidatorDialog.OnSslValidatorListener; @@ -102,8 +106,6 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList private static final String KEY_AUTH_STATUS_TEXT = "AUTH_STATUS_TEXT"; private static final String KEY_AUTH_STATUS_ICON = "AUTH_STATUS_ICON"; private static final String KEY_REFRESH_BUTTON_ENABLED = "KEY_REFRESH_BUTTON_ENABLED"; - - private static final String KEY_OC_USERNAME_EQUALS = "oc_username="; private static final String AUTH_ON = "on"; private static final String AUTH_OFF = "off"; @@ -794,8 +796,9 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList } } } - - + + + private void onSamlBasedFederatedSingleSignOnAuthorizationStart(RemoteOperation operation, RemoteOperationResult result) { try { dismissDialog(DIALOG_LOGIN_PROGRESS); @@ -1177,7 +1180,11 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList mAccountMgr.setAuthToken(mAccount, mAuthTokenType, mAuthToken); } else if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType)) { - String username = getUserNameForSamlSso(); + + String username= getUserNameForSaml(mHostBaseUrl); + 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); @@ -1217,8 +1224,10 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList Uri uri = Uri.parse(mHostBaseUrl); String username = mUsernameInput.getText().toString().trim(); if (isSaml) { - username = getUserNameForSamlSso(); - + username = getUserNameForSaml(mHostBaseUrl); + if (username == null) + return false; + } else if (isOAuth) { username = "OAuth_user" + (new java.util.Random(System.currentTimeMillis())).nextLong(); } @@ -1279,20 +1288,6 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList } } - - private String getUserNameForSamlSso() { - if (mAuthToken != null) { - String [] cookies = mAuthToken.split(";"); - for (int i=0; i{ + + @Override + protected String doInBackground(String... params) { + + String hostUrl = (String)params[0]; + + GetUserNameRemoteOperation getUserOperation = new GetUserNameRemoteOperation(hostUrl, mAuthToken); + WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(hostUrl), getApplicationContext(), true); + RemoteOperationResult result = getUserOperation.execute(client); + + return result.getUserName(); + } + + } + + /** + * Get the user name form OCS-API + * @param hostUrl + * @return username + */ + private String getUserNameForSaml(String hostUrl){ + + GetUserNameTask getUserTask = new GetUserNameTask(); + String username = null; + try { + username = getUserTask.execute(mHostBaseUrl).get(); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (ExecutionException e) { + e.printStackTrace(); + } + + return username; + } } diff --git a/src/com/owncloud/android/authentication/SsoWebViewClient.java b/src/com/owncloud/android/authentication/SsoWebViewClient.java deleted file mode 100644 index 8d80e9b7..00000000 --- a/src/com/owncloud/android/authentication/SsoWebViewClient.java +++ /dev/null @@ -1,176 +0,0 @@ -/* ownCloud Android client application - * Copyright (C) 2012-2013 ownCloud Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -package com.owncloud.android.authentication; - -import java.lang.ref.WeakReference; - -import com.owncloud.android.utils.Log_OC; - - -import android.graphics.Bitmap; -import android.os.Handler; -import android.os.Message; -import android.view.View; -import android.webkit.CookieManager; -import android.webkit.WebView; -import android.webkit.WebViewClient; - - -/** - * Custom {@link WebViewClient} client aimed to catch the end of a single-sign-on process - * running in the {@link WebView} that is attached to. - * - * Assumes that the single-sign-on is kept thanks to a cookie set at the end of the - * authentication process. - * - * @author David A. Velasco - */ -public class SsoWebViewClient extends WebViewClient { - - private static final String TAG = SsoWebViewClient.class.getSimpleName(); - - public interface SsoWebViewClientListener { - public void onSsoFinished(String sessionCookie); - } - - private Handler mListenerHandler; - private WeakReference mListenerRef; - private String mTargetUrl; - private String mLastReloadedUrlAtError; - - public SsoWebViewClient (Handler listenerHandler, SsoWebViewClientListener listener) { - mListenerHandler = listenerHandler; - mListenerRef = new WeakReference(listener); - mTargetUrl = "fake://url.to.be.set"; - mLastReloadedUrlAtError = null; - } - - public String getTargetUrl() { - return mTargetUrl; - } - - public void setTargetUrl(String targetUrl) { - mTargetUrl = targetUrl; - } - - @Override - public void onPageStarted (WebView view, String url, Bitmap favicon) { - Log_OC.d(TAG, "onPageStarted : " + url); - super.onPageStarted(view, url, favicon); - } - - @Override - public void onFormResubmission (WebView view, Message dontResend, Message resend) { - Log_OC.d(TAG, "onFormResubMission "); - - // necessary to grant reload of last page when device orientation is changed after sending a form - resend.sendToTarget(); - } - - @Override - public boolean shouldOverrideUrlLoading(WebView view, String url) { - return false; - } - - @Override - public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) { - Log_OC.e(TAG, "onReceivedError : " + failingUrl + ", code " + errorCode + ", description: " + description); - if (!failingUrl.equals(mLastReloadedUrlAtError)) { - view.reload(); - mLastReloadedUrlAtError = failingUrl; - } else { - mLastReloadedUrlAtError = null; - super.onReceivedError(view, errorCode, description, failingUrl); - } - } - - @Override - public void onPageFinished (WebView view, String url) { - Log_OC.d(TAG, "onPageFinished : " + url); - mLastReloadedUrlAtError = null; - if (url.startsWith(mTargetUrl)) { - view.setVisibility(View.GONE); - CookieManager cookieManager = CookieManager.getInstance(); - final String cookies = cookieManager.getCookie(url); - //Log_OC.d(TAG, "Cookies: " + cookies); - if (mListenerHandler != null && mListenerRef != null) { - // this is good idea because onPageFinished is not running in the UI thread - mListenerHandler.post(new Runnable() { - @Override - public void run() { - SsoWebViewClientListener listener = mListenerRef.get(); - if (listener != null) { - listener.onSsoFinished(cookies); - } - } - }); - } - } - - } - - /* - @Override - public void doUpdateVisitedHistory (WebView view, String url, boolean isReload) { - Log_OC.d(TAG, "doUpdateVisitedHistory : " + url); - } - - @Override - public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { - Log_OC.d(TAG, "onReceivedSslError : " + error); - } - - @Override - public void onReceivedHttpAuthRequest (WebView view, HttpAuthHandler handler, String host, String realm) { - Log_OC.d(TAG, "onReceivedHttpAuthRequest : " + host); - } - - @Override - public WebResourceResponse shouldInterceptRequest (WebView view, String url) { - Log_OC.d(TAG, "shouldInterceptRequest : " + url); - return null; - } - - @Override - public void onLoadResource (WebView view, String url) { - Log_OC.d(TAG, "onLoadResource : " + url); - } - - @Override - public void onReceivedLoginRequest (WebView view, String realm, String account, String args) { - Log_OC.d(TAG, "onReceivedLoginRequest : " + realm + ", " + account + ", " + args); - } - - @Override - public void onScaleChanged (WebView view, float oldScale, float newScale) { - Log_OC.d(TAG, "onScaleChanged : " + oldScale + " -> " + newScale); - super.onScaleChanged(view, oldScale, newScale); - } - - @Override - public void onUnhandledKeyEvent (WebView view, KeyEvent event) { - Log_OC.d(TAG, "onUnhandledKeyEvent : " + event); - } - - @Override - public boolean shouldOverrideKeyEvent (WebView view, KeyEvent event) { - Log_OC.d(TAG, "shouldOverrideKeyEvent : " + event); - return false; - } - */ -} diff --git a/src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java b/src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java index 91c607e4..9927dc84 100644 --- a/src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java +++ b/src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java @@ -36,8 +36,8 @@ import android.webkit.WebView; import com.actionbarsherlock.app.SherlockDialogFragment; import com.owncloud.android.R; -import com.owncloud.android.authentication.SsoWebViewClient; -import com.owncloud.android.authentication.SsoWebViewClient.SsoWebViewClientListener; +import com.owncloud.android.oc_framework.accounts.SsoWebViewClient; +import com.owncloud.android.oc_framework.accounts.SsoWebViewClient.SsoWebViewClientListener; import com.owncloud.android.oc_framework.network.webdav.WebdavClient; import com.owncloud.android.utils.Log_OC;