Merge "Rely on the dozeAmount changes for mIsDozing" into sc-dev

This commit is contained in:
Beverly Tai
2021-07-21 17:22:19 +00:00
committed by Android (Google) Code Review

View File

@@ -133,12 +133,16 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie
} }
}; };
@Override
protected void onInit() {
mIsDozing = mStatusBarStateController.isDozing();
}
@Override @Override
protected void onViewAttached() { protected void onViewAttached() {
updateLocale(); updateLocale();
mBroadcastDispatcher.registerReceiver(mLocaleBroadcastReceiver, mBroadcastDispatcher.registerReceiver(mLocaleBroadcastReceiver,
new IntentFilter(Intent.ACTION_LOCALE_CHANGED)); new IntentFilter(Intent.ACTION_LOCALE_CHANGED));
mIsDozing = mStatusBarStateController.isDozing();
mDozeAmount = mStatusBarStateController.getDozeAmount(); mDozeAmount = mStatusBarStateController.getDozeAmount();
mBatteryController.addCallback(mBatteryCallback); mBatteryController.addCallback(mBatteryCallback);
mKeyguardUpdateMonitor.registerCallback(mKeyguardUpdateMonitorCallback); mKeyguardUpdateMonitor.registerCallback(mKeyguardUpdateMonitorCallback);