mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Astyle
This commit is contained in:
parent
4e48366243
commit
7cbbd72fac
@ -684,7 +684,7 @@ public class Account implements BaseAccount {
|
||||
successful = true;
|
||||
} catch (MessagingException e) {
|
||||
Log.e(K9.LOG_TAG, "Switching local storage provider from " +
|
||||
mLocalStorageProviderId + " to " + id + " failed.", e);
|
||||
mLocalStorageProviderId + " to " + id + " failed.", e);
|
||||
} finally {
|
||||
// if migration to/from SD-card failed once, it will fail again.
|
||||
if (!successful) {
|
||||
|
@ -2021,23 +2021,23 @@ public class LocalStore extends Store implements Serializable {
|
||||
}
|
||||
|
||||
public void destroyMessages(final Message[] messages) throws MessagingException {
|
||||
try {
|
||||
database.execute(true, new DbCallback<Void>() {
|
||||
@Override
|
||||
public Void doDbWork(final SQLiteDatabase db) throws WrappedException, UnavailableStorageException {
|
||||
for (Message message : messages) {
|
||||
try {
|
||||
message.destroy();
|
||||
} catch (MessagingException e) {
|
||||
throw new WrappedException(e);
|
||||
}
|
||||
try {
|
||||
database.execute(true, new DbCallback<Void>() {
|
||||
@Override
|
||||
public Void doDbWork(final SQLiteDatabase db) throws WrappedException, UnavailableStorageException {
|
||||
for (Message message : messages) {
|
||||
try {
|
||||
message.destroy();
|
||||
} catch (MessagingException e) {
|
||||
throw new WrappedException(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
} catch (MessagingException e) {
|
||||
throw new WrappedException(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
} catch (MessagingException e) {
|
||||
throw new WrappedException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -539,8 +539,7 @@ public class WebDavStore extends Store {
|
||||
info.requiredAuthType = AUTH_TYPE_BASIC;
|
||||
} else if ((info.statusCode >= 200 && info.statusCode < 300) || // Success
|
||||
(info.statusCode >= 300 && info.statusCode < 400) || // Redirect
|
||||
(info.statusCode == 440)) // Unauthorized
|
||||
{
|
||||
(info.statusCode == 440)) { // Unauthorized
|
||||
// We will handle all 3 situations the same. First we take an educated
|
||||
// guess at where the authorization DLL is located. If this is this
|
||||
// doesn't work, then we'll use the redirection URL for OWA login given
|
||||
@ -666,7 +665,7 @@ public class WebDavStore extends Store {
|
||||
request = new HttpGeneric(loginUrl);
|
||||
request.setMethod("POST");
|
||||
request.setEntity(formEntity);
|
||||
|
||||
|
||||
response = httpClient.executeOverride(request, mContext);
|
||||
authenticated = testAuthenticationResponse(response);
|
||||
} catch (URISyntaxException e) {
|
||||
@ -720,8 +719,8 @@ public class WebDavStore extends Store {
|
||||
|
||||
return formAction;
|
||||
}
|
||||
|
||||
private boolean testAuthenticationResponse(HttpResponse response)
|
||||
|
||||
private boolean testAuthenticationResponse(HttpResponse response)
|
||||
throws MessagingException {
|
||||
boolean authenticated = false;
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
@ -743,14 +742,14 @@ public class WebDavStore extends Store {
|
||||
try {
|
||||
String thisPath = new URI(mUrl).getPath();
|
||||
String redirectPath = new URI(info.redirectUrl).getPath();
|
||||
|
||||
|
||||
if (!thisPath.endsWith("/")) {
|
||||
thisPath = thisPath.concat("/");
|
||||
}
|
||||
if (!redirectPath.endsWith("/")) {
|
||||
redirectPath = redirectPath.concat("/");
|
||||
}
|
||||
|
||||
|
||||
if (redirectPath.equalsIgnoreCase(thisPath)) {
|
||||
authenticated = true;
|
||||
} else {
|
||||
@ -769,7 +768,7 @@ public class WebDavStore extends Store {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class MessageCryptoView extends LinearLayout {
|
||||
}
|
||||
|
||||
|
||||
public void hide () {
|
||||
public void hide() {
|
||||
this.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user