Skip to content

Commit

Permalink
style: remove unnecessary args parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
wzieba committed Jan 30, 2024
1 parent 5e20b3c commit 0dc6cc5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions example/src/main/java/com/example/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public void trackReset(View view) {
private boolean engagementIsActive() {
return (boolean) invokePrivateMethod("engagementIsActive");
}

@Nullable
private Double getEngagementInterval() {
return (Double) invokePrivateMethod("getEngagementInterval");
Expand All @@ -164,11 +165,11 @@ private boolean flushTimerIsActive() {
return (boolean) invokePrivateMethod("flushTimerIsActive");
}

private Object invokePrivateMethod(String methodName, Object... args) {
private Object invokePrivateMethod(String methodName) {
try {
Method method = ParselyTrackerInternal.class.getDeclaredMethod(methodName);
method.setAccessible(true);
return method.invoke(parselyTracker, args);
return method.invoke(parselyTracker);
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 0dc6cc5

Please sign in to comment.