Merge "Removed "global loader ids""

This commit is contained in:
Makoto Onuki 2011-04-28 10:26:18 -07:00 committed by Android (Google) Code Review
commit 13c7595bb9
2 changed files with 5 additions and 9 deletions

View File

@ -41,13 +41,6 @@ import android.view.WindowManager;
* over-designed or totally useless. For now this pattern will do...
*/
public final class ActivityHelper {
/**
* Loader IDs have to be unique in a fragment. We reserve IDs here for loaders created
* outside of fragments.
*/
public static final int GLOBAL_LOADER_ID_MOVE_TO_DIALOG_MAILBOX_LOADER = 1000;
public static final int GLOBAL_LOADER_ID_MOVE_TO_DIALOG_MESSAGE_CHECKER = 1001;
private ActivityHelper() {
}

View File

@ -50,6 +50,9 @@ import java.security.InvalidParameterException;
public class MoveMessageToDialog extends DialogFragment implements DialogInterface.OnClickListener {
private static final String BUNDLE_MESSAGE_IDS = "message_ids";
private static final int LOADER_ID_MOVE_TO_DIALOG_MAILBOX_LOADER = 1;
private static final int LOADER_ID_MOVE_TO_DIALOG_MESSAGE_CHECKER = 2;
/** Message IDs passed to {@link #newInstance} */
private long[] mMessageIds;
private MailboxMoveToAdapter mAdapter;
@ -118,7 +121,7 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
builder.setSingleChoiceItems(mAdapter, -1, this);
getLoaderManager().initLoader(
ActivityHelper.GLOBAL_LOADER_ID_MOVE_TO_DIALOG_MESSAGE_CHECKER,
LOADER_ID_MOVE_TO_DIALOG_MESSAGE_CHECKER,
null, new MessageCheckerCallback());
return builder.show();
@ -170,7 +173,7 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
}
mAccountId = accountId;
getLoaderManager().initLoader(
ActivityHelper.GLOBAL_LOADER_ID_MOVE_TO_DIALOG_MAILBOX_LOADER,
LOADER_ID_MOVE_TO_DIALOG_MAILBOX_LOADER,
null, new MailboxesLoaderCallbacks());
}