commit | 51672a18cb3890f880a9f04e9b7bd2d35fdba2fe | [log] [tgz] |
---|---|---|
author | Shen Lin <shhenlin@gmail.com> | Mon Jul 22 17:31:34 2024 +0800 |
committer | Shen Lin <shhenlin@gmail.com> | Fri Aug 23 01:57:52 2024 +0000 |
tree | 04f0c55efd3e6384e6b05c909a52588cfa22e12c | |
parent | 448a9ffa3cc9e5fa3b3d6da0bfbf3f217662e4e7 [diff] |
[Status Bar] Fix carrier and userSwitchName text style flaw These textview style has been polished in 2019, but not sync with java code. When users change theme, it will be going to recreate with wrong style. Design: https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/packages/SystemUI/res/layout/keyguard_status_bar.xml;l=79 Design: https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/packages/SystemUI/res/layout/status_bar_user_chip_container.xml;l=38 Bug: b/328588489 Test: manual, atest Change-Id: I850b2c9b56920b5cd565c96670148ea453e02fb7
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java index 302bdcc..fff8fed 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -428,13 +428,14 @@ /** Should only be called from {@link KeyguardStatusBarViewController}. */ void onOverlayChanged() { - int theme = Utils.getThemeAttr(mContext, com.android.internal.R.attr.textAppearanceSmall); - mCarrierLabel.setTextAppearance(theme); + final int carrierTheme = R.style.TextAppearance_StatusBar_Clock; + mCarrierLabel.setTextAppearance(carrierTheme); mBatteryView.updatePercentView(); + final int userSwitcherTheme = R.style.TextAppearance_StatusBar_UserChip; TextView userSwitcherName = mUserSwitcherContainer.findViewById(R.id.current_user_name); if (userSwitcherName != null) { - userSwitcherName.setTextAppearance(theme); + userSwitcherName.setTextAppearance(userSwitcherTheme); } }