Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Donskoy <donskdmitry@mail.ru>2018-09-24 18:31:00 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2018-09-27 15:40:37 +0300
commiteafd554af589cd572f511711caa0ca3b468d4ecf (patch)
treee80eecf6dbc8a7d0b7e19bfb35b9da99f498abe0
parent5bea56808a20daf930741f1289dcf23345460ac6 (diff)
[android] Added EventLogger interface injection to Statistics class, removed deprecated calls from Activity delegate, replaced by event logger calls
-rw-r--r--android/src/com/mapswithme/maps/MwmApplication.java9
-rw-r--r--android/src/com/mapswithme/util/statistics/Statistics.java5
2 files changed, 12 insertions, 2 deletions
diff --git a/android/src/com/mapswithme/maps/MwmApplication.java b/android/src/com/mapswithme/maps/MwmApplication.java
index 1b65acb01d..b491e1628f 100644
--- a/android/src/com/mapswithme/maps/MwmApplication.java
+++ b/android/src/com/mapswithme/maps/MwmApplication.java
@@ -72,6 +72,9 @@ public class MwmApplication extends Application
@SuppressWarnings("NullableProblems")
@NonNull
private ExternalLibrariesMediator mMediator;
+ @SuppressWarnings("NullableProblems")
+ @NonNull
+ private Statistics mStatistics;
@NonNull
public SubwayManager getSubwayManager()
@@ -306,6 +309,12 @@ public class MwmApplication extends Application
return mConnectivityListener;
}
+ @NonNull
+ public Statistics getStatistics()
+ {
+ return mStatistics;
+ }
+
private native void nativeInitPlatform(String apkPath, String storagePath, String privatePath,
String tmpPath, String obbGooglePath, String flavorName,
String buildType, boolean isTablet);
diff --git a/android/src/com/mapswithme/util/statistics/Statistics.java b/android/src/com/mapswithme/util/statistics/Statistics.java
index 98cf05bab7..8894ef1e46 100644
--- a/android/src/com/mapswithme/util/statistics/Statistics.java
+++ b/android/src/com/mapswithme/util/statistics/Statistics.java
@@ -146,7 +146,7 @@ import static com.mapswithme.util.statistics.Statistics.ParamValue.UNKNOWN;
import static com.mapswithme.util.statistics.Statistics.ParamValue.VEHICLE;
import static com.mapswithme.util.statistics.Statistics.ParamValue.VIATOR;
-public enum Statistics
+public final class Statistics
{
INSTANCE;
@@ -492,8 +492,9 @@ public enum Statistics
// avoid their initialization if user has disabled statistics collection.
private final boolean mEnabled;
- Statistics()
+ public Statistics(@NonNull ExternalLibrariesMediator mediator)
{
+ mMediator = mediator;
mEnabled = SharedPropertiesUtils.isStatisticsEnabled();
final Context context = MwmApplication.get();
// At the moment we need special handling for Alohalytics to enable/disable logging of events in core C++ code.