[pref][android] Cleanup class methods

This commit is contained in:
Elliot Hesp 2017-05-25 10:44:51 +01:00
parent f4d9ac291b
commit 44ad37f5cb
1 changed files with 3 additions and 6 deletions

View File

@ -36,21 +36,18 @@ public class RNFirebasePerformance extends ReactContextBaseJavaModule {
@ReactMethod
public void start(String identifier) {
Trace trace = getOrCreateTrace(identifier);
trace.start();
getOrCreateTrace(identifier).start();
}
@ReactMethod
public void stop(String identifier) {
Trace trace = getOrCreateTrace(identifier);
trace.stop();
getOrCreateTrace(identifier).stop();
traces.remove(identifier);
}
@ReactMethod
public void incrementCounter(String identifier, String event) {
Trace trace = getOrCreateTrace(identifier);
trace.incrementCounter(event);
getOrCreateTrace(identifier).incrementCounter(event);
}
private Trace getOrCreateTrace(String identifier) {