1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Reformat according to style

This commit is contained in:
Jan Berkel 2014-12-19 09:48:02 +01:00
parent 4b0d016bb7
commit 98c1935c85

View File

@ -1,8 +1,11 @@
package com.fsck.k9.mail;
public class K9MailLib {
private static DebugStatus debugStatus = new DefaultDebugStatus();
private K9MailLib() {}
private K9MailLib() {
}
public static final String LOG_TAG = "k9";
public static final int PUSH_WAKE_LOCK_TIMEOUT = 60000;
@ -42,18 +45,19 @@ public class K9MailLib {
public static void setDebugSensitive(boolean b) {
if (debugStatus instanceof WritableDebugStatus) {
((WritableDebugStatus)debugStatus).setSensitive(b);
((WritableDebugStatus) debugStatus).setSensitive(b);
}
}
public static void setDebug(boolean b) {
if (debugStatus instanceof WritableDebugStatus) {
((WritableDebugStatus)debugStatus).setEnabled(b);
((WritableDebugStatus) debugStatus).setEnabled(b);
}
}
public static interface DebugStatus {
boolean enabled();
boolean debugSensitive();
}
@ -66,15 +70,32 @@ public class K9MailLib {
private static interface WritableDebugStatus extends DebugStatus {
void setEnabled(boolean enabled);
void setSensitive(boolean sensitive);
}
private static class DefaultDebugStatus implements WritableDebugStatus {
private boolean enabled;
private boolean sensitive;
@Override public boolean enabled() { return enabled; }
@Override public boolean debugSensitive() { return sensitive; }
@Override public void setEnabled(boolean enabled) { this.enabled = enabled; }
@Override public void setSensitive(boolean sensitive) { this.sensitive = sensitive; }
@Override
public boolean enabled() {
return enabled;
}
@Override
public boolean debugSensitive() {
return sensitive;
}
@Override
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public void setSensitive(boolean sensitive) {
this.sensitive = sensitive;
}
}
}