diff options
author | Keun-young Park <keunyoung@google.com> | 2013-06-05 21:44:57 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-06-05 21:44:58 +0000 |
commit | 57575cb8e4d4ae031e00b9ab1105cd914a150b76 (patch) | |
tree | 5f9c33c4d9536717de25b152339c6e519ebe7469 | |
parent | df7c4c6248c3c1bb6ec9309a677a33aa9cf1a1c0 (diff) | |
parent | cdac3d7c39a759021ec75ddae0db39320d0eb745 (diff) | |
download | cts-jb-mr1.1-dev-plus-aosp.tar.gz |
Merge "Fixed the scope of database query for testWhenByDayQuery"jb-mr1.1-dev-plus-aosp
-rw-r--r-- | tests/tests/provider/src/android/provider/cts/CalendarTest.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/tests/provider/src/android/provider/cts/CalendarTest.java b/tests/tests/provider/src/android/provider/cts/CalendarTest.java index e4604538b49..cbefa9dc0ef 100644 --- a/tests/tests/provider/src/android/provider/cts/CalendarTest.java +++ b/tests/tests/provider/src/android/provider/cts/CalendarTest.java @@ -1946,6 +1946,10 @@ public class CalendarTest extends InstrumentationTestCase { assertTrue(eventId >= 0); return eventValues; } + + public long getCalendarId() { + return mCalendarId; + } } /** @@ -1981,7 +1985,8 @@ public class CalendarTest extends InstrumentationTestCase { CalendarContract.Instances.CONTENT_BY_DAY_URI, julianStart + "/" + julianEnd); // Query the range, sorting by event start time - Cursor c = mContentResolver.query(uri, null, null, null, Events.DTSTART); + Cursor c = mContentResolver.query(uri, null, Instances.CALENDAR_ID + "=" + + helper.getCalendarId(), null, Events.DTSTART); // Assert that two events are returned assertEquals(c.getCount(), 2); |