use of com.google.firebase.crashlytics.internal.common.CurrentTimeProvider in project firebase-android-sdk by firebase.
the class SettingsController method create.
public static SettingsController create(Context context, String googleAppId, IdManager idManager, HttpRequestFactory httpRequestFactory, String versionCode, String versionName, FileStore fileStore, DataCollectionArbiter dataCollectionArbiter) {
final String installerPackageName = idManager.getInstallerPackageName();
final CurrentTimeProvider currentTimeProvider = new SystemCurrentTimeProvider();
final SettingsJsonParser settingsJsonParser = new SettingsJsonParser(currentTimeProvider);
final CachedSettingsIo cachedSettingsIo = new CachedSettingsIo(fileStore);
final String settingsUrl = String.format(Locale.US, SETTINGS_URL_FORMAT, googleAppId);
final SettingsSpiCall settingsSpiCall = new DefaultSettingsSpiCall(settingsUrl, httpRequestFactory);
final String deviceModel = idManager.getModelName();
final String osBuildVersion = idManager.getOsBuildVersionString();
final String osDisplayVersion = idManager.getOsDisplayVersionString();
final String instanceId = CommonUtils.createInstanceIdFrom(CommonUtils.getMappingFileId(context), googleAppId, versionName, versionCode);
final int deliveryMechanismId = DeliveryMechanism.determineFrom(installerPackageName).getId();
final SettingsRequest settingsRequest = new SettingsRequest(googleAppId, deviceModel, osBuildVersion, osDisplayVersion, idManager, instanceId, versionName, versionCode, deliveryMechanismId);
return new SettingsController(context, settingsRequest, currentTimeProvider, settingsJsonParser, cachedSettingsIo, settingsSpiCall, dataCollectionArbiter);
}
use of com.google.firebase.crashlytics.internal.common.CurrentTimeProvider in project GreenHouse by utsanjan.
the class SettingsController method create.
public static SettingsController create(Context context, String googleAppId, IdManager idManager, HttpRequestFactory httpRequestFactory, String versionCode, String versionName, String urlEndpoint, DataCollectionArbiter dataCollectionArbiter) {
String installerPackageName = idManager.getInstallerPackageName();
CurrentTimeProvider currentTimeProvider = new SystemCurrentTimeProvider();
SettingsJsonParser settingsJsonParser = new SettingsJsonParser(currentTimeProvider);
CachedSettingsIo cachedSettingsIo = new CachedSettingsIo(context);
String settingsUrl = String.format(Locale.US, SETTINGS_URL_FORMAT, googleAppId);
SettingsSpiCall settingsSpiCall = new DefaultSettingsSpiCall(urlEndpoint, settingsUrl, httpRequestFactory);
String deviceModel = idManager.getModelName();
String osBuildVersion = idManager.getOsBuildVersionString();
String osDisplayVersion = idManager.getOsDisplayVersionString();
String instanceId = CommonUtils.createInstanceIdFrom(CommonUtils.getMappingFileId(context), googleAppId, versionName, versionCode);
int deliveryMechanismId = DeliveryMechanism.determineFrom(installerPackageName).getId();
SettingsRequest settingsRequest = new SettingsRequest(googleAppId, deviceModel, osBuildVersion, osDisplayVersion, idManager, instanceId, versionName, versionCode, deliveryMechanismId);
return new SettingsController(context, settingsRequest, currentTimeProvider, settingsJsonParser, cachedSettingsIo, settingsSpiCall, dataCollectionArbiter);
}
Aggregations