|
|
@ -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 }
|
|
|
|