Bug 1256405 - Add deprecation warning to SimpleCursorLoader. r=ahunt draft
authorMichael Comella <michael.l.comella@gmail.com>
Mon, 14 Mar 2016 12:18:25 -0700
changeset 340022 3568d2a9826ae4af1ab5e3ac53dcb1e4b7ce9e66
parent 339312 16047d4093becc3b8298bdd3b1e15ec1c4a7c34a
child 516122 6939d221f8174e91149df1f5d7cfad33dc46bc5d
push id12880
push usermichael.l.comella@gmail.com
push dateMon, 14 Mar 2016 20:29:04 +0000
reviewersahunt
bugs1256405
milestone48.0a1
Bug 1256405 - Add deprecation warning to SimpleCursorLoader. r=ahunt Surprisingly, this didn't set off lint locally. MozReview-Commit-ID: 5SvDS6jalS2
mobile/android/base/java/org/mozilla/gecko/home/SimpleCursorLoader.java
--- 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();
     }