Add additional verbose logging to MountingManager.java

Summary:
In MountingManager.java in Fabric, if we drop a view with any attached views, we also drop all children. If verbose logging is turned on, log all instances of that happening.

This has no impact unless you switch the flag on manually in debug mode.

Changelog: [Internal]

Differential Revision: D23257749

fbshipit-source-id: fce4476aa47cc1b7137cd9fd2fd0241af1593288
This commit is contained in:
Joshua Gross 2020-08-22 22:39:48 -07:00 коммит произвёл Facebook GitHub Bot
Родитель b0fbbe5442
Коммит 39689bd969
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -120,6 +120,15 @@ public class MountingManager {
for (int i = viewGroupManager.getChildCount(viewGroup) - 1; i >= 0; i--) {
View child = viewGroupManager.getChildAt(viewGroup, i);
if (getNullableViewState(child.getId()) != null) {
if (SHOW_CHANGED_VIEW_HIERARCHIES) {
FLog.e(
TAG,
"Automatically dropping view that is still attached to a parent being dropped. Parent: ["
+ reactTag
+ "] child: ["
+ child.getId()
+ "]");
}
dropView(child);
}
viewGroupManager.removeViewAt(viewGroup, i);