Rename shared preferences plugin

Summary: Sonar -> Flipper

Reviewed By: priteshrnandgaonkar

Differential Revision: D9991095

fbshipit-source-id: 685775e373ae22abbb06b979fea8461c35de74b5
This commit is contained in:
Pascal Hartig
2018-09-23 04:06:24 -07:00
committed by Facebook Github Bot
parent 448e2e720c
commit 90cf003035
2 changed files with 6 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ import com.facebook.flipper.plugins.leakcanary.LeakCanaryFlipperPlugin;
import com.facebook.flipper.plugins.litho.LithoFlipperDescriptors; import com.facebook.flipper.plugins.litho.LithoFlipperDescriptors;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesSonarPlugin; import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
@@ -46,7 +46,7 @@ public class FlipperSampleApplication extends Application {
LithoFlipperDescriptors.add(descriptorMapping); LithoFlipperDescriptors.add(descriptorMapping);
client.addPlugin(new InspectorFlipperPlugin(this, descriptorMapping)); client.addPlugin(new InspectorFlipperPlugin(this, descriptorMapping));
client.addPlugin(networkPlugin); client.addPlugin(networkPlugin);
client.addPlugin(new SharedPreferencesSonarPlugin(this, "sample")); client.addPlugin(new SharedPreferencesFlipperPlugin(this, "sample"));
client.addPlugin(new LeakCanaryFlipperPlugin()); client.addPlugin(new LeakCanaryFlipperPlugin());
client.start(); client.start();

View File

@@ -19,7 +19,7 @@ import com.facebook.flipper.core.FlipperReceiver;
import com.facebook.flipper.core.FlipperResponder; import com.facebook.flipper.core.FlipperResponder;
import java.util.Map; import java.util.Map;
public class SharedPreferencesSonarPlugin implements FlipperPlugin { public class SharedPreferencesFlipperPlugin implements FlipperPlugin {
private FlipperConnection mConnection; private FlipperConnection mConnection;
private final SharedPreferences mSharedPreferences; private final SharedPreferences mSharedPreferences;
@@ -48,7 +48,7 @@ public class SharedPreferencesSonarPlugin implements FlipperPlugin {
* @param context The context to retrieve the file from. Will use the package name as the file * @param context The context to retrieve the file from. Will use the package name as the file
* name with {@link Context#MODE_PRIVATE}. * name with {@link Context#MODE_PRIVATE}.
*/ */
public SharedPreferencesSonarPlugin(Context context) { public SharedPreferencesFlipperPlugin(Context context) {
this(context, context.getPackageName()); this(context, context.getPackageName());
} }
@@ -59,7 +59,7 @@ public class SharedPreferencesSonarPlugin implements FlipperPlugin {
* {@link Context#MODE_PRIVATE}. * {@link Context#MODE_PRIVATE}.
* @param name The preference file name. * @param name The preference file name.
*/ */
public SharedPreferencesSonarPlugin(Context context, String name) { public SharedPreferencesFlipperPlugin(Context context, String name) {
this(context, name, MODE_PRIVATE); this(context, name, MODE_PRIVATE);
} }
@@ -70,7 +70,7 @@ public class SharedPreferencesSonarPlugin implements FlipperPlugin {
* @param name The preference file name. * @param name The preference file name.
* @param mode The Context mode to utilize. * @param mode The Context mode to utilize.
*/ */
public SharedPreferencesSonarPlugin(Context context, String name, int mode) { public SharedPreferencesFlipperPlugin(Context context, String name, int mode) {
mSharedPreferences = context.getSharedPreferences(name, mode); mSharedPreferences = context.getSharedPreferences(name, mode);
mSharedPreferences.registerOnSharedPreferenceChangeListener(onSharedPreferenceChangeListener); mSharedPreferences.registerOnSharedPreferenceChangeListener(onSharedPreferenceChangeListener);
} }