From 6a61557b2481151c13a398c333203e0244c30ea5 Mon Sep 17 00:00:00 2001 From: Nicholas Tinsley Date: Mon, 30 Mar 2020 13:04:00 -0700 Subject: [PATCH] Early return on tinting CursorDrawable if no color supplied Summary: There's (potentially) a lot of expensive reflection calls here that, as best I can tell, end up being ignored if the supplied color is null. Better to early return. Changelog: [General] [Internal] Preclude reflection when setting cursor color if color is null Reviewed By: JoshuaGross Differential Revision: D20670594 fbshipit-source-id: 480a988355bbd79008002c4326d4b35035ec2a95 --- .../react/views/textinput/ReactTextInputManager.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index 7e51725760b..74c4a2ad7db 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -435,6 +435,9 @@ public class ReactTextInputManager extends BaseViewManager= Build.VERSION_CODES.Q) { Drawable cursorDrawable = view.getTextCursorDrawable(); @@ -467,9 +470,7 @@ public class ReactTextInputManager extends BaseViewManager