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

Commit 0a334053 authored by Kaori Katou's avatar Kaori Katou Committed by Yoshinori Hirano
Browse files

Dismiss keyguard when user button is tapped

When multi-user is disabled and user button is tapped
on the keyguard, the contact app is displayed behind the keyguard.
The keyguard should be dismissed when the contact app is launched.

Change-Id: I7daa0bec84b5172e78668cc71e51955f166ede0a
parent 1529753b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.widget.TextView;

import com.android.systemui.BatteryMeterView;
import com.android.systemui.R;
import com.android.systemui.qs.QSPanel;
import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.statusbar.policy.KeyguardUserSwitcher;
import com.android.systemui.statusbar.policy.UserInfoController;
@@ -154,6 +155,10 @@ public class KeyguardStatusBarView extends RelativeLayout
        });
    }

    public void setQSPanel(QSPanel qsp) {
        mMultiUserSwitch.setQsPanel(qsp);
    }

    @Override
    public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
        String percentage = NumberFormat.getPercentInstance().format((double) level / 100.0);
+4 −5
Original line number Diff line number Diff line
@@ -120,12 +120,11 @@ public class MultiUserSwitch extends FrameLayout implements View.OnClickListener
                        mTmpInt2);
            }
        } else {
            if (mQsPanel != null) {
                Intent intent = ContactsContract.QuickContact.composeQuickContactsIntent(
                        getContext(), v, ContactsContract.Profile.CONTENT_URI,
                        ContactsContract.QuickContact.MODE_LARGE, null);
            getContext().startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT));
            if (mQsPanel != null) {
                mQsPanel.getHost().collapsePanels();
                mQsPanel.getHost().startActivityDismissingKeyguard(intent);
            }
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -895,6 +895,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            mBrightnessMirrorController = new BrightnessMirrorController(mStatusBarWindow);
            mQSPanel.setBrightnessMirror(mBrightnessMirrorController);
            mHeader.setQSPanel(mQSPanel);
            mKeyguardStatusBar.setQSPanel(mQSPanel);
            qsh.setCallback(new QSTileHost.Callback() {
                @Override
                public void onTilesChanged() {