From 874fd364b09015a03cca4540e0b764c9d5b0cece Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Wed, 16 Mar 2022 09:35:03 -0400 Subject: [PATCH 1/2] Fix logcat view layout warnings The one-handed bouncer was requesting layout via setLayoutParams() on each onLayout pass, which was spamming logcat with warnings. Be more selective about when to request an update. Fixes: 224965291 Test: check logcat Change-Id: Ib5afe3cd07180dd1b7ec1641367a6e114c094d56 --- .../com/android/keyguard/KeyguardSecurityContainer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java index 362fbed7055ae..46a883194e25f 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -152,6 +152,7 @@ public class KeyguardSecurityContainer extends FrameLayout { private SwipeListener mSwipeListener; private ViewMode mViewMode = new DefaultViewMode(); private @Mode int mCurrentMode = MODE_DEFAULT; + private int mWidth = -1; private final WindowInsetsAnimation.Callback mWindowInsetsAnimationCallback = new WindowInsetsAnimation.Callback(DISPATCH_MODE_STOP) { @@ -649,9 +650,11 @@ public class KeyguardSecurityContainer extends FrameLayout { protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); - // After a layout pass, we need to re-place the inner bouncer, as our bounds may have - // changed. - mViewMode.updateSecurityViewLocation(); + int width = right - left; + if (changed && mWidth != width) { + mWidth = width; + mViewMode.updateSecurityViewLocation(); + } } @Override From d75f4034d7b68c9645d3b189c077c260891095fa Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Thu, 17 Mar 2022 09:27:45 -0400 Subject: [PATCH 2/2] Guest icon color Use a standard guest icon color, as well as fix the guest icon sizing Fixes: 218310678 Test: visual, open user switcher and observe guest user Change-Id: Ieb539064e416736938a6fcbced6823dd971e3fd8 --- .../res/drawable/user_switcher_icon_large.xml | 4 ++-- .../systemui/user/UserSwitcherActivity.kt | 17 ++++------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packages/SystemUI/res/drawable/user_switcher_icon_large.xml b/packages/SystemUI/res/drawable/user_switcher_icon_large.xml index 1ed75537059af..d81b518d2a9f4 100644 --- a/packages/SystemUI/res/drawable/user_switcher_icon_large.xml +++ b/packages/SystemUI/res/drawable/user_switcher_icon_large.xml @@ -27,7 +27,7 @@ - + -