Merge "Fix animation in Night light page"
diff --git a/src/com/android/settings/display/NightDisplayCustomEndTimePreferenceController.java b/src/com/android/settings/display/NightDisplayCustomEndTimePreferenceController.java
index 0ebbeae..7534756 100644
--- a/src/com/android/settings/display/NightDisplayCustomEndTimePreferenceController.java
+++ b/src/com/android/settings/display/NightDisplayCustomEndTimePreferenceController.java
@@ -18,7 +18,10 @@
import android.content.Context;
import android.hardware.display.ColorDisplayManager;
+
import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+
import com.android.settings.core.BasePreferenceController;
public class NightDisplayCustomEndTimePreferenceController extends BasePreferenceController {
@@ -40,6 +43,13 @@
}
@Override
+ public void displayPreference(PreferenceScreen screen) {
+ super.displayPreference(screen);
+ final Preference preference = screen.findPreference(getPreferenceKey());
+ updateState(preference);
+ }
+
+ @Override
public final void updateState(Preference preference) {
preference
.setVisible(mColorDisplayManager.getNightDisplayAutoMode()
diff --git a/src/com/android/settings/display/NightDisplayCustomStartTimePreferenceController.java b/src/com/android/settings/display/NightDisplayCustomStartTimePreferenceController.java
index a2a85ef..910086b 100644
--- a/src/com/android/settings/display/NightDisplayCustomStartTimePreferenceController.java
+++ b/src/com/android/settings/display/NightDisplayCustomStartTimePreferenceController.java
@@ -18,7 +18,10 @@
import android.content.Context;
import android.hardware.display.ColorDisplayManager;
+
import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+
import com.android.settings.core.BasePreferenceController;
public class NightDisplayCustomStartTimePreferenceController extends BasePreferenceController {
@@ -40,6 +43,13 @@
}
@Override
+ public void displayPreference(PreferenceScreen screen) {
+ super.displayPreference(screen);
+ final Preference preference = screen.findPreference(getPreferenceKey());
+ updateState(preference);
+ }
+
+ @Override
public final void updateState(Preference preference) {
preference
.setVisible(mColorDisplayManager.getNightDisplayAutoMode()