Skip to content

Commit f320218

Browse files
markvdouwMansi-mParticle
authored andcommitted
Removing testing logs
1 parent d3dc925 commit f320218

4 files changed

Lines changed: 3 additions & 16 deletions

File tree

android-core/src/main/java/com/mparticle/identity/IdentityApi.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ public MParticleTask<IdentityApiResult> login(@Nullable final IdentityApiRequest
213213
public IdentityHttpResponse request(IdentityApiRequest request) throws Exception {
214214
IdentityHttpResponse response = getApiClient().login(request);
215215
timeoutSeconds = response.getTimeout();
216-
Logger.debug("TIMEOUT - IDENTITY TIMEOUT SET (SEC): "+ timeoutSeconds);
217216
return response;
218217
}
219218

@@ -239,7 +238,6 @@ public MParticleTask<IdentityApiResult> identify(@Nullable final IdentityApiRequ
239238
public IdentityHttpResponse request(IdentityApiRequest request) throws Exception {
240239
IdentityHttpResponse response = getApiClient().identify(request);
241240
timeoutSeconds = response.getTimeout();
242-
Logger.debug("TIMEOUT - IDENTITY TIMEOUT SET (SEC): "+ timeoutSeconds);
243241
return response;
244242
}
245243

@@ -367,22 +365,17 @@ private void reset() {
367365

368366
private boolean shouldMakeRequest(IdentityApiRequest identityRequest, boolean acceptCachedResponse, long lastIdentityCall) {
369367
if (!acceptCachedResponse) {
370-
Logger.debug("TIMEOUT - SHOULD MAKE REQUEST: TRUE");
371368
return true;
372369
}
373-
boolean hasTimedOut = lastIdentityCall==-1L || (lastIdentityCall + (timeoutSeconds * 1000) > System.currentTimeMillis()) ;
374-
Logger.debug("TIMEOUT - REQUEST TIMED OUT: " + hasTimedOut);
370+
boolean hasTimedOut = lastIdentityCall == -1L || (lastIdentityCall + (timeoutSeconds * 1000) > System.currentTimeMillis());
375371
if (identityRequest != null && identityRequest.mpid != null) {
376372
MParticleUser user = getUser(identityRequest.mpid);
377373
if (hasTimedOut || isRequestDifferent(user, identityRequest)) {
378-
Logger.debug("TIMEOUT - SHOULD MAKE REQUEST: TRUE");
379374
return true;
380375
} else {
381-
Logger.debug("TIMEOUT - SHOULD MAKE REQUEST: FALSE");
382376
return false;
383377
}
384378
} else {
385-
Logger.debug("TIMEOUT - SHOULD MAKE REQUEST: TRUE");
386379
return true;
387380
}
388381
}
@@ -396,13 +389,9 @@ private boolean mpIdNotKnown(MParticleUser user) {
396389
}
397390

398391
private boolean areIdentitiesDifferent(MParticleUser user, IdentityApiRequest identityApiRequest) {
399-
//TODO params such as device id, android id, and google id should be persisted in user or userIdentity to be compared.
400392
if (user != null) {
401393
Map<MParticle.IdentityType, String> userIdentities = user.getUserIdentities() != null ? user.getUserIdentities() : new HashMap<>();
402394
Map<MParticle.IdentityType, String> requestUserIdentities = identityApiRequest.getUserIdentities() != null ? identityApiRequest.getUserIdentities() : new HashMap<>();
403-
Logger.debug("TIMEOUT - USER IDENTITIES: " +userIdentities);
404-
Logger.debug("TIMEOUT - REQUEST USER IDENTITIES: " +requestUserIdentities);
405-
Logger.debug("TIMEOUT - RESULT DIFFERENT: " + !userIdentities.equals(requestUserIdentities));
406395
return !userIdentities.equals(requestUserIdentities);
407396
} else {
408397
return true;
@@ -423,7 +412,7 @@ private BaseIdentityTask makeIdentityRequest(IdentityApiRequest request, final I
423412
if (!shouldMakeRequest(identityApiRequest, acceptCachedResponse, lastIdentityCallTime)) {
424413
//Set both current and prev user as the current one, no request was done.
425414
task.setSuccessful(new IdentityApiResult(getUser(identityApiRequest.mpid), getCurrentUser()));
426-
Logger.debug("Identity -Returning current user from cache");
415+
Logger.debug("Identity - Returning current user from cache");
427416
return task;
428417
}
429418
ConfigManager.setIdentityRequestInProgress(true);

android-core/src/main/java/com/mparticle/identity/IdentityHttpResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public long getMpId() {
9595
}
9696

9797
public long getTimeout() {
98-
return 30L;
98+
return timeout;
9999
}
100100

101101
@Nullable

android-core/src/main/java/com/mparticle/identity/MParticleIdentityClientImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public class MParticleIdentityClientImpl extends MParticleBaseClientImpl impleme
3131
private Context mContext;
3232
private ConfigManager mConfigManager;
3333

34-
static final long IDENTITY_TIMEOUT = 24 * 60 * 60 * 1000L;
3534
static final String LOGIN_PATH = "login";
3635
static final String LOGOUT_PATH = "logout";
3736
static final String IDENTIFY_PATH = "identify";

android-core/src/main/java/com/mparticle/internal/ConfigManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,6 @@ public void resetIdentityTypeCall() {
12631263
}
12641264

12651265
public void setLastIdentityTypeCall(String call) {
1266-
Logger.debug("TIMEOUT - SET LAST IDENTITY TIME CALL FOR " + call + " : " + System.currentTimeMillis());
12671266
sPreferences.edit().putLong(call, System.currentTimeMillis()).apply();
12681267
}
12691268

0 commit comments

Comments
 (0)