OSDN Git Service

fix bug in event response logic: if guests have been hidden, you should be able to...
authorDebajit Ghosh <debajit@google.com>
Mon, 28 Sep 2009 07:04:20 +0000 (00:04 -0700)
committerDebajit Ghosh <debajit@google.com>
Mon, 28 Sep 2009 17:55:43 +0000 (10:55 -0700)
src/com/android/calendar/EventInfoActivity.java

index 0619c0a..02f6997 100644 (file)
@@ -1007,10 +1007,16 @@ public class EventInfoActivity extends Activity implements View.OnClickListener,
     }
 
     void updateResponse() {
-        // you can only accept/reject/etc. a meeting if:
-        // a) you can edit the event's containing calendar
-        // b) you're not the organizer and only attendee 
-        if (!mCanModifyCalendar || (mIsOrganizer && mNumOfAttendees <= 1)) {
+        // we only let the user accept/reject/etc. a meeting if:
+        // a) you can edit the event's containing calendar AND
+        // b) you're not the organizer and only attendee
+        // (if the attendee data has been hidden, the visible number of attendees
+        // will be 1 -- the calendar owner's).
+        // (there are more cases involved to be 100% accurate, such as
+        // paying attention to whether or not an attendee status was
+        // included in the feed, but we're currently omitting those corner cases
+        // for simplicity).
+        if (!mCanModifyCalendar || (mHasAttendeeData && mIsOrganizer && mNumOfAttendees <= 1)) {
             setVisibilityCommon(R.id.response_container, View.GONE);
             return;
         }