From df673328804da94e48124c6c97ce4c85c25c9d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Guid=C3=A9e?= Date: Mon, 17 Feb 2020 20:21:42 +0100 Subject: [PATCH] Fix telemetry --- escher/include/escher/app.h | 3 --- escher/include/escher/telemetry.h | 4 ---- escher/include/escher/view_controller.h | 5 ---- escher/src/view_controller.cpp | 31 ------------------------- ion/src/simulator/android/Makefile | 4 ---- 5 files changed, 47 deletions(-) diff --git a/escher/include/escher/app.h b/escher/include/escher/app.h index 9dbdf7f6c..2c62b575d 100644 --- a/escher/include/escher/app.h +++ b/escher/include/escher/app.h @@ -71,9 +71,6 @@ public: virtual int numberOfTimers() { return 0; } virtual Timer * timerAtIndex(int i) { assert(false); return nullptr; } virtual Poincare::Context * localContext() { return nullptr; } -#if EPSILON_TELEMETRY - virtual const char * telemetryId() const { return nullptr; } -#endif protected: App(Snapshot * snapshot, ViewController * rootViewController, I18n::Message warningMessage = (I18n::Message)0) : Responder(nullptr), diff --git a/escher/include/escher/telemetry.h b/escher/include/escher/telemetry.h index eb06ca3c5..2ebd5fdc7 100644 --- a/escher/include/escher/telemetry.h +++ b/escher/include/escher/telemetry.h @@ -1,10 +1,6 @@ #ifndef ESCHER_TELEMETRY_H #define ESCHER_TELEMETRY_H -#if EPSILON_TELEMETRY -#define TELEMETRY_ID(x) const char * telemetryId() const override { return (x); } -#else #define TELEMETRY_ID(x) -#endif #endif diff --git a/escher/include/escher/view_controller.h b/escher/include/escher/view_controller.h index a7fd6b026..60243a8e0 100644 --- a/escher/include/escher/view_controller.h +++ b/escher/include/escher/view_controller.h @@ -53,12 +53,7 @@ public: virtual void viewDidDisappear() {} virtual DisplayParameter displayParameter() { return DisplayParameter::Default; } protected: -#if EPSILON_TELEMETRY - virtual const char * telemetryId() const { return nullptr; } - void telemetryReportEvent(const char * action, const char * label) const; -#else void telemetryReportEvent(const char * action, const char * label) const {} -#endif }; #endif diff --git a/escher/src/view_controller.cpp b/escher/src/view_controller.cpp index 8144a35b6..01e42b98f 100644 --- a/escher/src/view_controller.cpp +++ b/escher/src/view_controller.cpp @@ -4,37 +4,6 @@ #include void ViewController::viewWillAppear() { -#if EPSILON_TELEMETRY - const char * screenId = telemetryId(); - if (screenId == nullptr) { - return; - } - const char * appId = Container::activeApp()->telemetryId(); - if (appId == nullptr) { - return; - } - - char reportedName[64]; - assert(strlen(appId) + 1 + strlen(screenId) < sizeof(reportedName)); - - reportedName[0] = 0; - strlcat(reportedName, appId, sizeof(reportedName)); - if (strlen(screenId) > 0) { - strlcat(reportedName, ".", sizeof(reportedName)); - strlcat(reportedName, screenId, sizeof(reportedName)); - } - - Ion::Telemetry::reportScreen(reportedName); -#endif } -#if EPSILON_TELEMETRY -void ViewController::telemetryReportEvent(const char * action, const char * label) const { - const char * category = Container::activeApp()->telemetryId(); - assert(category != nullptr); - assert(action != nullptr); - assert(label != nullptr); - Ion::Telemetry::reportEvent(category, action, label); -} -#endif diff --git a/ion/src/simulator/android/Makefile b/ion/src/simulator/android/Makefile index ec4cb714a..3b56131b5 100644 --- a/ion/src/simulator/android/Makefile +++ b/ion/src/simulator/android/Makefile @@ -7,10 +7,6 @@ ion_src += $(addprefix ion/src/simulator/shared/, \ dummy/language.cpp \ ) -ifeq ($(EPSILON_TELEMETRY),1) -ion_src += ion/src/simulator/android/src/cpp/telemetry.cpp -endif - $(call object_for,ion/src/simulator/shared/main.cpp) : SFLAGS += -DEPSILON_SDL_FULLSCREEN=1 LDFLAGS += -ljnigraphics -llog