am 737e91ef: Merge "Don\'t show the sort menu for running process list" into gingerbread

Merge commit '737e91efb15fe5908781bc1cf446d28abc7726e8' into gingerbread-plus-aosp

* commit '737e91efb15fe5908781bc1cf446d28abc7726e8':
  Don't show the sort menu for running process list
diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
index 40f4ddd..1053d3b 100644
--- a/src/com/android/settings/applications/ManageApplications.java
+++ b/src/com/android/settings/applications/ManageApplications.java
@@ -614,6 +614,14 @@
     
     @Override
     public boolean onPrepareOptionsMenu(Menu menu) {
+        /*
+         * The running processes screen doesn't use the mApplicationsAdapter
+         * so bringing up this menu in that case doesn't make any sense.
+         */
+        if (mCurView == VIEW_RUNNING) {
+            return false;
+        }
+
         menu.findItem(SORT_ORDER_ALPHA).setVisible(mSortOrder != SORT_ORDER_ALPHA);
         menu.findItem(SORT_ORDER_SIZE).setVisible(mSortOrder != SORT_ORDER_SIZE);
         return true;