Convert WindowOverlayCompat to Kotlin (#43749)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43749

Convert Java to Kotlin: `react/devsupport/WindowOverlayCompat.java`

Changelog:
[Internal] internal

Reviewed By: rshest

Differential Revision: D55604746

fbshipit-source-id: 413bf28c8f692e85150a04de05dc7bae324ddd26
This commit is contained in:
Alan Lee
2024-04-02 15:12:58 -07:00
committed by Facebook GitHub Bot
parent 477611c8db
commit e5db122924
2 changed files with 27 additions and 27 deletions
@@ -1,27 +0,0 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.devsupport;
import android.os.Build;
import android.view.WindowManager;
import com.facebook.infer.annotation.Nullsafe;
/**
* Compatibility wrapper for apps targeting API level 26 or later. See
* https://developer.android.com/about/versions/oreo/android-8.0-changes.html#cwt
*/
/* package */ @Nullsafe(Nullsafe.Mode.LOCAL)
class WindowOverlayCompat {
private static final int TYPE_APPLICATION_OVERLAY = 2038;
static final int TYPE_SYSTEM_OVERLAY =
Build.VERSION.SDK_INT < Build.VERSION_CODES.O
? WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY
: TYPE_APPLICATION_OVERLAY;
}
@@ -0,0 +1,27 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.devsupport
import android.os.Build
import android.view.WindowManager
/**
* Compatibility wrapper for apps targeting API level 26 or later. See
* https://developer.android.com/about/versions/oreo/android-8.0-changes.html#cwt
*/
internal object WindowOverlayCompat {
private const val TYPE_APPLICATION_OVERLAY = 2038
@Suppress("DEPRECATION")
@JvmField
val TYPE_SYSTEM_OVERLAY: Int =
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY
else TYPE_APPLICATION_OVERLAY
}