mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 04:33:54 -04:00
Remove context from WebServerHelper constructor
This commit is contained in:
parent
0f0d8cb721
commit
f528e9da44
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user