Merge "Fix switching running/cached apps with memory bar"
diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
index aa10c9e..0a1dcb1 100644
--- a/src/com/android/settings/applications/ManageApplications.java
+++ b/src/com/android/settings/applications/ManageApplications.java
@@ -1085,6 +1085,7 @@
mOptionsMenu.findItem(SHOW_RUNNING_SERVICES).setVisible(showingBackground);
mOptionsMenu.findItem(SHOW_BACKGROUND_PROCESSES).setVisible(!showingBackground);
mOptionsMenu.findItem(RESET_APP_PREFERENCES).setVisible(false);
+ mShowBackground = showingBackground;
} else {
mOptionsMenu.findItem(SORT_ORDER_ALPHA).setVisible(mSortOrder != SORT_ORDER_ALPHA);
mOptionsMenu.findItem(SORT_ORDER_SIZE).setVisible(mSortOrder != SORT_ORDER_SIZE);
diff --git a/src/com/android/settings/applications/RunningProcessesView.java b/src/com/android/settings/applications/RunningProcessesView.java
index 52c4841..8eb0496 100644
--- a/src/com/android/settings/applications/RunningProcessesView.java
+++ b/src/com/android/settings/applications/RunningProcessesView.java
@@ -434,6 +434,9 @@
@Override
public void onClick(View v) {
mAdapter.setShowBackground(true);
+ if (mOwner != null) {
+ mOwner.getActivity().invalidateOptionsMenu();
+ }
}
});
mForegroundProcessText = (TextView)findViewById(R.id.foregroundText);
@@ -441,6 +444,9 @@
@Override
public void onClick(View v) {
mAdapter.setShowBackground(false);
+ if (mOwner != null) {
+ mOwner.getActivity().invalidateOptionsMenu();
+ }
}
});