From 98c1935c857c3e6812f05a4e5130591900055676 Mon Sep 17 00:00:00 2001 From: Jan Berkel Date: Fri, 19 Dec 2014 09:48:02 +0100 Subject: [PATCH] Reformat according to style --- src/com/fsck/k9/mail/K9MailLib.java | 39 ++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/com/fsck/k9/mail/K9MailLib.java b/src/com/fsck/k9/mail/K9MailLib.java index 04de4f387..38c4b10dd 100644 --- a/src/com/fsck/k9/mail/K9MailLib.java +++ b/src/com/fsck/k9/mail/K9MailLib.java @@ -1,12 +1,15 @@ package com.fsck.k9.mail; + public class K9MailLib { private static DebugStatus debugStatus = new DefaultDebugStatus(); - private K9MailLib() {} - public static final String LOG_TAG = "k9"; + private K9MailLib() { + } + + public static final String LOG_TAG = "k9"; public static final int PUSH_WAKE_LOCK_TIMEOUT = 60000; - public static final String IDENTITY_HEADER = "X-K9mail-Identity"; + public static final String IDENTITY_HEADER = "X-K9mail-Identity"; /** * Should K-9 log the conversation it has over the wire with @@ -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; + } } }