Add Night display feature
Bug: 28615069
Tints the display at night automatically according to your schedule or
using the sunrise/sunset corresponding to your current location.
Change-Id: Ie56b4eed88cc2fcbae88002492b1edad5820b6b1
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 37a9d5d..1002b0d 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -51,6 +51,7 @@
import android.view.WindowManager;
import com.android.internal.R;
+import com.android.internal.app.NightDisplayController;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.SamplingProfilerIntegration;
import com.android.internal.os.ZygoteInit;
@@ -63,6 +64,7 @@
import com.android.server.connectivity.MetricsLoggerService;
import com.android.server.devicepolicy.DevicePolicyManagerService;
import com.android.server.display.DisplayManagerService;
+import com.android.server.display.NightDisplayService;
import com.android.server.dreams.DreamManagerService;
import com.android.server.fingerprint.FingerprintService;
import com.android.server.hdmi.HdmiControlService;
@@ -995,6 +997,10 @@
mSystemServiceManager.startService(TwilightService.class);
+ if (NightDisplayController.isAvailable(context)) {
+ mSystemServiceManager.startService(NightDisplayService.class);
+ }
+
mSystemServiceManager.startService(JobSchedulerService.class);
mSystemServiceManager.startService(SoundTriggerService.class);