Bug 942231 - Define constant with default value for 'can load' hint (r=margaret)

This commit is contained in:
Lucas Rocha 2013-12-12 10:55:36 +00:00
parent 5613becda9
commit 8d6faa69bd

View File

@ -44,6 +44,9 @@ abstract class HomeFragment extends Fragment {
// Share MIME type.
private static final String SHARE_MIME_TYPE = "text/plain";
// Default value for "can load" hint
static final boolean DEFAULT_CAN_LOAD_HINT = false;
// Whether the fragment can load its content or not
// This is used to defer data loading until the editing
// mode animation ends.
@ -58,9 +61,9 @@ abstract class HomeFragment extends Fragment {
final Bundle args = getArguments();
if (args != null) {
mCanLoadHint = args.getBoolean(HomePager.CAN_LOAD_ARG, false);
mCanLoadHint = args.getBoolean(HomePager.CAN_LOAD_ARG, DEFAULT_CAN_LOAD_HINT);
} else {
mCanLoadHint = false;
mCanLoadHint = DEFAULT_CAN_LOAD_HINT;
}
mIsLoaded = false;