Refactor: Make DevSupportManager not conform to DevInternalSettings.Listener

Summary:
## Rationale
This reduces the surface area of DevSupportManager's public API.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D29006836

fbshipit-source-id: 579364f6c556b8588f3b6bac79df3deb244a92e5
This commit is contained in:
Ramanpreet Nara
2021-06-10 16:47:20 -07:00
committed by Facebook GitHub Bot
parent 39d9122445
commit 675e480fb9
@@ -60,8 +60,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
public abstract class DevSupportManagerBase
implements DevSupportManager, PackagerCommandListener, DevInternalSettings.Listener {
public abstract class DevSupportManagerBase implements DevSupportManager, PackagerCommandListener {
public interface CallbackWithBundleLoader {
void onSuccess(JSBundleLoader bundleLoader);
@@ -135,7 +134,15 @@ public abstract class DevSupportManagerBase
mReactInstanceDevHelper = reactInstanceDevHelper;
mApplicationContext = applicationContext;
mJSAppBundleName = packagerPathForJSBundleName;
mDevSettings = new DevInternalSettings(applicationContext, this);
mDevSettings =
new DevInternalSettings(
applicationContext,
new DevInternalSettings.Listener() {
@Override
public void onInternalSettingsChanged() {
reloadSettings();
}
});
mBundleStatus = new InspectorPackagerConnection.BundleStatus();
mDevServerHelper =
new DevServerHelper(
@@ -811,10 +818,6 @@ public abstract class DevSupportManagerBase
}
}
public void onInternalSettingsChanged() {
reloadSettings();
}
protected @Nullable ReactContext getCurrentContext() {
return mCurrentContext;
}