зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1917138 - Avoid a dependencies chain in placing browser screen views r=android-reviewers,pollymce
A recent change introduced returning `true` in DynamicDownloadDialogBehavior's `layoutDependsOn` method to signal to the framework that the download finished dialog depends on the bottom toolbar. While technically correct given the complexity of the entire layout the download finished dialog had it's own View depending on it - the snackbar which may show when users would tap to open a link in a new tab. And in this scenario we would get a crash. The approach here comes to restore the previous behavior - return `false` from the `layoutDependsOn` method, written exactly as it was before. Differential Revision: https://phabricator.services.mozilla.com/D221469
This commit is contained in:
Родитель
e97797e660
Коммит
6c9b0ea28c
|
@ -180,7 +180,7 @@ class DynamicDownloadDialogBehavior<V : View>(
|
|||
): Boolean {
|
||||
engineView = parent.findViewInHierarchy { it is EngineView } as? EngineView
|
||||
anchor = findAnchorInParent(parent)
|
||||
return anchor != null
|
||||
return super.layoutDependsOn(parent, child, dependency)
|
||||
}
|
||||
|
||||
fun forceExpand(view: View) {
|
||||
|
|
|
@ -278,7 +278,7 @@ class DynamicDownloadDialogBehaviorTest {
|
|||
|
||||
val result = behavior.layoutDependsOn(rootLayout, mockk(), mockk())
|
||||
|
||||
assertTrue(result)
|
||||
assertFalse(result)
|
||||
assertSame(anchor, behavior.anchor)
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ class DynamicDownloadDialogBehaviorTest {
|
|||
|
||||
val result = behavior.layoutDependsOn(rootLayout, mockk(), mockk())
|
||||
|
||||
assertTrue(result)
|
||||
assertFalse(result)
|
||||
assertSame(anchor, behavior.anchor)
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче