summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2015-05-20 00:43:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-20 00:43:47 +0000
commit1bbe3d4b75f2ab4afe6344ee778058eaf530e3f5 (patch)
treedaddefc758128d4d5d8cf0404808aa6c9410843f /packages/SystemUI/src/com/android/systemui/statusbar
parentf7a9aaa12eb25bbd163fbc02c4fa638889dd67c2 (diff)
parent970be5313a03de60e1993c3d98027f34c1c9b4f1 (diff)
downloadframeworks_base-1bbe3d4b75f2ab4afe6344ee778058eaf530e3f5.zip
frameworks_base-1bbe3d4b75f2ab4afe6344ee778058eaf530e3f5.tar.gz
frameworks_base-1bbe3d4b75f2ab4afe6344ee778058eaf530e3f5.tar.bz2
Merge "Fix user switcher ripple emanation point" into mnc-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java
index 82f5a9e..f11d83c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java
@@ -42,6 +42,8 @@ public class MultiUserSwitch extends FrameLayout implements View.OnClickListener
private boolean mKeyguardMode;
final UserManager mUserManager;
+ private final int[] mTmpInt2 = new int[2];
+
public MultiUserSwitch(Context context, AttributeSet attrs) {
super(context, attrs);
mUserManager = UserManager.get(getContext());
@@ -77,7 +79,15 @@ public class MultiUserSwitch extends FrameLayout implements View.OnClickListener
UserSwitcherController userSwitcherController =
mQsPanel.getHost().getUserSwitcherController();
if (userSwitcherController != null) {
- mQsPanel.showDetailAdapter(true, userSwitcherController.userDetailAdapter);
+ View center = getChildCount() > 0 ? getChildAt(0) : this;
+
+ center.getLocationInWindow(mTmpInt2);
+ mTmpInt2[0] += center.getWidth() / 2;
+ mTmpInt2[1] += center.getHeight() / 2;
+
+ mQsPanel.showDetailAdapter(true,
+ userSwitcherController.userDetailAdapter,
+ mTmpInt2);
}
}
}