summaryrefslogtreecommitdiff
path: root/core/java/android
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/android
parent9a710dad5f7bebdb09e55ed8fba13608fd757c37 (diff)
parentea7d71b3aa12fb36383c72dd4f29014f92070797 (diff)
Merge "Add ColorDisplayManager"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/hardware/display/ColorDisplayManager.java35
1 files changed, 35 insertions, 0 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);
+ }
+}