summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2010-10-12 09:42:44 -0700
committerKenny Root <kroot@google.com>2010-10-12 09:44:43 -0700
commit673085af9e5e040eb0109138e9cb6916fa4b88f0 (patch)
tree0a208242e4b16f8713ce36b2aafe07c04c940ca6
parent3018639200a3f04d274166e26c98307ab07fc3b9 (diff)
downloadpackages_apps_settings-673085af9e5e040eb0109138e9cb6916fa4b88f0.zip
packages_apps_settings-673085af9e5e040eb0109138e9cb6916fa4b88f0.tar.gz
packages_apps_settings-673085af9e5e040eb0109138e9cb6916fa4b88f0.tar.bz2
Don't show the sort menu for running process list
You could bring up the menu and sort running processes by size or name which would display the applications list at the same time the running process list was being displayed. This happened because the mApplicationsAdapter is used for the list of apps and is sortable, but the running process list doesn't use the adapter. Disable the menu when the running applications list is presented to prevent this situation where two ListViews are visible. Bug: 3084901 Change-Id: I5304cf7a1f426269ed4858e649729a35b9344717
-rw-r--r--src/com/android/settings/applications/ManageApplications.java8
1 files changed, 8 insertions, 0 deletions
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 @@ public class ManageApplications extends TabActivity implements
@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;