title: Why do I get the warning hint "Simplify boolean expression" in Kotlin?
body: <p>I use Kotlin in Android Studio 3.01, I get the following warning hint for the code <code>if (isRegistered(mContext)==false )</code> in Code A.</p>
  
  <p>How can I fix it? Thanks!</p>
  
  <p><strong>Warning Hint</strong></p>
  
  <p><em>Simplify boolean expression. This inspections reports boolean expressions that have parts which can be reduced to constants</em></p>
  
  <p><strong>Code A</strong></p>
  
  <pre><code>public override fun onDestroy() {
          if (isRegistered(mContext)==false ) {
              if (isDebug()) {              
                  openActivity(applicationContext, UIBuy::class.java)
              } else {
                  openActivity(applicationContext, UIBuy::class.java)
              }
          }
          super.onDestroy()
      }
  </code></pre>