Skip to content
Snippets Groups Projects
Commit 7e39709f authored by Jeff Boek's avatar Jeff Boek Committed by Beatriz Rizental
Browse files

Bug 1928334 - Handles animating activities a=dmeehan

parent 53ca7bda
Branches
Tags
1 merge request!1527Bug 43808: Rebase 128.10.1 onto 128.11
......@@ -798,7 +798,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
return false
}
final override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
ProfilerMarkers.addForDispatchTouchEvent(components.core.engine.profiler, ev)
return super.dispatchTouchEvent(ev)
}
......
......
......@@ -7,6 +7,7 @@ package org.mozilla.fenix.customtabs
import android.app.assist.AssistContent
import android.net.Uri
import android.os.Build
import android.view.MotionEvent
import androidx.annotation.RequiresApi
import androidx.annotation.VisibleForTesting
import mozilla.components.browser.state.selector.findCustomTab
......@@ -24,6 +25,8 @@ const val EXTRA_IS_SANDBOX_CUSTOM_TAB = "org.mozilla.fenix.customtabs.EXTRA_IS_S
*/
@Suppress("TooManyFunctions")
open class ExternalAppBrowserActivity : HomeActivity() {
var isFinishedAnimating = false
override fun onResume() {
super.onResume()
......@@ -74,4 +77,17 @@ open class ExternalAppBrowserActivity : HomeActivity() {
val currentTabUrl = getExternalTab()?.content?.url
outContent?.webUri = currentTabUrl?.let { Uri.parse(it) }
}
override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
if (!isFinishedAnimating) {
return true
}
return super.dispatchTouchEvent(ev)
}
override fun onEnterAnimationComplete() {
super.onEnterAnimationComplete()
isFinishedAnimating = true
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment