From 5dceaa5b5ec6006aced6dfe37a718ea376decf53 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Tue, 12 Apr 2011 11:08:16 -0700 Subject: [PATCH] Fix bug that prevents from accepting 2 invites in a row. mPreviousMeetingResponse is tied to the current response state, so it should be reset too when we clear the response checkboxes. Bug 4132763 Change-Id: If816706f47f8500441330882fb4f372b31465ff5 --- .../android/emailcommon/service/EmailServiceConstants.java | 2 ++ src/com/android/email/activity/MessageViewFragment.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/emailcommon/src/com/android/emailcommon/service/EmailServiceConstants.java b/emailcommon/src/com/android/emailcommon/service/EmailServiceConstants.java index b229ffc64..8e8d552da 100644 --- a/emailcommon/src/com/android/emailcommon/service/EmailServiceConstants.java +++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceConstants.java @@ -17,6 +17,8 @@ package com.android.emailcommon.service; public class EmailServiceConstants { + /** "Not responded yet", used ONLY for UI. */ + public static final int MEETING_REQUEST_NOT_RESPONDED = 0; public static final int MEETING_REQUEST_ACCEPTED = 1; public static final int MEETING_REQUEST_TENTATIVE = 2; public static final int MEETING_REQUEST_DECLINED = 3; diff --git a/src/com/android/email/activity/MessageViewFragment.java b/src/com/android/email/activity/MessageViewFragment.java index ebb3cfcb4..1097a4406 100644 --- a/src/com/android/email/activity/MessageViewFragment.java +++ b/src/com/android/email/activity/MessageViewFragment.java @@ -62,11 +62,11 @@ public class MessageViewFragment extends MessageViewFragmentBase private CheckBox mMeetingYes; private CheckBox mMeetingMaybe; private CheckBox mMeetingNo; - private int mPreviousMeetingResponse = -1; - private Drawable mFavoriteIconOn; private Drawable mFavoriteIconOff; + private int mPreviousMeetingResponse = EmailServiceConstants.MEETING_REQUEST_NOT_RESPONDED; + /** * ID of the message that will be loaded. Protect with {@link #mLock}. */ @@ -233,6 +233,7 @@ public class MessageViewFragment extends MessageViewFragmentBase mMeetingYes.setChecked(false); mMeetingNo.setChecked(false); mMeetingMaybe.setChecked(false); + mPreviousMeetingResponse = EmailServiceConstants.MEETING_REQUEST_NOT_RESPONDED; } @Override