Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eca1fc2c authored by Thiago Vinícius Freire de Araújo Ribeiro's avatar Thiago Vinícius Freire de Araújo Ribeiro
Browse files

Fix switching running/cached apps with memory bar

Fixes issue #38735.

Invalidate the owner fragment options menu when changing mode from within
RunningProcessesView.

Change-Id: I85af7a953a1f4f570902f0959ee284f208871bce
parent f9a2f324
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1047,6 +1047,7 @@ public class ManageApplications extends Fragment implements
            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);
+6 −0
Original line number Diff line number Diff line
@@ -413,6 +413,9 @@ public class RunningProcessesView extends FrameLayout
            @Override
            public void onClick(View v) {
                mAdapter.setShowBackground(true);
                if (mOwner != null) {
                    mOwner.getActivity().invalidateOptionsMenu();
                }
            }
        });
        mForegroundProcessText = (TextView)findViewById(R.id.foregroundText);
@@ -420,6 +423,9 @@ public class RunningProcessesView extends FrameLayout
            @Override
            public void onClick(View v) {
                mAdapter.setShowBackground(false);
                if (mOwner != null) {
                    mOwner.getActivity().invalidateOptionsMenu();
                }
            }
        });