Make fields private in WebServerHelper

This commit is contained in:
Adeel Zafar 2019-08-15 16:36:11 +05:00
parent a8230321b6
commit 0f0d8cb721

View File

@ -20,11 +20,11 @@ import org.kiwix.kiwixlib.JNIKiwixServer;
*/ */
public class WebServerHelper { public class WebServerHelper {
Context context; private Context context;
public static boolean isServerStarted; public static boolean isServerStarted;
static int port; private static int port;
JNIKiwixLibrary kiwixLibrary = new JNIKiwixLibrary(); private JNIKiwixLibrary kiwixLibrary = new JNIKiwixLibrary();
JNIKiwixServer kiwixServer = new JNIKiwixServer(kiwixLibrary); private JNIKiwixServer kiwixServer = new JNIKiwixServer(kiwixLibrary);
private static final String TAG = "WebServerHelper"; private static final String TAG = "WebServerHelper";
public WebServerHelper(@NonNull Context context) { public WebServerHelper(@NonNull Context context) {
@ -58,7 +58,7 @@ public class WebServerHelper {
return false; return false;
} }
boolean startAndroidWebServer(ArrayList<String> selectedBooksPath) { private boolean startAndroidWebServer(ArrayList<String> selectedBooksPath) {
if (!isServerStarted) { if (!isServerStarted) {
port = 8080; port = 8080;
//Call to start server //Call to start server
@ -78,7 +78,7 @@ public class WebServerHelper {
} }
// get Ip address of the device's wireless access point i.e. wifi hotspot OR wifi network // get Ip address of the device's wireless access point i.e. wifi hotspot OR wifi network
static String getIpAddress() { private static String getIpAddress() {
String ip = ""; String ip = "";
try { try {
Enumeration<NetworkInterface> enumNetworkInterfaces = NetworkInterface Enumeration<NetworkInterface> enumNetworkInterfaces = NetworkInterface