summaryrefslogtreecommitdiff
path: root/unbundle/java/com/android/tv/settings/unbundle/sdklib/DisplayManagerCompat.java
diff options
context:
space:
mode:
Diffstat (limited to 'unbundle/java/com/android/tv/settings/unbundle/sdklib/DisplayManagerCompat.java')
-rw-r--r--unbundle/java/com/android/tv/settings/unbundle/sdklib/DisplayManagerCompat.java58
1 files changed, 58 insertions, 0 deletions
diff --git a/unbundle/java/com/android/tv/settings/unbundle/sdklib/DisplayManagerCompat.java b/unbundle/java/com/android/tv/settings/unbundle/sdklib/DisplayManagerCompat.java
new file mode 100644
index 000000000..efc3d7680
--- /dev/null
+++ b/unbundle/java/com/android/tv/settings/unbundle/sdklib/DisplayManagerCompat.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+import android.annotation.NonNull;
+import android.hardware.display.DisplayManager;
+import android.view.Display;
+
+public class DisplayManagerCompat {
+ private final DisplayManager mManager;
+
+ public boolean areUserDisabledHdrTypesAllowed() {
+ return this.mManager.areUserDisabledHdrTypesAllowed();
+ }
+
+ public DisplayManagerCompat(DisplayManager manager) {
+ this.mManager = manager;
+ }
+
+
+ public Display.Mode getGlobalUserPreferredDisplayMode() {
+ return mManager.getGlobalUserPreferredDisplayMode();
+ }
+
+ public void setGlobalUserPreferredDisplayMode(@NonNull Display.Mode mode) {
+ mManager.setGlobalUserPreferredDisplayMode(mode);
+ }
+
+ public void clearGlobalUserPreferredDisplayMode() {
+ mManager.clearGlobalUserPreferredDisplayMode();
+ }
+
+ public void setUserDisabledHdrTypes(
+ @NonNull @Display.HdrCapabilities.HdrType int[] userDisabledTypes) {
+ mManager.setUserDisabledHdrTypes(userDisabledTypes);
+ }
+
+ public @NonNull
+ int[] getUserDisabledHdrTypes() {
+ return mManager.getUserDisabledHdrTypes();
+ }
+
+ public void setAreUserDisabledHdrTypesAllowed(boolean areUserDisabledHdrTypesAllowed) {
+ mManager.setAreUserDisabledHdrTypesAllowed(areUserDisabledHdrTypesAllowed);
+ }
+}