forked from organicmaps/organicmaps-tmp
[AND] Don't invoke trackers if has no GP.
This commit is contained in:
parent
e1f3b5289a
commit
a3a1086fb7
1 changed files with 12 additions and 2 deletions
|
@ -318,20 +318,31 @@ public class MWMApplication extends android.app.Application implements MapStorag
|
|||
{
|
||||
FbUtil.activate(context);
|
||||
|
||||
trackInstallUpdate();
|
||||
}
|
||||
|
||||
private void trackInstallUpdate()
|
||||
{
|
||||
//{@ TRACKERS
|
||||
final boolean DEBUG = false;
|
||||
final Logger logger = DEBUG ? SimpleLogger.get("MAT") : StubLogger.get();
|
||||
|
||||
if (!Utils.hasAnyGoogleStoreInstalled(this))
|
||||
{
|
||||
logger.d("SKIPPING TRACKERS, DOES NOT HAVE GP");
|
||||
return;
|
||||
}
|
||||
|
||||
final long DELTA = 60*1000;
|
||||
final File mwmDir = new File(getDataStoragePath());
|
||||
|
||||
final boolean isNewUser = mwmDir.exists()
|
||||
? (System.currentTimeMillis() - mwmDir.lastModified()) < DELTA
|
||||
? (System.currentTimeMillis() - mwmDir.lastModified()) < DELTA
|
||||
: true;
|
||||
|
||||
final String advId = getString(R.string.advertiser_id);
|
||||
final String convKey = getString(R.string.conversion_key);
|
||||
|
||||
final boolean doTrack = !"FALSE".equalsIgnoreCase(advId);
|
||||
if (doTrack)
|
||||
{
|
||||
|
@ -355,6 +366,5 @@ public class MWMApplication extends android.app.Application implements MapStorag
|
|||
}
|
||||
}
|
||||
//{@ trackers
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue