From eaf849e625f9adb6ff173900dbc9fe5cba54e8cc Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 17 Oct 2018 15:54:33 +0200 Subject: [PATCH] Fabric: don't report disabled plugins. Effectively reverts 91cbe1dd63af95eb0e25875a440d170aaa515b25. --- .../main/java/info/nightscout/utils/FabricPrivacy.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/info/nightscout/utils/FabricPrivacy.java b/app/src/main/java/info/nightscout/utils/FabricPrivacy.java index 4d62e063ca..572cd4dab4 100644 --- a/app/src/main/java/info/nightscout/utils/FabricPrivacy.java +++ b/app/src/main/java/info/nightscout/utils/FabricPrivacy.java @@ -112,11 +112,11 @@ public class FabricPrivacy { pluginStats.putCustomAttribute("HEAD", BuildConfig.HEAD); pluginStats.putCustomAttribute("language", SP.getString(R.string.key_language,"default")); for (PluginBase plugin : MainApp.getPluginsList()) { - if (!plugin.pluginDescription.alwaysEnabled) { - if (plugin.isEnabled(plugin.getType())) - pluginStats.putCustomAttribute(plugin.getClass().getSimpleName(), "enabled"); - else - pluginStats.putCustomAttribute(plugin.getClass().getSimpleName(), "disabled"); + if (plugin.isEnabled(plugin.getType()) && !plugin.pluginDescription.alwaysEnabled) { + // Fabric allows no more than 20 attributes attached to an event. By reporting disabled plugins as + // well, we would exceed that threshold, so only report what is enabled + // TODO >2.0: consider reworking this to upload an event per enabled plugin instead. + pluginStats.putCustomAttribute(plugin.getClass().getSimpleName(), "enabled"); } }