Bug 1256405 - Add deprecation warning to SimpleCursorLoader. r=ahunt
Surprisingly, this didn't set off lint locally.
MozReview-Commit-ID: 5SvDS6jalS2
--- a/mobile/android/base/java/org/mozilla/gecko/home/SimpleCursorLoader.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/SimpleCursorLoader.java
@@ -18,16 +18,31 @@
*/
package org.mozilla.gecko.home;
import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.AsyncTaskLoader;
+/**
+ * A copy of the framework's {@link android.content.CursorLoader} that
+ * instead allows the caller to load the Cursor themselves via the abstract
+ * {@link #loadCursor()} method, rather than calling out to a ContentProvider via
+ * class methods.
+ *
+ * For new code, prefer {@link android.content.CursorLoader} (see @deprecated).
+ *
+ * This was originally created to re-use existing code which loaded Cursors manually.
+ *
+ * @deprecated since the framework provides an implementation, we'd like to eventually remove
+ * this class to reduce maintenance burden. Originally planned for bug 1239491, but
+ * it'd be more efficient to do this over time, rather than all at once.
+ */
+@Deprecated
abstract class SimpleCursorLoader extends AsyncTaskLoader<Cursor> {
final ForceLoadContentObserver mObserver;
Cursor mCursor;
public SimpleCursorLoader(Context context) {
super(context);
mObserver = new ForceLoadContentObserver();
}