Skip to content

Commit

Permalink
Convert WindowOverlayCompat to Kotlin (facebook#43749)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#43749

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

Changelog:
[Internal] internal

Reviewed By: rshest

Differential Revision: D55604746
  • Loading branch information
alanleedev authored and facebook-github-bot committed Apr 2, 2024
1 parent 0b23ff6 commit d0f1c9d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit d0f1c9d

Please sign in to comment.