From 228b8aceb5ceb3c2d7916b31c603ae1ba8eb8902 Mon Sep 17 00:00:00 2001 From: Adeel Zafar Date: Thu, 15 Aug 2019 16:47:27 +0500 Subject: [PATCH] Reformat WifiHotspotManager --- .../wifi_hotspot/WifiHotspotManager.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/org/kiwix/kiwixmobile/wifi_hotspot/WifiHotspotManager.java b/app/src/main/java/org/kiwix/kiwixmobile/wifi_hotspot/WifiHotspotManager.java index fafca9a7c..e17a22f00 100644 --- a/app/src/main/java/org/kiwix/kiwixmobile/wifi_hotspot/WifiHotspotManager.java +++ b/app/src/main/java/org/kiwix/kiwixmobile/wifi_hotspot/WifiHotspotManager.java @@ -32,42 +32,42 @@ public class WifiHotspotManager { //Workaround to turn on hotspot for Oreo versions @RequiresApi(api = Build.VERSION_CODES.O) public void turnOnHotspot(@NonNull ServerStateListener serverStateListener) { - wifiManager.startLocalOnlyHotspot(new WifiManager.LocalOnlyHotspotCallback() { + wifiManager.startLocalOnlyHotspot(new WifiManager.LocalOnlyHotspotCallback() { - @Override - public void onStarted(WifiManager.LocalOnlyHotspotReservation reservation) { - super.onStarted(reservation); - hotspotReservation = reservation; - currentConfig = hotspotReservation.getWifiConfiguration(); + @Override + public void onStarted(WifiManager.LocalOnlyHotspotReservation reservation) { + super.onStarted(reservation); + hotspotReservation = reservation; + currentConfig = hotspotReservation.getWifiConfiguration(); - Log.v(TAG, "THE PASSWORD IS: " - + currentConfig.preSharedKey - + " \n SSID is : " - + currentConfig.SSID); + Log.v(TAG, "THE PASSWORD IS: " + + currentConfig.preSharedKey + + " \n SSID is : " + + currentConfig.SSID); - serverStateListener.hotspotTurnedOn(currentConfig); + serverStateListener.hotspotTurnedOn(currentConfig); - isHotspotEnabled = true; + isHotspotEnabled = true; - Log.v(TAG, "Is hotspot enabled? " + isHotspotEnabled); - } + Log.v(TAG, "Is hotspot enabled? " + isHotspotEnabled); + } - @Override - public void onStopped() { - super.onStopped(); - Log.v(TAG, "Local Hotspot Stopped"); - serverStateListener.serverStopped(); - } + @Override + public void onStopped() { + super.onStopped(); + Log.v(TAG, "Local Hotspot Stopped"); + serverStateListener.serverStopped(); + } - @Override - public void onFailed(int reason) { - super.onFailed(reason); - Log.v(TAG, "Local Hotspot failed to start"); - serverStateListener.hotspotFailed(); - isHotspotEnabled = false; - Log.v(TAG, "Is hotspot enabled? " + isHotspotEnabled); - } - }, new Handler()); + @Override + public void onFailed(int reason) { + super.onFailed(reason); + Log.v(TAG, "Local Hotspot failed to start"); + serverStateListener.hotspotFailed(); + isHotspotEnabled = false; + Log.v(TAG, "Is hotspot enabled? " + isHotspotEnabled); + } + }, new Handler()); } //Workaround to turn off hotspot for Oreo versions