Skip to content

Commit 0190536

Browse files
committed
suppress lint new api errors
1 parent 54d311e commit 0190536

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ of this software and associated documentation files (the "Software"), to deal
2525
****************************************************************************/
2626
package org.cocos2dx.lib;
2727

28+
import android.annotation.SuppressLint;
2829
import android.content.pm.PackageManager;
2930
import android.graphics.Rect;
3031
import android.media.AudioManager;
@@ -780,6 +781,7 @@ public static boolean isScreenRound() {
780781
*
781782
* @return true if the window in display cutout mode on the short edges of the screen, false otherwise
782783
*/
784+
@SuppressLint("InlinedApi")
783785
public static boolean isCutoutEnabled() {
784786
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
785787
WindowManager.LayoutParams lp = sActivity.getWindow().getAttributes();
@@ -794,6 +796,7 @@ public static boolean isCutoutEnabled() {
794796
*
795797
* @return array of int with safe insets values
796798
*/
799+
@SuppressLint("NewApi")
797800
public static int[] getSafeInsets() {
798801
final int[] safeInsets = new int[]{0, 0, 0, 0};
799802
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {

0 commit comments

Comments
 (0)