replace deprecated Firebase constant

This commit is contained in:
Milos Kozak 2020-04-21 11:09:28 +02:00
parent 8cc51abae9
commit a3322dec1e
3 changed files with 5 additions and 5 deletions

View file

@ -86,10 +86,10 @@ class ProfileFunctionImplementation @Inject constructor(
}
if (activeTreatments.profileSwitchesFromHistory.size() > 0) {
val bundle = Bundle()
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "CatchedError")
bundle.putString(FirebaseAnalytics.Param.ITEM_LIST_ID, "CatchedError")
bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, BuildConfig.BUILDVERSION)
bundle.putString(FirebaseAnalytics.Param.START_DATE, time.toString())
bundle.putString(FirebaseAnalytics.Param.VALUE, activeTreatments.profileSwitchesFromHistory.toString())
bundle.putString(FirebaseAnalytics.Param.ITEM_LIST_NAME, activeTreatments.profileSwitchesFromHistory.toString())
fabricPrivacy.logCustom(bundle)
}
aapsLogger.error("getProfile at the end: returning null")

View file

@ -652,8 +652,8 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
context.startActivity(i);
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "TreatmentClash");
bundle.putString(FirebaseAnalytics.Param.VALUE, status);
bundle.putString(FirebaseAnalytics.Param.ITEM_LIST_ID, "TreatmentClash");
bundle.putString(FirebaseAnalytics.Param.ITEM_LIST_NAME, status);
fabricPrivacy.logCustom(bundle);
}

View file

@ -48,7 +48,7 @@ class FabricPrivacy @Inject constructor(
fun logCustom(event: Bundle) {
try {
if (fabricEnabled()) {
mainApp.firebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, event)
mainApp.firebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM, event)
} else {
aapsLogger.debug(LTag.CORE, "Ignoring recently opted-out event: $event")
}