Fix View Recycling crash on older Android OSes

Summary:
Fixes a trivial crash that occurs when running View Recycling on pre-Android P devices.

Changelog: [Internal]

Reviewed By: bvanderhoof

Differential Revision: D37242858

fbshipit-source-id: 74f3912d60799172c47c67a87f662b4ff8fb1e35
This commit is contained in:
Joshua Gross
2022-06-17 11:08:02 -07:00
committed by Facebook GitHub Bot
parent b5ff26b0b9
commit a291819b5c
@@ -102,8 +102,10 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
view.setAnimationMatrix(null);
// setShadowColor
view.setOutlineAmbientShadowColor(Color.BLACK);
view.setOutlineSpotShadowColor(Color.BLACK);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
view.setOutlineAmbientShadowColor(Color.BLACK);
view.setOutlineSpotShadowColor(Color.BLACK);
}
// Focus IDs
// Also see in AOSP source: