Bug 942231 - Define constant with default value for 'can load' hint (r=margaret)
authorLucas Rocha <lucasr@mozilla.com>
Thu, 12 Dec 2013 12:02:52 +0000
changeset 160186 ce3dd14c1840cd81593dd4eba22e4659719b4769
parent 160185 ec4673726b46aed1c9e15419e4ac1e941206b626
child 160187 fe13b62902c8070f4bd59bf0b42f7bd9936c2eaf
push id25826
push userkwierso@gmail.com
push dateFri, 13 Dec 2013 02:14:34 +0000
treeherdermozilla-central@f551c8244289 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs942231
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 942231 - Define constant with default value for 'can load' hint (r=margaret)
mobile/android/base/home/HomeFragment.java
--- a/mobile/android/base/home/HomeFragment.java
+++ b/mobile/android/base/home/HomeFragment.java
@@ -39,33 +39,36 @@ import android.widget.Toast;
  */
 abstract class HomeFragment extends Fragment {
     // Log Tag.
     private static final String LOGTAG="GeckoHomeFragment";
 
     // 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.
     private boolean mCanLoadHint;
 
     // Whether the fragment has loaded its content
     private boolean mIsLoaded;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
         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;
     }
 
     @Override
     public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
         if (menuInfo == null || !(menuInfo instanceof HomeContextMenuInfo)) {