BG protection for user switcher on Keyguard.
Also fixes the position.
Bug: 15757197
Bug: 15545213
Change-Id: I9fab98652ab1ccad4e02d5cfa17b212a72a0a0b3
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 6af2cf8..e6b3818 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -44,6 +44,7 @@
import com.android.systemui.statusbar.KeyguardAffordanceView;
import com.android.systemui.statusbar.MirrorView;
import com.android.systemui.statusbar.StatusBarState;
+import com.android.systemui.statusbar.policy.KeyguardUserSwitcher;
import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.stack.StackStateAnimator;
@@ -62,6 +63,7 @@
private KeyguardAffordanceHelper mAfforanceHelper;
private StatusBarHeaderView mHeader;
+ private KeyguardUserSwitcher mKeyguardUserSwitcher;
private KeyguardStatusBarView mKeyguardStatusBar;
private View mQsContainer;
private QSPanel mQsPanel;
@@ -225,11 +227,18 @@
mHeader.post(mUpdateHeader);
}
- lp = (FrameLayout.LayoutParams) mNotificationContainerParent.getLayoutParams();
+ lp = (FrameLayout.LayoutParams) mNotificationStackScroller.getLayoutParams();
if (lp.width != panelWidth) {
lp.width = panelWidth;
lp.gravity = panelGravity;
- mNotificationContainerParent.setLayoutParams(lp);
+ mNotificationStackScroller.setLayoutParams(lp);
+ }
+
+ lp = (FrameLayout.LayoutParams) mScrollView.getLayoutParams();
+ if (lp.width != panelWidth) {
+ lp.width = panelWidth;
+ lp.gravity = panelGravity;
+ mScrollView.setLayoutParams(lp);
}
}
@@ -939,6 +948,9 @@
&& !mStackScrollerOverscrolling && mQsScrimEnabled
? View.VISIBLE
: View.INVISIBLE);
+ if (mKeyguardUserSwitcher != null && mQsExpanded && !mStackScrollerOverscrolling) {
+ mKeyguardUserSwitcher.hide();
+ }
}
private void setQsExpansion(float height) {
@@ -1704,6 +1716,10 @@
}
}
+ public void setKeyguardUserSwitcher(KeyguardUserSwitcher keyguardUserSwitcher) {
+ mKeyguardUserSwitcher = keyguardUserSwitcher;
+ }
+
private final Runnable mUpdateHeader = new Runnable() {
@Override
public void run() {