Bug 1143196 - Add Menu.FIRST to order values in GeckoActionProvider.onPrepareSubMenu r=mcomella
authorRishi <baldawa.rishi@gmail.com>
Sun, 22 Mar 2015 13:51:40 -0700
changeset 264568 1ce926882513cc01fdbc5913c3cfdfd77e62b276
parent 264567 bf13341538f76f5ebc254b51f20133efad96a908
child 264569 2f4ae5f4353c37ccbeeed1d23e8faceedc421ec2
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1143196
milestone39.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 1143196 - Add Menu.FIRST to order values in GeckoActionProvider.onPrepareSubMenu r=mcomella I was not sure how to handle the order wrt Menu.CATEGORY_SECONDARY. Hope I'm right.
mobile/android/base/widget/GeckoActionProvider.java
--- a/mobile/android/base/widget/GeckoActionProvider.java
+++ b/mobile/android/base/widget/GeckoActionProvider.java
@@ -146,19 +146,19 @@ public class GeckoActionProvider {
             ResolveInfo activity = dataModel.getActivity(i);
             final CharSequence activityLabel = activity.loadLabel(packageManager);
 
             // Pin internal actions to the top. Note:
             // the order here does not affect quick share.
             final int order;
             if (shareDialogClassName.equals(activity.activityInfo.name) &&
                     sendTabLabel.equals(activityLabel)) {
-                order = i;
+                order = Menu.FIRST + i;
             } else {
-                order = i | Menu.CATEGORY_SECONDARY;
+                order = Menu.FIRST + (i | Menu.CATEGORY_SECONDARY);
             }
 
             subMenu.add(0, i, order, activityLabel)
                 .setIcon(activity.loadIcon(packageManager))
                 .setOnMenuItemClickListener(mCallbacks);
         }
     }