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

Commit 606fec68 authored by Chirayu Desai's avatar Chirayu Desai
Browse files

GlobalActions: make silent mode the last toggle

if multi user support is enabled, silent mode toggle is above
the user list, but it should be the last.

Change-Id: I7d6146c740827c856e3c8d39d349534dfbfee12d
parent aadd9c84
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -298,11 +298,7 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
        // next: airplane mode
        // next: airplane mode
        mItems.add(mAirplaneModeOn);
        mItems.add(mAirplaneModeOn);


        // last: silent mode
        // next: users
        if (SHOW_SILENT_TOGGLE) {
            mItems.add(mSilentModeAction);
        }

        List<UserInfo> users = mContext.getPackageManager().getUsers();
        List<UserInfo> users = mContext.getPackageManager().getUsers();
        if (users.size() > 1) {
        if (users.size() > 1) {
            UserInfo currentUser;
            UserInfo currentUser;
@@ -339,6 +335,11 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
            }
            }
        }
        }


        // last: silent mode
        if (SHOW_SILENT_TOGGLE) {
            mItems.add(mSilentModeAction);
        }

        mAdapter = new MyAdapter();
        mAdapter = new MyAdapter();


        final AlertDialog.Builder ab = new AlertDialog.Builder(mContext);
        final AlertDialog.Builder ab = new AlertDialog.Builder(mContext);