Rename internal android references

Summary: sonar -> Flipper

Reviewed By: jknoxville

Differential Revision: D10028004

fbshipit-source-id: 33a32b4aaca9c97ce8db7da3bccb7ee6515a6104
This commit is contained in:
Pascal Hartig
2018-09-25 06:47:22 -07:00
committed by Facebook Github Bot
parent f35ca982bf
commit f18802e373
5 changed files with 11 additions and 11 deletions

View File

@@ -3,7 +3,7 @@ package com.facebook.flipper.core;
public interface FlipperStateUpdateListener {
/**
* Called when the state of the sonar client changes.
* Called when the state of the Flipper client changes.
* Typical implementations will subscribe by calling {@link com.facebook.flipper.core.FlipperClient#subscribeForUpdates()}, to start receiving update events.
* Calling {@link com.facebook.flipper.core.FlipperClient#getState()} will retrieve the updated state.
*/

View File

@@ -45,21 +45,21 @@ public abstract class BufferingFlipperPlugin implements FlipperPlugin {
return mConnection != null;
}
public synchronized void send(String method, FlipperObject sonarObject) {
public synchronized void send(String method, FlipperObject flipperObject) {
if (mEventQueue == null) {
mEventQueue = new RingBuffer<>(BUFFER_SIZE);
}
if (mConnection != null) {
mConnection.send(method, sonarObject);
mConnection.send(method, flipperObject);
} else {
mEventQueue.enqueue(new CachedFlipperEvent(method, sonarObject));
mEventQueue.enqueue(new CachedFlipperEvent(method, flipperObject));
}
}
private synchronized void sendBufferedEvents() {
if (mEventQueue != null && mConnection != null) {
for (CachedFlipperEvent cachedFlipperEvent : mEventQueue.asList()) {
mConnection.send(cachedFlipperEvent.method, cachedFlipperEvent.sonarObject);
mConnection.send(cachedFlipperEvent.method, cachedFlipperEvent.flipperObject);
}
mEventQueue.clear();
}
@@ -67,11 +67,11 @@ public abstract class BufferingFlipperPlugin implements FlipperPlugin {
private static class CachedFlipperEvent {
final String method;
final FlipperObject sonarObject;
final FlipperObject flipperObject;
private CachedFlipperEvent(String method, FlipperObject sonarObject) {
private CachedFlipperEvent(String method, FlipperObject flipperObject) {
this.method = method;
this.sonarObject = sonarObject;
this.flipperObject = flipperObject;
}
}
}

View File

@@ -76,7 +76,7 @@ public class JavascriptSession implements Closeable, ScriptingSession {
mContextFactory.enterContext();
return toJson(
mContext.evaluateString(
scope, command, "sonar-console", lineNumber.incrementAndGet(), null));
scope, command, "flipper-console", lineNumber.incrementAndGet(), null));
} finally {
Context.exit();
}

View File

@@ -25,7 +25,7 @@ public class ConsoleCommandReceiver {
/**
* Incoming command execution calls may reference a context ID that means something to your
* plugin. Implement {@link ContextProvider} to provide a mapping from context ID to java object.
* This will allow your sonar plugin to control the execution context of the command.
* This will allow your Flipper plugin to control the execution context of the command.
*/
public interface ContextProvider {
@Nullable

View File

@@ -78,7 +78,7 @@ public class ApplicationDescriptor extends NodeDescriptor<ApplicationWrapper> {
boolean hasDelegateAlready = ViewCompat.hasAccessibilityDelegate(view);
if (view instanceof ViewGroup && !hasDelegateAlready) {
// add delegate to root to catch accessibility events so we can update focus in sonar
// add delegate to root to catch accessibility events so we can update focus in Flipper
view.setAccessibilityDelegate(new View.AccessibilityDelegate() {
@Override
public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) {