Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69e87f9b authored by Jeff Hamilton's avatar Jeff Hamilton
Browse files

Fix a bug I introduced in CursorAdapter.

It will now properly register the content
observer when used with the auto requery
constructor and auto requery set to false.

Change-Id: I0f3995a2d5f1e27aaeab8c5f2f951fefc8a072e5
parent e5ba231b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ public abstract class CursorAdapter extends BaseAdapter implements Filterable,
     *                    data is always displayed.
     */
    public CursorAdapter(Context context, Cursor c, boolean autoRequery) {
        init(context, c, autoRequery ? FLAG_AUTO_REQUERY : 0);
        init(context, c, autoRequery ? FLAG_AUTO_REQUERY : FLAG_REGISTER_CONTENT_OBSERVER);
    }

    /**
@@ -125,7 +125,7 @@ public abstract class CursorAdapter extends BaseAdapter implements Filterable,
    }

    protected void init(Context context, Cursor c, boolean autoRequery) {
        init(context, c, autoRequery ? FLAG_AUTO_REQUERY : 0);
        init(context, c, autoRequery ? FLAG_AUTO_REQUERY : FLAG_REGISTER_CONTENT_OBSERVER);
    }

    protected void init(Context context, Cursor c, int flags) {