mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-08 16:36:13 +00:00
make "UTF-8" String a constant
This commit is contained in:
parent
f69814f574
commit
3f89bf20a4
@ -47,7 +47,7 @@ public class OwnCloudBasicCredentials implements OwnCloudCredentials {
|
||||
client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
|
||||
|
||||
client.getParams().setAuthenticationPreemptive(true);
|
||||
client.getParams().setCredentialCharset("UTF-8");
|
||||
client.getParams().setCredentialCharset(CREDENTIAL_CHARSET);
|
||||
client.getState().setCredentials(
|
||||
AuthScope.ANY,
|
||||
new UsernamePasswordCredentials(mUsername, mPassword)
|
||||
|
@ -49,7 +49,7 @@ public class OwnCloudBearerCredentials implements OwnCloudCredentials {
|
||||
client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
|
||||
|
||||
client.getParams().setAuthenticationPreemptive(true);
|
||||
client.getParams().setCredentialCharset("UTF-8");
|
||||
client.getParams().setCredentialCharset(CREDENTIAL_CHARSET);
|
||||
client.getState().setCredentials(
|
||||
AuthScope.ANY,
|
||||
new BearerCredentials(mAccessToken)
|
||||
|
@ -25,6 +25,7 @@
|
||||
package com.owncloud.android.lib.common;
|
||||
|
||||
public interface OwnCloudCredentials {
|
||||
public static final String CREDENTIAL_CHARSET = "UTF-8";
|
||||
|
||||
public void applyTo(OwnCloudClient ownCloudClient);
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class OwnCloudSamlSsoCredentials implements OwnCloudCredentials {
|
||||
@Override
|
||||
public void applyTo(OwnCloudClient client) {
|
||||
client.getParams().setAuthenticationPreemptive(false);
|
||||
client.getParams().setCredentialCharset("UTF-8");
|
||||
client.getParams().setCredentialCharset(CREDENTIAL_CHARSET);
|
||||
client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
|
||||
client.setFollowRedirects(false);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user