diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index d6b7fd97f..7a3586df1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -20,7 +20,6 @@ import com.facebook.debug.tags.ReactDebugOverlayTags; import com.facebook.infer.annotation.Assertions; import com.facebook.proguard.annotations.DoNotStrip; import com.facebook.react.bridge.JavaScriptContextHolder; -import com.facebook.react.bridge.PerformanceCounter; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/Scheduler.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/Scheduler.java index 9fb7bddb3..fb199435f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/Scheduler.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/Scheduler.java @@ -1,6 +1,6 @@ package com.facebook.react.fabric; -import android.util.Log; +import com.facebook.common.logging.FLog; import com.facebook.react.bridge.ReactContext; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingDeque; @@ -56,7 +56,7 @@ public class Scheduler { try { work.run(); } catch (Exception ex) { - Log.w(TAG, "Exception running work in JS.", ex); + FLog.w(TAG, "Exception running work in JS.", ex); throw ex; } } @@ -66,7 +66,7 @@ public class Scheduler { } catch (RejectedExecutionException ex) { // This can happen if a Work is scheduled when the Scheduler is being shutdown. // For now, we log and do not take any action. - Log.i(TAG, "Unable to schedule task."); + FLog.i(TAG, "Unable to schedule task."); } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.java index 0077b953d..4a705bb75 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.java @@ -15,8 +15,8 @@ import static com.facebook.react.uimanager.events.TouchesHelper.TOUCHES_KEY; import android.annotation.TargetApi; import android.os.Build; -import android.util.Log; import android.util.Pair; +import com.facebook.common.logging.FLog; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableArray; @@ -29,8 +29,6 @@ import com.facebook.react.fabric.Work; import com.facebook.react.uimanager.IllegalViewOperationException; import com.facebook.react.uimanager.events.RCTEventEmitter; import java.io.Closeable; -import java.io.IOException; -import java.util.Arrays; import java.util.HashSet; import java.util.Set; import javax.annotation.Nullable; @@ -54,7 +52,7 @@ public class FabricEventEmitter implements RCTEventEmitter, Closeable { long eventTarget = mFabricUIManager.createEventTarget(reactTag); mScheduler.scheduleWork(new FabricUIManagerWork(eventTarget, eventName, params)); } catch (IllegalViewOperationException e) { - Log.e(TAG, "Unable to emmit event for tag " + reactTag, e); + FLog.e(TAG, "Unable to emmit event for tag " + reactTag, e); } } @@ -79,7 +77,7 @@ public class FabricEventEmitter implements RCTEventEmitter, Closeable { try { mFabricUIManager.invoke(mEventTarget, mEventName, mParams); } catch (Throwable t) { - Log.e(TAG, "Error sending event " + mEventName, t); + FLog.e(TAG, "Error sending event " + mEventName, t); //TODO: manage exception properly } finally{ mFabricUIManager.releaseEventTarget(mEventTarget); @@ -109,7 +107,7 @@ public class FabricEventEmitter implements RCTEventEmitter, Closeable { int rootNodeID = 0; int target = nativeEvent.getInt(TARGET_KEY); if (target < 1) { - Log.e(TAG,"A view is reporting that a touch occurred on tag zero."); + FLog.e(TAG,"A view is reporting that a touch occurred on tag zero."); } else { rootNodeID = target; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java index 8fe0c5cdd..3e7d56a5e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java @@ -10,7 +10,7 @@ package com.facebook.react.uimanager; import android.annotation.TargetApi; import android.content.res.Resources; import android.os.Build; -import android.util.Log; +import com.facebook.common.logging.FLog; import android.util.SparseArray; import android.util.SparseBooleanArray; import android.view.Menu; @@ -123,7 +123,7 @@ public class NativeViewHierarchyManager { try { updateInstanceHandle(resolveView(tag), instanceHandle); } catch (IllegalViewOperationException e) { - Log.e(TAG, "Unable to update properties for view tag " + tag, e); + FLog.e(TAG, "Unable to update properties for view tag " + tag, e); } } @@ -138,7 +138,7 @@ public class NativeViewHierarchyManager { viewManager.updateProperties(viewToUpdate, props); } } catch (IllegalViewOperationException e) { - Log.e(TAG, "Unable to update properties for view tag " + tag, e); + FLog.e(TAG, "Unable to update properties for view tag " + tag, e); } }