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

View File

@@ -76,7 +76,7 @@ public class JavascriptSession implements Closeable, ScriptingSession {
mContextFactory.enterContext(); mContextFactory.enterContext();
return toJson( return toJson(
mContext.evaluateString( mContext.evaluateString(
scope, command, "sonar-console", lineNumber.incrementAndGet(), null)); scope, command, "flipper-console", lineNumber.incrementAndGet(), null));
} finally { } finally {
Context.exit(); 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 * 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. * 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 { public interface ContextProvider {
@Nullable @Nullable

View File

@@ -78,7 +78,7 @@ public class ApplicationDescriptor extends NodeDescriptor<ApplicationWrapper> {
boolean hasDelegateAlready = ViewCompat.hasAccessibilityDelegate(view); boolean hasDelegateAlready = ViewCompat.hasAccessibilityDelegate(view);
if (view instanceof ViewGroup && !hasDelegateAlready) { 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() { view.setAccessibilityDelegate(new View.AccessibilityDelegate() {
@Override @Override
public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) { public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) {