import android.os.Handler;\r
import android.os.IBinder;\r
import android.preference.PreferenceManager;\r
+import android.support.v4.app.DialogFragment;\r
import android.support.v4.app.Fragment;\r
import android.support.v4.app.FragmentManager;\r
import android.support.v4.app.FragmentTransaction;\r
import android.widget.TextView.OnEditorActionListener;\r
import android.widget.Toast;\r
\r
-import com.actionbarsherlock.app.SherlockDialogFragment;\r
import com.owncloud.android.MainApp;\r
import com.owncloud.android.R;\r
import com.owncloud.android.authentication.SsoWebViewClient.SsoWebViewClientListener;\r
/// Identifier of operation in progress which result shouldn't be lost \r
private long mWaitingForOpId = Long.MAX_VALUE;\r
\r
- private final String BASIC_TOKEN_TYPE = AccountTypeUtils.getAuthTokenTypePass(MainApp.getAccountType());\r
- private final String OAUTH_TOKEN_TYPE = AccountTypeUtils.getAuthTokenTypeAccessToken(MainApp.getAccountType());\r
+ private final String BASIC_TOKEN_TYPE = AccountTypeUtils.getAuthTokenTypePass(\r
+ MainApp.getAccountType());\r
+ private final String OAUTH_TOKEN_TYPE = AccountTypeUtils.getAuthTokenTypeAccessToken(\r
+ MainApp.getAccountType());\r
private final String SAML_TOKEN_TYPE =\r
AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType());\r
\r
dialog.show(getSupportFragmentManager(), WAIT_DIALOG_TAG);\r
\r
/// validate credentials accessing the root folder\r
- OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password);\r
+ OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(username,\r
+ password);\r
accessRootFolder(credentials);\r
}\r
\r
\r
} catch (AccountNotFoundException e) {\r
Log_OC.e(TAG, "Account " + mAccount + " was removed!", e);\r
- Toast.makeText(this, R.string.auth_account_does_not_exist, Toast.LENGTH_SHORT).show();\r
+ Toast.makeText(this, R.string.auth_account_does_not_exist,\r
+ Toast.LENGTH_SHORT).show();\r
finish();\r
}\r
}\r
Log_OC.d(TAG, "Got ACCESS TOKEN: " + mAuthToken);\r
\r
/// validate token accessing to root folder / getting session\r
- OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBearerCredentials(mAuthToken);\r
+ OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBearerCredentials(\r
+ mAuthToken);\r
accessRootFolder(credentials);\r
\r
} else {\r
\r
} catch (AccountNotFoundException e) {\r
Log_OC.e(TAG, "Account " + mAccount + " was removed!", e);\r
- Toast.makeText(this, R.string.auth_account_does_not_exist, Toast.LENGTH_SHORT).show();\r
+ Toast.makeText(this, R.string.auth_account_does_not_exist,\r
+ Toast.LENGTH_SHORT).show();\r
finish();\r
}\r
}\r
mAuthToken = sessionCookie;\r
getRemoteUserNameOperation(sessionCookie, true);\r
Fragment fd = getSupportFragmentManager().findFragmentByTag(SAML_DIALOG_TAG);\r
- if (fd != null && fd instanceof SherlockDialogFragment) {\r
- Dialog d = ((SherlockDialogFragment)fd).getDialog();\r
+ if (fd != null && fd instanceof DialogFragment) {\r
+ Dialog d = ((DialogFragment)fd).getDialog();\r
if (d != null && d.isShowing()) {\r
d.dismiss();\r
}\r
\r
private void dismissDialog(String dialogTag){\r
Fragment frag = getSupportFragmentManager().findFragmentByTag(dialogTag);\r
- if (frag != null && frag instanceof SherlockDialogFragment) {\r
- SherlockDialogFragment dialog = (SherlockDialogFragment) frag;\r
+ if (frag != null && frag instanceof DialogFragment) {\r
+ DialogFragment dialog = (DialogFragment) frag;\r
dialog.dismiss();\r
}\r
}\r