what-the-bank/sources/com/google/firebase/crashlytics/internal/settings/SettingsJsonParser.java

28 lines
1.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.crashlytics.internal.settings;
import com.google.firebase.crashlytics.internal.common.CurrentTimeProvider;
import com.google.firebase.crashlytics.internal.settings.model.SettingsData;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class SettingsJsonParser {
private final CurrentTimeProvider currentTimeProvider;
/* JADX INFO: Access modifiers changed from: package-private */
public SettingsJsonParser(CurrentTimeProvider currentTimeProvider) {
this.currentTimeProvider = currentTimeProvider;
}
public SettingsData parseSettingsJson(JSONObject jSONObject) throws JSONException {
return getJsonTransformForVersion(jSONObject.getInt("settings_version")).buildFromJson(this.currentTimeProvider, jSONObject);
}
private static SettingsJsonTransform getJsonTransformForVersion(int i) {
if (i == 3) {
return new SettingsV3JsonTransform();
}
return new DefaultSettingsJsonTransform();
}
}