NTP-58594 | Naman Khurmi | App update analytic crash fix. (#16048)
This commit is contained in:
@@ -61,10 +61,7 @@ class InAppUpdateHelper(
|
||||
InstallStatus.DOWNLOADING -> {
|
||||
inAppUpdateBridge.setAppUpdateState(AppUpdateState.UPDATE_DOWNLOADING)
|
||||
naviAnalyticsInAppUpdate.onDownloadProgress(
|
||||
bytesDownloaded = state.bytesDownloaded(),
|
||||
totalBytesToDownload = state.totalBytesToDownload(),
|
||||
downloadProgress =
|
||||
(state.bytesDownloaded() * 100 / state.totalBytesToDownload()),
|
||||
appUpdateInfo?.availableVersionCode()
|
||||
)
|
||||
}
|
||||
InstallStatus.INSTALLING -> {
|
||||
|
||||
@@ -343,18 +343,10 @@ class CommonNaviAnalytics private constructor() {
|
||||
)
|
||||
}
|
||||
|
||||
fun onDownloadProgress(
|
||||
bytesDownloaded: Long,
|
||||
totalBytesToDownload: Long,
|
||||
downloadProgress: Long,
|
||||
) {
|
||||
fun onDownloadProgress(versionCode: Int?) {
|
||||
NaviTrackEvent.trackEvent(
|
||||
"dev_in_app_update_download_progress",
|
||||
mapOf(
|
||||
"bytes_downloaded" to bytesDownloaded.toString(),
|
||||
"total_bytes" to totalBytesToDownload.toString(),
|
||||
"download_progress" to downloadProgress.toString(),
|
||||
),
|
||||
mapOf("version_code" to (versionCode?.toString() ?: "")),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user