Rely on the dozeAmount changes for mIsDozing
The large clock view can be attached while the doze transition is happening, so we don't want to mistakently set mIsDozing=false from StatusBarStateController#isDozing when we should be relying on the update from onDozeAmountChanged. Test: manual Fixes: 194277812 Change-Id: I202b9d845194f9d97d8ac1d6d1ff7e3f78491fd7
This commit is contained in:
@@ -133,12 +133,16 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void onInit() {
|
||||
mIsDozing = mStatusBarStateController.isDozing();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onViewAttached() {
|
||||
updateLocale();
|
||||
mBroadcastDispatcher.registerReceiver(mLocaleBroadcastReceiver,
|
||||
new IntentFilter(Intent.ACTION_LOCALE_CHANGED));
|
||||
mIsDozing = mStatusBarStateController.isDozing();
|
||||
mDozeAmount = mStatusBarStateController.getDozeAmount();
|
||||
mBatteryController.addCallback(mBatteryCallback);
|
||||
mKeyguardUpdateMonitor.registerCallback(mKeyguardUpdateMonitorCallback);
|
||||
|
||||
Reference in New Issue
Block a user