forked from organicmaps/organicmaps
[android] Added EventLogger interface injection to Statistics class, removed deprecated calls from Activity delegate, replaced by event logger calls
This commit is contained in:
parent
8e66aa3365
commit
eb1e05e83a
2 changed files with 12 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue