From 0401ad5334fad104336413173f17a5d72b9b5518 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Thu, 27 Aug 2009 15:26:06 -0700 Subject: [PATCH] Fix usage of isDefault and IS_DEFAULT to be consistent * There was inconsistent usage between int and boolean for this column Change-Id: Ifa7bd6f2563920a95b6b714f3a7b14e5be29d176 --- src/com/android/email/provider/EmailContent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/email/provider/EmailContent.java b/src/com/android/email/provider/EmailContent.java index 63c7f089a..3bd9da81c 100644 --- a/src/com/android/email/provider/EmailContent.java +++ b/src/com/android/email/provider/EmailContent.java @@ -1242,10 +1242,10 @@ public abstract class EmailContent { @Override public int update(Context context, ContentValues cv) { if (cv.containsKey(AccountColumns.IS_DEFAULT) && - (cv.getAsInteger(AccountColumns.IS_DEFAULT) != 0)) { + cv.getAsBoolean(AccountColumns.IS_DEFAULT)) { ArrayList ops = new ArrayList(); ContentValues cv1 = new ContentValues(); - cv1.put(AccountColumns.IS_DEFAULT, 0); + cv1.put(AccountColumns.IS_DEFAULT, false); // Clear the default flag in all accounts ops.add(ContentProviderOperation.newUpdate(CONTENT_URI).withValues(cv1).build()); // Update this account @@ -1366,7 +1366,7 @@ public abstract class EmailContent { values.put(AccountColumns.HOST_AUTH_KEY_RECV, mHostAuthKeyRecv); values.put(AccountColumns.HOST_AUTH_KEY_SEND, mHostAuthKeySend); values.put(AccountColumns.FLAGS, mFlags); - values.put(AccountColumns.IS_DEFAULT, mIsDefault ? 1 : 0); + values.put(AccountColumns.IS_DEFAULT, mIsDefault); values.put(AccountColumns.COMPATIBILITY_UUID, mCompatibilityUuid); values.put(AccountColumns.SENDER_NAME, mSenderName); values.put(AccountColumns.RINGTONE_URI, mRingtoneUri);