Merge "Introduces a TestLoaderManager to test loaders."
diff --git a/src/com/android/contacts/calllog/CallLogFragment.java b/src/com/android/contacts/calllog/CallLogFragment.java
index 13d2e6c..79e9ae5 100644
--- a/src/com/android/contacts/calllog/CallLogFragment.java
+++ b/src/com/android/contacts/calllog/CallLogFragment.java
@@ -287,7 +287,16 @@
mCallerIdThread.start();
}
+ /**
+ * Stops the background thread that processes updates and cancels any pending requests to
+ * start it.
+ * <p>
+ * Should be called from the main thread to prevent a race condition between the request to
+ * start the thread being processed and stopping the thread.
+ */
public void stopRequestProcessing() {
+ // Remove any pending requests to start the processing thread.
+ mHandler.removeMessages(START_THREAD);
mDone = true;
if (mCallerIdThread != null) mCallerIdThread.interrupt();
}
diff --git a/tests/src/com/android/contacts/list/ContactListItemViewTest.java b/tests/src/com/android/contacts/list/ContactListItemViewTest.java
index 07ea814..7764eb3 100644
--- a/tests/src/com/android/contacts/list/ContactListItemViewTest.java
+++ b/tests/src/com/android/contacts/list/ContactListItemViewTest.java
@@ -16,7 +16,7 @@
package com.android.contacts.list;
-import com.android.contacts.activities.DialtactsActivity;
+import com.android.contacts.activities.PeopleActivity;
import com.android.contacts.format.SpannedTestUtils;
import com.android.contacts.format.TestTextWithHighlightingFactory;
@@ -30,18 +30,18 @@
/**
* Unit tests for {@link ContactListItemView}.
*
- * It uses an {@link ActivityInstrumentationTestCase2} for {@link DialtactsActivity} because we need
+ * It uses an {@link ActivityInstrumentationTestCase2} for {@link PeopleActivity} because we need
* to have the style properly setup.
*/
@LargeTest
-public class ContactListItemViewTest extends ActivityInstrumentationTestCase2<DialtactsActivity> {
+public class ContactListItemViewTest extends ActivityInstrumentationTestCase2<PeopleActivity> {
/** The HTML code used to mark the start of the highlighted part. */
private static final String START = "<font color =\"#729a27\">";
/** The HTML code used to mark the end of the highlighted part. */
private static final String END = "</font>";
public ContactListItemViewTest() {
- super(DialtactsActivity.class);
+ super(PeopleActivity.class);
}
public void testShowDisplayName_Simple() {