Remove context from WebServerHelper constructor

This commit is contained in:
Adeel Zafar 2019-08-15 16:38:13 +05:00
parent 0f0d8cb721
commit f528e9da44
2 changed files with 3 additions and 5 deletions

View File

@ -1,6 +1,5 @@
package org.kiwix.kiwixmobile.webserver;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -20,15 +19,14 @@ import org.kiwix.kiwixlib.JNIKiwixServer;
*/
public class WebServerHelper {
private Context context;
public static boolean isServerStarted;
private static int port;
private JNIKiwixLibrary kiwixLibrary = new JNIKiwixLibrary();
private JNIKiwixServer kiwixServer = new JNIKiwixServer(kiwixLibrary);
private static final String TAG = "WebServerHelper";
public WebServerHelper(@NonNull Context context) {
this.context = context;
public WebServerHelper() {
}
public boolean startServerHelper(@NonNull ServerStateListener stateListener,

View File

@ -64,7 +64,7 @@ public class HotspotService extends Service {
registerReceiver(stopReceiver, new IntentFilter(ACTION_STOP));
webServerHelper = new WebServerHelper(this);
webServerHelper = new WebServerHelper();
notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
}