summaryrefslogtreecommitdiffstats
path: root/src/com/android/calendar/icalendar/VCalendar.java
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-01-24 07:55:08 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-01-24 07:55:08 -0800
commitb8508df0bf9a1ab57c4d339a0fc8e60d55239462 (patch)
treee3d3f10c1b11fa5b37d5592b8b1535b307446328 /src/com/android/calendar/icalendar/VCalendar.java
parent476b55527a1d92fe689dd5debd85ac0a00fb3a1b (diff)
parentc0b844cd8a5209895fdc52d5ffa68bf5b2fc1234 (diff)
downloadandroid_packages_apps_Calendar-b8508df0bf9a1ab57c4d339a0fc8e60d55239462.tar.gz
android_packages_apps_Calendar-b8508df0bf9a1ab57c4d339a0fc8e60d55239462.tar.bz2
android_packages_apps_Calendar-b8508df0bf9a1ab57c4d339a0fc8e60d55239462.zip
Merge "Calendar : Respond to calendar events share intent"
Diffstat (limited to 'src/com/android/calendar/icalendar/VCalendar.java')
-rw-r--r--src/com/android/calendar/icalendar/VCalendar.java21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/com/android/calendar/icalendar/VCalendar.java b/src/com/android/calendar/icalendar/VCalendar.java
index 9f422e6f..140d9358 100644
--- a/src/com/android/calendar/icalendar/VCalendar.java
+++ b/src/com/android/calendar/icalendar/VCalendar.java
@@ -52,11 +52,11 @@ public class VCalendar {
* Add specified property
* @param property
* @param value
- * @return
*/
public boolean addProperty(String property, String value) {
- // since all the required mProperties are unary (only one can exist) , taking a shortcut here
- // when multiples of a property can exist , enforce that here .. cleverly
+ // since all the required mProperties are unary (only one can exist) , taking a shortcut
+ // here
+ // TODO: when multiple attributes of a property can exist , enforce that here
if (sPropertyList.containsKey(property) && value != null) {
mProperties.put(property, IcalendarUtils.cleanseString(value));
return true;
@@ -73,16 +73,25 @@ public class VCalendar {
}
/**
- *
- * @return
+ * Returns all the events that are part of this calendar
*/
public LinkedList<VEvent> getAllEvents() {
return mEvents;
}
/**
+ * Returns the first event of the calendar
+ */
+ public VEvent getFirstEvent() {
+ if (mEvents != null && mEvents.size() > 0) {
+ return mEvents.get(0);
+ } else {
+ return null;
+ }
+ }
+
+ /**
* Returns the iCal representation of the calendar and all of its inherent components
- * @return
*/
public String getICalFormattedString() {
StringBuilder output = new StringBuilder();