[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/1422 - Do not hide keyboard on pause

pull/600/head
Emily Kager 5 years ago committed by Emily Kager
parent 0b99b7fc12
commit 12f6b64653

@ -4,13 +4,11 @@
package org.mozilla.fenix package org.mozilla.fenix
import android.app.Activity
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import android.view.inputmethod.InputMethodManager
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar import androidx.appcompat.widget.Toolbar
import androidx.navigation.fragment.NavHostFragment import androidx.navigation.fragment.NavHostFragment
@ -114,19 +112,6 @@ open class HomeActivity : AppCompatActivity() {
super.onBackPressed() super.onBackPressed()
} }
override fun onPause() {
super.onPause()
hideSoftwareKeyboard()
}
private fun hideSoftwareKeyboard() {
(getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager).apply {
currentFocus?.also {
this.hideSoftInputFromWindow(it.windowToken, 0)
}
}
}
private fun handleCrashIfNecessary(intent: Intent?) { private fun handleCrashIfNecessary(intent: Intent?) {
if (intent == null) { return } if (intent == null) { return }
if (!Crash.isCrashIntent(intent)) { return } if (!Crash.isCrashIntent(intent)) { return }

Loading…
Cancel
Save