title: ERROR: OnBackPressed(); not working as expected
body: <p>Why is exiting the application not working? When open drawer_layout closes but doesn't exit, what am I missing?</p>
  <pre><code>override fun onBackPressed() {
          val mBackPressed: Long = 0
          val intervalTime = 2000
  
          if (drawer_layout.isDrawerOpen(GravityCompat.START)) {
              drawer_layout.closeDrawer(GravityCompat.START)
          } else {
              if (mBackPressed + intervalTime &gt; System.currentTimeMillis()) {
                  super.onBackPressed()
                  return
              } else {
                  Toast.makeText(
                      baseContext,
                      &quot;Tap back button in order to exit&quot;,
                      Toast.LENGTH_SHORT
                  ).show()
              }
          }
      }
  </code></pre>