@@ -0,0 +1,2032 @@
+package org.ccci.gto.android.common.support.v4.content;%0A%0Aimport android.content.Context;%0Aimport android.content.IntentFilter;%0Aimport android.content.SharedPreferences;%0Aimport android.database.Cursor;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.annotation.Nullable;%0Aimport android.support.v4.content.CursorLoader;%0A%0Apublic abstract class CursorBroadcastReceiverSharedPreferencesChangeLoader extends CursorLoader%0A        implements BroadcastReceiverLoaderHelper.Interface, SharedPreferencesChangeLoaderHelper.Interface %7B%0A    private final BroadcastReceiverLoaderHelper mHelper1;%0A    private final SharedPreferencesChangeLoaderHelper mHelper2;%0A%0A    @NonNull%0A    protected final SharedPreferences mPrefs;%0A%0A    public CursorBroadcastReceiverSharedPreferencesChangeLoader(@NonNull final Context context,%0A                                                                @NonNull final SharedPreferences prefs) %7B%0A        super(context);%0A        mHelper1 = new BroadcastReceiverLoaderHelper(this);%0A        mHelper2 = new SharedPreferencesChangeLoaderHelper(this, prefs);%0A        mPrefs = prefs;%0A    %7D%0A%0A    /* BEGIN lifecycle */%0A%0A    @Override%0A    protected void onStartLoading() %7B%0A        super.onStartLoading();%0A        mHelper1.onStartLoading();%0A        mHelper2.onStartLoading();%0A    %7D%0A%0A    @Override%0A    protected void onAbandon() %7B%0A        super.onAbandon();%0A        mHelper1.onAbandon();%0A        mHelper2.onAbandon();%0A    %7D%0A%0A    /* END lifecycle */%0A%0A    @Override%0A    public final void addIntentFilter(@NonNull final IntentFilter filter) %7B%0A        mHelper1.addIntentFilter(filter);%0A    %7D%0A%0A    @Override%0A    public final void setBroadcastReceiver(@Nullable final LoaderBroadcastReceiver receiver) %7B%0A        mHelper1.setBroadcastReceiver(receiver);%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public final Cursor loadInBackground() %7B%0A        final Cursor c = this.getCursor();%0A        if (c != null) %7B%0A            c.getCount();%0A        %7D%0A        return c;%0A    %7D%0A%0A    @Nullable%0A    protected abstract Cursor getCursor();%0A%7D%0A

create a CursorLoader that monitors broadcasts and preference changes