Update theme after registering config listener
Theme might not be set yet during inflation and we might miss the event if wait for the view to be added to the window, leading to theme being out of sync. Test: adb shell am crash com.android.systemui Fixes: 130879865 Change-Id: Icd533457732b46b96aeacf9be0c32c02e6b33360
This commit is contained in:
@@ -87,15 +87,14 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp
|
||||
monitor.registerCallback(mInfoCallback);
|
||||
mHandler = new Handler(Looper.myLooper());
|
||||
mConfigurationController = configurationController;
|
||||
|
||||
onThemeChanged();
|
||||
update();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
mConfigurationController.addCallback(this);
|
||||
onThemeChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,8 +115,8 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp
|
||||
});
|
||||
ColorStateList newTextColors = ColorStateList.valueOf(array.getColor(0, Color.RED));
|
||||
array.recycle();
|
||||
setTextColor(newTextColors);
|
||||
mDefaultColorState = newTextColors;
|
||||
update();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -123,7 +123,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
|
||||
mAccessibilityController = accessibilityController;
|
||||
mConfigurationController = configurationController;
|
||||
mStatusBarStateController = statusBarStateController;
|
||||
onThemeChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,6 +132,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
|
||||
mConfigurationController.addCallback(this);
|
||||
mKeyguardUpdateMonitor.registerCallback(mUpdateMonitorCallback);
|
||||
mUnlockMethodCache.addListener(this);
|
||||
onThemeChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user