TP-71316 | Location manager event fix (#11673)

This commit is contained in:
shreyansu raj
2024-07-04 13:22:09 +05:30
committed by GitHub
parent 69996ae25e
commit 70def773b4
2 changed files with 7 additions and 4 deletions

View File

@@ -310,8 +310,8 @@ class NaviLocationManager(
locationCallback,
Looper.getMainLooper()
)
analyticsTracker.onDeviceSettingSuitableForLocationUpdate()
}
analyticsTracker.onDeviceSettingSuitableForLocationUpdate()
}
fun fetchUserLocationFromLocalStorage(): UserLocation? {
@@ -329,9 +329,9 @@ class NaviLocationManager(
locationSettingsResponseTask?.addOnFailureListener { exception ->
if (exception is ResolvableApiException) {
exception.startResolutionForResult(activity, REQUEST_LOCATION_SETTINGS)
analyticsTracker.onDeviceSettingNotSuitableForLocationUpdate(exception.message)
}
}
analyticsTracker.onDeviceSettingNotSuitableForLocationUpdate()
}
override fun onActivityResumed(activity: Activity) {

View File

@@ -385,8 +385,11 @@ class CommonNaviAnalytics private constructor() {
mapOf(Pair("atTimeStamp", System.currentTimeMillis().toString()))
)
fun onDeviceSettingNotSuitableForLocationUpdate() =
NaviTrackEvent.trackEvent(DEVICE_SETTINGS_NOT_SUITABLE_FOR_LOCATION_UPDATE)
fun onDeviceSettingNotSuitableForLocationUpdate(message: String?) =
NaviTrackEvent.trackEvent(
DEVICE_SETTINGS_NOT_SUITABLE_FOR_LOCATION_UPDATE,
mapOf(Pair("error", message.toString()))
)
fun onDeviceSettingSuitableForLocationUpdate() =
NaviTrackEvent.trackEvent(DEVICE_SETTINGS_SUITABLE_FOR_LOCATION_UPDATE)