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

Commit e60d6ed7 authored by Adrian Roos's avatar Adrian Roos Committed by Android (Google) Code Review
Browse files

Merge "Don't crash if there's no QS panel" into lmp-dev

parents fbc3f198 1e4ecf8e
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -74,9 +74,11 @@ public class MultiUserSwitch extends FrameLayout implements View.OnClickListener
                    mKeyguardUserSwitcher.show(true /* animate */);
                }
            } else {
                if (mQsPanel != null) {
                    mQsPanel.showDetailAdapter(true,
                            mQsPanel.getHost().getUserSwitcherController().userDetailAdapter);
                }
            }
        } else {
            Intent intent = ContactsContract.QuickContact.composeQuickContactsIntent(
                    getContext(), v, ContactsContract.Profile.CONTENT_URI,
@@ -93,9 +95,12 @@ public class MultiUserSwitch extends FrameLayout implements View.OnClickListener
            final UserManager um = UserManager.get(getContext());
            String text;
            if (um.isUserSwitcherEnabled()) {
                String currentUser = null;
                if (mQsPanel != null) {
                    UserSwitcherController controller = mQsPanel.getHost()
                            .getUserSwitcherController();
                String currentUser = controller.getCurrentUserName(mContext);
                    currentUser = controller.getCurrentUserName(mContext);
                }
                if (TextUtils.isEmpty(currentUser)) {
                    text = mContext.getString(R.string.accessibility_multi_user_switch_switcher);
                } else {