Rename shared preferences plugin
Summary: Sonar -> Flipper Reviewed By: priteshrnandgaonkar Differential Revision: D9991095 fbshipit-source-id: 685775e373ae22abbb06b979fea8461c35de74b5
This commit is contained in:
committed by
Facebook Github Bot
parent
448e2e720c
commit
90cf003035
@@ -14,7 +14,7 @@ import com.facebook.flipper.plugins.leakcanary.LeakCanaryFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.litho.LithoFlipperDescriptors;
|
||||
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||
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 okhttp3.OkHttpClient;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class FlipperSampleApplication extends Application {
|
||||
LithoFlipperDescriptors.add(descriptorMapping);
|
||||
client.addPlugin(new InspectorFlipperPlugin(this, descriptorMapping));
|
||||
client.addPlugin(networkPlugin);
|
||||
client.addPlugin(new SharedPreferencesSonarPlugin(this, "sample"));
|
||||
client.addPlugin(new SharedPreferencesFlipperPlugin(this, "sample"));
|
||||
client.addPlugin(new LeakCanaryFlipperPlugin());
|
||||
client.start();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.facebook.flipper.core.FlipperReceiver;
|
||||
import com.facebook.flipper.core.FlipperResponder;
|
||||
import java.util.Map;
|
||||
|
||||
public class SharedPreferencesSonarPlugin implements FlipperPlugin {
|
||||
public class SharedPreferencesFlipperPlugin implements FlipperPlugin {
|
||||
|
||||
private FlipperConnection mConnection;
|
||||
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
|
||||
* name with {@link Context#MODE_PRIVATE}.
|
||||
*/
|
||||
public SharedPreferencesSonarPlugin(Context context) {
|
||||
public SharedPreferencesFlipperPlugin(Context context) {
|
||||
this(context, context.getPackageName());
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class SharedPreferencesSonarPlugin implements FlipperPlugin {
|
||||
* {@link Context#MODE_PRIVATE}.
|
||||
* @param name The preference file name.
|
||||
*/
|
||||
public SharedPreferencesSonarPlugin(Context context, String name) {
|
||||
public SharedPreferencesFlipperPlugin(Context context, String name) {
|
||||
this(context, name, MODE_PRIVATE);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class SharedPreferencesSonarPlugin implements FlipperPlugin {
|
||||
* @param name The preference file name.
|
||||
* @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.registerOnSharedPreferenceChangeListener(onSharedPreferenceChangeListener);
|
||||
}
|
||||
Reference in New Issue
Block a user