Remove experimental gating for LayoutAnimation on Android

Reviewed By: sahrens

Differential Revision: D14658087

fbshipit-source-id: 378ef4a5c5336d428b5045772d094a297b2767c7
This commit is contained in:
Pieter De Baets
2019-04-03 04:42:15 -07:00
committed by Facebook Github Bot
parent f571c62ddf
commit 9895d01137
7 changed files with 12 additions and 67 deletions
@@ -74,7 +74,6 @@ public class NativeViewHierarchyManager {
private final LayoutAnimationController mLayoutAnimator = new LayoutAnimationController();
private final Map<Integer, SparseIntArray> mTagsToPendingIndicesToDelete = new HashMap<>();
private boolean mLayoutAnimationEnabled;
private PopupMenu mPopupMenu;
public NativeViewHierarchyManager(ViewManagerRegistry viewManagers) {
@@ -106,10 +105,6 @@ public class NativeViewHierarchyManager {
return viewManager;
}
public void setLayoutAnimationEnabled(boolean enabled) {
mLayoutAnimationEnabled = enabled;
}
public synchronized void updateInstanceHandle(int tag, long instanceHandle) {
UiThreadUtil.assertOnUiThread();
@@ -225,8 +220,7 @@ public class NativeViewHierarchyManager {
}
private void updateLayout(View viewToUpdate, int x, int y, int width, int height) {
if (mLayoutAnimationEnabled &&
mLayoutAnimator.shouldAnimateLayout(viewToUpdate)) {
if (mLayoutAnimator.shouldAnimateLayout(viewToUpdate)) {
mLayoutAnimator.applyLayoutUpdate(viewToUpdate, x, y, width, height);
} else {
viewToUpdate.layout(x, y, x + width, y + height);
@@ -433,8 +427,7 @@ public class NativeViewHierarchyManager {
int normalizedIndexToRemove = normalizeIndex(indexToRemove, pendingIndicesToDelete);
View viewToRemove = viewManager.getChildAt(viewToManage, normalizedIndexToRemove);
if (mLayoutAnimationEnabled &&
mLayoutAnimator.shouldAnimateLayout(viewToRemove) &&
if (mLayoutAnimator.shouldAnimateLayout(viewToRemove) &&
arrayContains(tagsToDelete, viewToRemove.getId())) {
// The view will be removed and dropped by the 'delete' layout animation
// instead, so do nothing
@@ -483,8 +476,7 @@ public class NativeViewHierarchyManager {
tagsToDelete));
}
if (mLayoutAnimationEnabled &&
mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) {
if (mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) {
int updatedCount = pendingIndicesToDelete.get(indexToDelete, 0) + 1;
pendingIndicesToDelete.put(indexToDelete, updatedCount);
mLayoutAnimator.deleteView(