Rename remaining exported Sonar Android references

Summary: Excludes internal plugins, but should cover everything else.

Reviewed By: priteshrnandgaonkar

Differential Revision: D10009134

fbshipit-source-id: f601014e984bccf78fadbe59ee50dffdb4f6cb12
This commit is contained in:
Pascal Hartig
2018-09-24 11:02:13 -07:00
committed by Facebook Github Bot
parent bf7eeada67
commit 777e9323de
12 changed files with 27 additions and 27 deletions

View File

@@ -13,7 +13,7 @@ import com.facebook.flipper.core.FlipperPlugin;
import javax.annotation.Nullable;
/**
* Sonar plugin that keeps events in a buffer until a connection is available.
* Flipper plugin that keeps events in a buffer until a connection is available.
*
* <p>In order to send data to the {@link FlipperConnection}, use {@link #send(String, FlipperObject)}
* instead of {@link FlipperConnection#send(String, FlipperObject)}.
@@ -22,7 +22,7 @@ public abstract class BufferingFlipperPlugin implements FlipperPlugin {
private static final int BUFFER_SIZE = 500;
private @Nullable RingBuffer<CachedSonarEvent> mEventQueue;
private @Nullable RingBuffer<CachedFlipperEvent> mEventQueue;
private @Nullable FlipperConnection mConnection;
@Override
@@ -52,24 +52,24 @@ public abstract class BufferingFlipperPlugin implements FlipperPlugin {
if (mConnection != null) {
mConnection.send(method, sonarObject);
} else {
mEventQueue.enqueue(new CachedSonarEvent(method, sonarObject));
mEventQueue.enqueue(new CachedFlipperEvent(method, sonarObject));
}
}
private synchronized void sendBufferedEvents() {
if (mEventQueue != null && mConnection != null) {
for (CachedSonarEvent cachedSonarEvent : mEventQueue.asList()) {
mConnection.send(cachedSonarEvent.method, cachedSonarEvent.sonarObject);
for (CachedFlipperEvent cachedFlipperEvent : mEventQueue.asList()) {
mConnection.send(cachedFlipperEvent.method, cachedFlipperEvent.sonarObject);
}
mEventQueue.clear();
}
}
private static class CachedSonarEvent {
private static class CachedFlipperEvent {
final String method;
final FlipperObject sonarObject;
private CachedSonarEvent(String method, FlipperObject sonarObject) {
private CachedFlipperEvent(String method, FlipperObject sonarObject) {
this.method = method;
this.sonarObject = sonarObject;
}

View File

@@ -16,7 +16,7 @@ import com.facebook.flipper.plugins.common.MainThreadFlipperReceiver;
import org.json.JSONObject;
/**
* Convenience class for adding console execution to a Sonar Plugin. Calling {@link
* Convenience class for adding console execution to a Flipper Plugin. Calling {@link
* ConsoleCommandReceiver#listenForCommands(FlipperConnection, ScriptingEnvironment, ContextProvider)}
* will add the necessary listeners for responding to command execution calls.
*/

View File

@@ -103,7 +103,7 @@ public class BoundsDrawable extends Drawable {
drawBoundsDimensions(canvas, mContentBounds);
// Disabled for now since Sonar doesn't support options too well at this point in time.
// Disabled for now since Flipper doesn't support options too well at this point in time.
// Once options are supported, we should re-enable the calls below
// drawCardinalDimensionsBetween(canvas, mContentBounds, mPaddingBounds);
// drawCardinalDimensionsBetween(canvas, mPaddingBounds, mMarginBounds);

View File

@@ -47,7 +47,7 @@ public class InspectorFlipperPlugin implements FlipperPlugin {
private @Nullable List<ExtensionCommand> mExtensionCommands;
private boolean mShowLithoAccessibilitySettings;
/** An interface for extensions to the Inspector Sonar plugin */
/** An interface for extensions to the Inspector Flipper plugin */
public interface ExtensionCommand {
/** The command to respond to */
String command();

View File

@@ -15,7 +15,7 @@ public class InspectorValue<T> implements FlipperValue {
/**
* Descrive the type of data this value contains. This will influence how values are parsed and
* displayed by the Sonar desktop app. For example colors will be parse as integers and displayed
* displayed by the Flipper desktop app. For example colors will be parse as integers and displayed
* using hex values and be editable using a color picker.
*
* <p>Do not extends this list of types without adding support for the type in the desktop

View File

@@ -18,7 +18,7 @@ import javax.annotation.Nullable;
/**
* A NodeDescriptor is an object which known how to expose an Object of type T to the ew Inspector.
* This class is the extension point for the Sonar inspector plugin and is how custom classes and
* This class is the extension point for the Flipper inspector plugin and is how custom classes and
* data can be exposed to the inspector.
*/
public abstract class NodeDescriptor<T> {
@@ -44,8 +44,8 @@ public abstract class NodeDescriptor<T> {
}
/**
* Invalidate a node. This tells Sonar that this node is no longer valid and its properties and/or
* children have changed. This will trigger Sonar to re-query this node getting any new data.
* Invalidate a node. This tells Flipper that this node is no longer valid and its properties and/or
* children have changed. This will trigger Flipper to re-query this node getting any new data.
*/
protected final void invalidate(final T node) {
if (mConnection != null) {
@@ -64,8 +64,8 @@ public abstract class NodeDescriptor<T> {
}
/**
* Invalidate a node in the ax tree. This tells Sonar that this node is no longer valid and its properties and/or
* children have changed. This will trigger Sonar to re-query this node getting any new data.
* Invalidate a node in the ax tree. This tells Flipper that this node is no longer valid and its properties and/or
* children have changed. This will trigger Flipper to re-query this node getting any new data.
*/
protected final void invalidateAX(final T node) {
if (mConnection != null) {
@@ -187,13 +187,13 @@ public abstract class NodeDescriptor<T> {
}
/**
* @return A string indicating how this element should be decorated. Check with the Sonar desktop
* @return A string indicating how this element should be decorated. Check with the Flipper desktop
* app to see what values are supported.
*/
public abstract String getDecoration(T node) throws Exception;
/**
* @return A string indicating how this element should be decorated in the AX tree. Check with the Sonar desktop
* @return A string indicating how this element should be decorated in the AX tree. Check with the Flipper desktop
* app to see what values are supported.
*/
public String getAXDecoration(T node) throws Exception {

View File

@@ -512,7 +512,7 @@ public final class AccessibilityUtil {
/**
* Creates a {@link FlipperObject} of useful properties of AccessibilityNodeInfo, to be shown in the
* Sonar Layout Inspector accessibility extension. All properties are immutable since they are all derived from
* Flipper Layout Inspector accessibility extension. All properties are immutable since they are all derived from
* various {@link View} properties. This is a more complete list than
* getAccessibilityNodeInfoProperties returns.
*
@@ -609,7 +609,7 @@ public final class AccessibilityUtil {
/**
* Modifies a {@link FlipperObject.Builder} to add Talkback-specific Accessibiltiy properties to be
* shown in the Sonar Layout Inspector.
* shown in the Flipper Layout Inspector.
*
* @param props The {@link FlipperObject.Builder} to add the properties to.
* @param view The {@link View} to derive the properties from.

View File

@@ -16,7 +16,7 @@ import com.squareup.leakcanary.AnalysisResult;
import com.squareup.leakcanary.HeapDump;
/**
* When a leak is detected, sends results to connected Sonar desktop app. In order to use this
* When a leak is detected, sends results to connected Flipper desktop app. In order to use this
* service in place of the default, a custom RefWatcher will need to be created See
* https://github.com/square/leakcanary/wiki/Customizing-LeakCanary#uploading-to-a-server
*/

View File

@@ -284,7 +284,7 @@ public class DebugComponentDescriptor extends NodeDescriptor<DebugComponent> {
&& PropWithDescription.class.isAssignableFrom(f.get(component).getClass())) {
final Object description =
((PropWithDescription) f.get(component))
.getSonarLayoutInspectorPropDescription();
.getFlipperLayoutInspectorPropDescription();
// Treat the description as immutable for now, because it's a "translation" of the
// actual prop,
// mutating them is not going to change the original prop.

View File

@@ -4,5 +4,5 @@ package com.facebook.flipper.plugins.litho;
public interface PropWithDescription {
Object getSonarLayoutInspectorPropDescription();
Object getFlipperLayoutInspectorPropDescription();
}

View File

@@ -94,7 +94,7 @@ public class FlipperOkhttpInterceptor implements Interceptor {
try {
info.body = body.bytes();
} catch (IOException e) {
Log.e("Sonar", e.toString());
Log.e("Flipper", e.toString());
}
return info;
}

View File

@@ -43,7 +43,7 @@ public class SharedPreferencesFlipperPlugin implements FlipperPlugin {
};
/**
* Creates a {@link android.content.SharedPreferences} plugin for Sonar
* Creates a {@link android.content.SharedPreferences} plugin for Flipper
*
* @param context The context to retrieve the file from. Will use the package name as the file
* name with {@link Context#MODE_PRIVATE}.
@@ -53,7 +53,7 @@ public class SharedPreferencesFlipperPlugin implements FlipperPlugin {
}
/**
* Creates a {@link android.content.SharedPreferences} plugin for Sonar
* Creates a {@link android.content.SharedPreferences} plugin for Flipper
*
* @param context The context to retrieve the file from. Will use the name as the file name with
* {@link Context#MODE_PRIVATE}.
@@ -64,7 +64,7 @@ public class SharedPreferencesFlipperPlugin implements FlipperPlugin {
}
/**
* Creates a {@link android.content.SharedPreferences} plugin for Sonar
* Creates a {@link android.content.SharedPreferences} plugin for Flipper
*
* @param context The context to retrieve the file from.
* @param name The preference file name.