Skip to content
Snippets Groups Projects
Verified Commit 6eb75b58 authored by Jeff Boek's avatar Jeff Boek Committed by ma1
Browse files

Bug 1928334 - Handles animating activities a=dmeehan

parent 913be926
Branches
Tags
No related merge requests found
......@@ -903,7 +903,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorIn
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