Skip to content

Commit 3563478

Browse files
committed
chore: remove redundant arguments
1 parent 5e32ce4 commit 3563478

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test-app/app/src/main/java/com/tns/RuntimeHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static Runtime initRuntime(Context context) {
148148
StaticConfiguration config = new StaticConfiguration(logger, appName, nativeLibDir, rootDir,
149149
appDir, classLoader, dexDir, dexThumb, appConfig, isDebuggable);
150150

151-
runtime = Runtime.initializeRuntimeWithConfiguration(config, appDir.toString());
151+
runtime = Runtime.initializeRuntimeWithConfiguration(config);
152152
if (isDebuggable) {
153153
try {
154154
v8Inspector = new AndroidJsV8Inspector(context.getFilesDir().getAbsolutePath(), context.getPackageName());

test-app/runtime/src/main/java/com/tns/Runtime.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public void run() {
472472
staticConfiguration.logger.write("Worker (id=" + workerId + ")'s Runtime is initializing!");
473473
}
474474

475-
Runtime runtime = initRuntime(dynamicConfiguration, appDir);
475+
Runtime runtime = initRuntime(dynamicConfiguration);
476476

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

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

613613
return runtime;
614614
}

0 commit comments

Comments
 (0)