Only check phoneStatusBarIcon if profile
We currently request getUserStatusBarIconResId very frequently. We only need to do so if it is a profile, since all non-profiles have no status bar icon anyway, nor should they. Indeed, the method calling this is called updateProfileIcon(). Fixing this has two advantages: * We log a warning each time we ask for a non-profile's icon, so this will clear up logcat. * isProfile() gets automatically cached, whereas phoneStatusBarIcon doesn't, so this will be more efficient, since we'll bypass the call whenever it's not a profile. Test: atest SystemUITests:com.android.systemui.statusbar.phone.PhoneStatusBarPolicyTest Flag: EXEMPT bugfix Change-Id: Ic12606975a96f44c9ee62b1ec200255bd0e5620c
Loading
Please register or sign in to comment