Prevent NPE when displaying a missing clock

Test: Manual
Bug: 229771520
Fixes: 237255645
Change-Id: I17cddba7aee082c118f9f63eaab8a8c025daee73
This commit is contained in:
Hawkwood Glazier
2022-06-28 19:29:51 +00:00
parent 33a07e9582
commit 2a4d9e5d51

View File

@@ -263,9 +263,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
mCurrentClockSize = clockSize;
Clock clock = getClock();
boolean appeared = mView.switchToClock(clockSize, animate);
if (animate && appeared && clockSize == LARGE) {
getClock().getAnimations().enter();
if (clock != null && animate && appeared && clockSize == LARGE) {
clock.getAnimations().enter();
}
}