Identity equality for arguments of types Int and Int is deprecated

Viewed 14062

Just fyi, this is my first question on StackOverflow and I'm really new in Kotlin.

While working on a project that's fully Kotlin (ver 1.1.3-2), I see a warning on the following code (with the comments for you curious lads):

    // Code below is to handle presses of Volume up or Volume down.
    // Without this, after pressing volume buttons, the navigation bar will
    // show up and won't hide
    val decorView = window.decorView
    decorView
        .setOnSystemUiVisibilityChangeListener { visibility ->
            if (visibility and View.SYSTEM_UI_FLAG_FULLSCREEN === 0) {
                 decorView.systemUiVisibility = flags
            }
        }

The warning is for visibility and View.SYSTEM_UI_FLAG_FULLSCREEN === 0, and it says Identity equality for arguments of types Int and Int is deprecated.

How should I change the code and why was it deprecated in the first place (for knowledge's sake)?

2 Answers
Related