summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-11-15 00:40:26 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-11-15 00:40:26 +0000
commitc1d607e90d03dfb06fa3be4e65366aa89619832f (patch)
tree8f96f4393d628363b5988d3e577d90a1c3e3ab67 /core/java
parent9a710dad5f7bebdb09e55ed8fba13608fd757c37 (diff)
parentea7d71b3aa12fb36383c72dd4f29014f92070797 (diff)
Merge "Add ColorDisplayManager"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/hardware/display/ColorDisplayManager.java35
-rw-r--r--core/java/com/android/internal/app/ColorDisplayController.java7
2 files changed, 35 insertions, 7 deletions
diff --git a/core/java/android/hardware/display/ColorDisplayManager.java b/core/java/android/hardware/display/ColorDisplayManager.java
new file mode 100644
index 000000000000..0a76c2bc724e
--- /dev/null
+++ b/core/java/android/hardware/display/ColorDisplayManager.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.display;
+
+import android.content.Context;
+
+import com.android.internal.R;
+
+/**
+ * Manages the display's color transforms and modes.
+ * @hide
+ */
+public final class ColorDisplayManager {
+
+ /**
+ * Returns {@code true} if Night Display is supported by the device.
+ */
+ public static boolean isNightDisplayAvailable(Context context) {
+ return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable);
+ }
+}
diff --git a/core/java/com/android/internal/app/ColorDisplayController.java b/core/java/com/android/internal/app/ColorDisplayController.java
index 75151806cfcf..213bb75e6c6c 100644
--- a/core/java/com/android/internal/app/ColorDisplayController.java
+++ b/core/java/com/android/internal/app/ColorDisplayController.java
@@ -560,13 +560,6 @@ public final class ColorDisplayController {
}
/**
- * Returns {@code true} if Night display is supported by the device.
- */
- public static boolean isAvailable(Context context) {
- return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable);
- }
-
- /**
* Callback invoked whenever the Night display settings are changed.
*/
public interface Callback {