Skip to content

Commit 4a79559

Browse files
authored
change names to snake_case (#272)
1 parent ff01d22 commit 4a79559

18 files changed

+59
-59
lines changed

AndroidSDKCore/src/main/java/com/leanplum/ActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ public void runActionNamed(String name) {
369369
createActionContextForMessageId(messageAction.toString(), args, messageId, name, false);
370370
}
371371
}
372-
Leanplum.countAggregator().incrementCount("runActionNamed");
372+
Leanplum.countAggregator().incrementCount("run_action_named");
373373
}
374374

375375
/**
@@ -527,7 +527,7 @@ public void runTrackedActionNamed(String name) {
527527
} catch (Throwable t) {
528528
Util.handleException(t);
529529
}
530-
Leanplum.countAggregator().incrementCount("runTrackedActionNamed");
530+
Leanplum.countAggregator().incrementCount("run_tracked_action_named");
531531
}
532532

533533
/**

AndroidSDKCore/src/main/java/com/leanplum/Leanplum.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public static void trackAllAppScreens() {
266266
*/
267267
public static void setVariantDebugInfoEnabled(boolean variantDebugInfoEnabled) {
268268
LeanplumInternal.setIsVariantDebugInfoEnabled(variantDebugInfoEnabled);
269-
countAggregator.incrementCount("setVariantDebugInfoEnabled");
269+
countAggregator.incrementCount("set_variant_debug_info_enabled");
270270
}
271271

272272
/**
@@ -365,7 +365,7 @@ public static void syncResources() {
365365
} catch (Throwable t) {
366366
Util.handleException(t);
367367
}
368-
countAggregator.incrementCount("syncResources");
368+
countAggregator.incrementCount("sync_resources");
369369
}
370370

371371
/**
@@ -381,7 +381,7 @@ public static void syncResourcesAsync() {
381381
} catch (Throwable t) {
382382
Util.handleException(t);
383383
}
384-
countAggregator.incrementCount("syncResources");
384+
countAggregator.incrementCount("sync_resources");
385385
}
386386

387387
/**
@@ -403,7 +403,7 @@ public static void syncResources(
403403
} catch (Throwable t) {
404404
Util.handleException(t);
405405
}
406-
countAggregator.incrementCount("syncResourcePaths");
406+
countAggregator.incrementCount("sync_resource_paths");
407407
}
408408

409409
/**
@@ -425,7 +425,7 @@ public static void syncResourcesAsync(
425425
} catch (Throwable t) {
426426
Util.handleException(t);
427427
}
428-
countAggregator.incrementCount("syncResourcePaths");
428+
countAggregator.incrementCount("sync_resource_paths");
429429
}
430430

431431
/**
@@ -600,7 +600,7 @@ protected Void doInBackground(Void... params) {
600600
} catch (Throwable t) {
601601
Util.handleException(t);
602602
}
603-
countAggregator.incrementCount("start");
603+
countAggregator.incrementCount("start_with_user_id");
604604
}
605605

606606
/**
@@ -768,7 +768,7 @@ private static void handleStartResponse(final JSONObject response) {
768768
@Override
769769
protected Void doInBackground(Void... params) {
770770
boolean success = Request.isResponseSuccess(response);
771-
Leanplum.countAggregator().incrementCount("onStartResponse");
771+
Leanplum.countAggregator().incrementCount("on_start_response");
772772
if (!success) {
773773
try {
774774
LeanplumInternal.setHasStarted(true);
@@ -1405,7 +1405,7 @@ private static void defineAction(String name, int kind, ActionArgs args,
14051405
} catch (Throwable t) {
14061406
Util.handleException(t);
14071407
}
1408-
Leanplum.countAggregator().incrementCount("defineAction");
1408+
Leanplum.countAggregator().incrementCount("define_action");
14091409
}
14101410

14111411
/**
@@ -1836,7 +1836,7 @@ public void run() {
18361836
} catch (Throwable t) {
18371837
Util.handleException(t);
18381838
}
1839-
countAggregator.incrementCount("advanceTo");
1839+
countAggregator.incrementCount("advance_to");
18401840
}
18411841

18421842
/**
@@ -2039,7 +2039,7 @@ public void error(Exception e) {
20392039
} catch (Throwable t) {
20402040
Util.handleException(t);
20412041
}
2042-
countAggregator.incrementCount("forceContentUpdate");
2042+
countAggregator.incrementCount("force_content_update");
20432043
}
20442044

20452045
/**
@@ -2192,7 +2192,7 @@ private static void parseVariantDebugInfo(JSONObject response) {
21922192
*/
21932193
public static void clearUserContent() {
21942194
VarCache.clearUserContent();
2195-
countAggregator.incrementCount("clearUserContent");
2195+
countAggregator.incrementCount("clear_user_content");
21962196
}
21972197

21982198
@VisibleForTesting

AndroidSDKCore/src/main/java/com/leanplum/LeanplumInbox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ private List<LeanplumInboxMessage> allMessages(List<LeanplumInboxMessage> messag
435435
} catch (Throwable t) {
436436
Util.handleException(t);
437437
}
438-
Leanplum.countAggregator().incrementCount("allMessages");
438+
Leanplum.countAggregator().incrementCount("all_messages_inbox");
439439
return messages;
440440
}
441441

AndroidSDKCore/src/main/java/com/leanplum/callbacks/RegisterDeviceCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void run() {
4747

4848
public void setResponseHandler(EmailCallback callback) {
4949
this.callback = callback;
50-
Leanplum.countAggregator().incrementCount("initWithCallback");
50+
Leanplum.countAggregator().incrementCount("init_with_callback");
5151
}
5252

5353
public void run() { this.onResponse(callback);

AndroidSDKCore/src/main/java/com/leanplum/internal/ActionArg.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static <T> ActionArg<T> argNamed(String name, T defaultValue, String kin
4747
arg.name = name;
4848
arg.kind = kind;
4949
arg.defaultValue = defaultValue;
50-
Leanplum.countAggregator().incrementCount("argNamed");
50+
Leanplum.countAggregator().incrementCount("arg_named");
5151
return arg;
5252
}
5353

AndroidSDKCore/src/main/java/com/leanplum/internal/ActionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ public void recordMessageTrigger(String messageId) {
450450
int occurrences = getMessageTriggerOccurrences(messageId);
451451
occurrences++;
452452
saveMessageTriggerOccurrences(occurrences, messageId);
453-
Leanplum.countAggregator().incrementCount("recordMessageTrigger");
453+
Leanplum.countAggregator().incrementCount("record_message_trigger");
454454
}
455455

456456
/**

AndroidSDKCore/src/main/java/com/leanplum/internal/FeatureFlagManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void setEnabledFeatureFlags(Set<String> enabledFeatureFlags) {
2222
}
2323

2424
public Boolean isFeatureFlagEnabled(String featureFlagName) {
25-
Leanplum.countAggregator().incrementCount("isFeatureFlagEnabled");
25+
Leanplum.countAggregator().incrementCount("is_feature_flag_enabled");
2626
return this.enabledFeatureFlags.contains(featureFlagName);
2727
}
2828
}

AndroidSDKCore/src/main/java/com/leanplum/internal/FileManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public void error(Exception e) {
130130
}
131131
}
132132
}
133-
Leanplum.countAggregator().incrementCount("maybeDownloadFile");
133+
Leanplum.countAggregator().incrementCount("maybe_download_file");
134134
return DownloadFileResult.NONE;
135135
}
136136

AndroidSDKCore/src/main/java/com/leanplum/internal/LeanplumEventCallbackManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void addCallbacks(Request request, Request.ResponseCallback responseCallback,
5858
}
5959

6060
eventCallbacks.put(request, new LeanplumEventCallbacks(responseCallback, errorCallback));
61-
Leanplum.countAggregator().incrementCount("addEventCallbackAt");
61+
Leanplum.countAggregator().incrementCount("add_event_callback_at");
6262
}
6363

6464
/**
@@ -98,7 +98,7 @@ protected Void doInBackground(Void... params) {
9898
iterator.remove();
9999
}
100100
}
101-
Leanplum.countAggregator().incrementCount("invokeErrorCallbacksOnResponses");
101+
Leanplum.countAggregator().incrementCount("invoke_error_callbacks_on_responses");
102102
}
103103

104104
/**
@@ -140,7 +140,7 @@ protected Void doInBackground(Void... params) {
140140
iterator.remove();
141141
}
142142
}
143-
Leanplum.countAggregator().incrementCount("invokeSuccessCallbacksOnResponses");
143+
Leanplum.countAggregator().incrementCount("invoke_success_callbacks_on_responses");
144144
}
145145

146146
private static class LeanplumEventCallbacks {

AndroidSDKCore/src/main/java/com/leanplum/internal/LeanplumEventDataManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static void insertEvent(String event) {
9999
handleSQLiteError("Unable to insert event to database.", t);
100100
}
101101
contentValues.clear();
102-
Leanplum.countAggregator().incrementCount("addEvent");
102+
Leanplum.countAggregator().incrementCount("add_event");
103103
}
104104

105105
/**
@@ -130,7 +130,7 @@ static List<Map<String, Object>> getEvents(int count) {
130130
cursor.close();
131131
}
132132
}
133-
Leanplum.countAggregator().incrementCount("eventsWithLimit");
133+
Leanplum.countAggregator().incrementCount("events_with_limit");
134134
return events;
135135
}
136136

@@ -150,7 +150,7 @@ static void deleteEvents(int count) {
150150
} catch (Throwable t) {
151151
handleSQLiteError("Unable to delete events from the table.", t);
152152
}
153-
Leanplum.countAggregator().incrementCount("deleteEventsWithLimit");
153+
Leanplum.countAggregator().incrementCount("delete_events_with_limit");
154154
}
155155

156156
/**

0 commit comments

Comments
 (0)