summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Pasternak <roboerik@android.com>2010-01-04 18:43:39 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-04 18:43:39 -0800
commit176735c703908bc1e9a8894eedb7f9a3d7b6e68c (patch)
tree528228b47ab39b95676248d538f8696815756eda
parent225ef52bd68f09ed7e52798f1a77422750926d87 (diff)
parent3763464e8f0df4d387ff46803e5a9c76045c85e6 (diff)
downloadframeworks_base-176735c703908bc1e9a8894eedb7f9a3d7b6e68c.zip
frameworks_base-176735c703908bc1e9a8894eedb7f9a3d7b6e68c.tar.gz
frameworks_base-176735c703908bc1e9a8894eedb7f9a3d7b6e68c.tar.bz2
Merge "b/2293263 Replaced busybit functionality with eventDay functionality."
-rw-r--r--core/java/android/provider/Calendar.java60
1 files changed, 57 insertions, 3 deletions
diff --git a/core/java/android/provider/Calendar.java b/core/java/android/provider/Calendar.java
index b74564a..a94b3b4 100644
--- a/core/java/android/provider/Calendar.java
+++ b/core/java/android/provider/Calendar.java
@@ -1059,11 +1059,23 @@ public final class Calendar {
* <P>Type: INTEGER</P>
*/
public static final String MAX_BUSYBITS = "maxBusyBits";
+
+ /**
+ * The minimum Julian day in the EventDays table.
+ * <P>Type: INTEGER</P>
+ */
+ public static final String MIN_EVENTDAYS = "minEventDays";
+
+ /**
+ * The maximum Julian day in the EventDays table.
+ * <P>Type: INTEGER</P>
+ */
+ public static final String MAX_EVENTDAYS = "maxEventDays";
}
public static final class CalendarMetaData implements CalendarMetaDataColumns {
}
-
+ /*busybits*/
public interface BusyBitsColumns {
/**
* The Julian day number.
@@ -1088,6 +1100,7 @@ public final class Calendar {
public static final String ALL_DAY_COUNT = "allDayCount";
}
+ /*busybits*/
public static final class BusyBits implements BusyBitsColumns {
public static final Uri CONTENT_URI = Uri.parse("content://calendar/busybits/when");
@@ -1102,6 +1115,47 @@ public final class Calendar {
/**
* Retrieves the busy bits for the Julian days starting at "startDay"
* for "numDays".
+ * This is being phased out so has been changed to an empty method so
+ * that it doesn't reference anything that needs to be cleaned up else-
+ * where.
+ *
+ * @param cr the ContentResolver
+ * @param startDay the first Julian day in the range
+ * @param numDays the number of days to load (must be at least 1)
+ * @return a database cursor
+ */
+ public static final Cursor query(ContentResolver cr, int startDay, int numDays) {
+// if (numDays < 1) {
+// return null;
+// }
+// int endDay = startDay + numDays - 1;
+// Uri.Builder builder = CONTENT_URI.buildUpon();
+// ContentUris.appendId(builder, startDay);
+// ContentUris.appendId(builder, endDay);
+// return cr.query(builder.build(), PROJECTION, null /* selection */,
+// null /* selection args */, DAY);
+ return null;
+ }
+ }
+
+ public interface EventDaysColumns {
+ /**
+ * The Julian starting day number.
+ * <P>Type: INTEGER (int)</P>
+ */
+ public static final String STARTDAY = "startDay";
+
+ }
+
+ public static final class EventDays implements EventDaysColumns {
+ public static final Uri CONTENT_URI = Uri.parse("content://calendar/instances/groupbyday");
+
+ public static final String[] PROJECTION = { STARTDAY };
+ public static final String SELECTION = "selected==1";
+
+ /**
+ * Retrieves the days with events for the Julian days starting at "startDay"
+ * for "numDays".
*
* @param cr the ContentResolver
* @param startDay the first Julian day in the range
@@ -1116,8 +1170,8 @@ public final class Calendar {
Uri.Builder builder = CONTENT_URI.buildUpon();
ContentUris.appendId(builder, startDay);
ContentUris.appendId(builder, endDay);
- return cr.query(builder.build(), PROJECTION, null /* selection */,
- null /* selection args */, DAY);
+ return cr.query(builder.build(), PROJECTION, SELECTION,
+ null /* selection args */, STARTDAY);
}
}