Skip to content

Commit

Permalink
chore: remove redundant arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
edusperoni committed Feb 26, 2024
1 parent 5e32ce4 commit 3563478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test-app/app/src/main/java/com/tns/RuntimeHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static Runtime initRuntime(Context context) {
StaticConfiguration config = new StaticConfiguration(logger, appName, nativeLibDir, rootDir,
appDir, classLoader, dexDir, dexThumb, appConfig, isDebuggable);

runtime = Runtime.initializeRuntimeWithConfiguration(config, appDir.toString());
runtime = Runtime.initializeRuntimeWithConfiguration(config);
if (isDebuggable) {
try {
v8Inspector = new AndroidJsV8Inspector(context.getFilesDir().getAbsolutePath(), context.getPackageName());
Expand Down
10 changes: 5 additions & 5 deletions test-app/runtime/src/main/java/com/tns/Runtime.java
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public void run() {
staticConfiguration.logger.write("Worker (id=" + workerId + ")'s Runtime is initializing!");
}

Runtime runtime = initRuntime(dynamicConfiguration, appDir);
Runtime runtime = initRuntime(dynamicConfiguration);

if (staticConfiguration.logger.isEnabled()) {
staticConfiguration.logger.write("Worker (id=" + workerId + ")'s Runtime initialized!");
Expand Down Expand Up @@ -577,11 +577,11 @@ else if (msg.arg1 == MessageType.BubbleUpException) {
This method initializes the runtime and should always be called first and through the main thread
in order to set static configuration that all following workers can use
*/
public static Runtime initializeRuntimeWithConfiguration(StaticConfiguration config, String appDir) {
public static Runtime initializeRuntimeWithConfiguration(StaticConfiguration config) {
staticConfiguration = config;
WorkThreadScheduler mainThreadScheduler = new WorkThreadScheduler(new MainThreadHandler(Looper.myLooper()));
DynamicConfiguration dynamicConfiguration = new DynamicConfiguration(0, mainThreadScheduler, null);
Runtime runtime = initRuntime(dynamicConfiguration, appDir);
Runtime runtime = initRuntime(dynamicConfiguration);
return runtime;
}

Expand All @@ -605,10 +605,10 @@ public static void initWorker(String jsFileName, String callingJsDir, int id) {
This method deals with initializing the runtime with given configuration
Does it for both workers and for the main thread
*/
private static Runtime initRuntime(DynamicConfiguration dynamicConfiguration, String appDir) {
private static Runtime initRuntime(DynamicConfiguration dynamicConfiguration) {
Runtime runtime = new Runtime(staticConfiguration, dynamicConfiguration);
runtime.init();
runtime.runScript(new File(appDir, "internal/ts_helpers.js"));
runtime.runScript(new File(staticConfiguration.appDir, "internal/ts_helpers.js"));

return runtime;
}
Expand Down

0 comments on commit 3563478

Please sign in to comment.