1 // Copyright 2019 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.base.compat; 6 7 import android.os.Build; 8 import android.view.Window; 9 10 import androidx.annotation.RequiresApi; 11 12 /** 13 * Utility class to use new APIs that were added in O_MR1 (API level 27). These need to exist in a 14 * separate class so that Android framework can successfully verify classes without 15 * encountering the new APIs. 16 */ 17 @RequiresApi(Build.VERSION_CODES.O_MR1) 18 public final class ApiHelperForOMR1 { ApiHelperForOMR1()19 private ApiHelperForOMR1() {} 20 21 /** See {@link Window#isWideColorGamut() }. */ isWideColorGamut(Window window)22 public static boolean isWideColorGamut(Window window) { 23 return window.isWideColorGamut(); 24 } 25 } 26