From 97822ed69b2c50498e821e1efd7e9c5b1ebe419d Mon Sep 17 00:00:00 2001 From: Robert Snoeberger Date: Fri, 5 Apr 2019 10:37:21 -0400 Subject: [PATCH] Re-inflate views in onOverlayChanged. onThemeChanged had been used to re-inflate changes, but ag/6670184 modified onThemeChanged to exit early if the ThemeResId hasn't changd. A style change doesn't change the ThemeResId, so re-inflating views in onOverlayChanged so that font, etc. will update. Fixes: 129870891 Test: Lock screen font changes with style change. Change-Id: Ib4aecb017012d5035753fdc3a71615cb7b5216ce --- .../phone/NotificationPanelView.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) 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 cff38550daf99..0e9264b6b5a47 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -477,6 +477,15 @@ public class NotificationPanelView extends PanelView implements } mThemeResId = themeResId; + reInflateViews(); + } + + @Override + public void onOverlayChanged() { + reInflateViews(); + } + + private void reInflateViews() { updateShowEmptyShadeView(); // Re-inflate the status view group. @@ -484,9 +493,9 @@ public class NotificationPanelView extends PanelView implements removeView(mKeyguardStatusView); mKeyguardStatusView = (KeyguardStatusView) mInjectionInflationController .injectable(LayoutInflater.from(mContext)).inflate( - R.layout.keyguard_status_view, - this, - false); + R.layout.keyguard_status_view, + this, + false); addView(mKeyguardStatusView, index); // Re-associate the clock container with the keyguard clock switch. @@ -500,9 +509,9 @@ public class NotificationPanelView extends PanelView implements KeyguardBottomAreaView oldBottomArea = mKeyguardBottomArea; mKeyguardBottomArea = (KeyguardBottomAreaView) mInjectionInflationController .injectable(LayoutInflater.from(mContext)).inflate( - R.layout.keyguard_bottom_area, - this, - false); + R.layout.keyguard_bottom_area, + this, + false); mKeyguardBottomArea.initFrom(oldBottomArea); addView(mKeyguardBottomArea, index); initBottomArea();