Notify config update listeners on Config Provier update
Summary: Inform config update listeners also on config provider update.
@@ -255,11 +255,16 @@ public final class TraceOrchestrator
mTraceProviders = providers;
}
- synchronized public void setConfigProvider(ConfigProvider newConfigProvider) {
+ public void setConfigProvider(ConfigProvider newConfigProvider) {
+ synchronized (this) {
if (newConfigProvider.equals(mConfigProvider)) {
return;
}
+ }
+
+ mListenerManager.onBeforeConfigUpdate();
+ synchronized (this) {
// Defer updating the config provider if we're inside a trace
TraceControl traceControl = TraceControl.get();
if (traceControl != null && traceControl.isInsideTrace()) {
@@ -269,6 +274,7 @@ public final class TraceOrchestrator
performConfigProviderTransition(newConfigProvider);
}
+ }
public synchronized void setBackgroundUploadService(
@Nullable BackgroundUploadService uploadService) {
