From c6a2cb48b178fd4bd3caa48af622b704eda07b30 Mon Sep 17 00:00:00 2001 From: Apoorv Khatreja Date: Sun, 17 Jul 2011 01:41:14 +0530 Subject: [PATCH] Added method to check for status response. --- src/com/fsck/k9/mail/store/ImapResponseParser.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/fsck/k9/mail/store/ImapResponseParser.java b/src/com/fsck/k9/mail/store/ImapResponseParser.java index f71951ddf..f18a04ce1 100644 --- a/src/com/fsck/k9/mail/store/ImapResponseParser.java +++ b/src/com/fsck/k9/mail/store/ImapResponseParser.java @@ -488,6 +488,15 @@ public class ImapResponseParser { } } + + public static boolean isStatusResponse(String symbol) { + return symbol.equalsIgnoreCase("OK") || + symbol.equalsIgnoreCase("NO") || + symbol.equalsIgnoreCase("BAD") || + symbol.equalsIgnoreCase("PREAUTH") || + symbol.equalsIgnoreCase("BYE"); + } + public static boolean equalsIgnoreCase(Object o1, Object o2) { if (o1 != null && o2 != null && o1 instanceof String && o2 instanceof String) { String s1 = (String)o1;