mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 04:33:54 -04:00
Rename oreoEnabled to isHotspotEnabled
This commit is contained in:
parent
a8b013735e
commit
2604fc9dbd
@ -19,7 +19,7 @@ public class WifiHotspotManager {
|
||||
private WifiManager wifiManager;
|
||||
Context context;
|
||||
WifiManager.LocalOnlyHotspotReservation hotspotReservation;
|
||||
boolean oreoenabled;
|
||||
boolean isHotspotEnabled;
|
||||
WifiConfiguration currentConfig;
|
||||
private static final String TAG = "WifiHotspotManager";
|
||||
|
||||
@ -31,7 +31,7 @@ public class WifiHotspotManager {
|
||||
//Workaround to turn on hotspot for Oreo versions
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
public void turnOnHotspot(ServerStateListener serverStateListener) {
|
||||
if (!oreoenabled) {
|
||||
if (!isHotspotEnabled) {
|
||||
wifiManager.startLocalOnlyHotspot(new WifiManager.LocalOnlyHotspotCallback() {
|
||||
|
||||
@Override
|
||||
@ -47,7 +47,7 @@ public class WifiHotspotManager {
|
||||
|
||||
serverStateListener.hotspotTurnedOn(currentConfig);
|
||||
|
||||
oreoenabled = true;
|
||||
isHotspotEnabled = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,7 +73,7 @@ public class WifiHotspotManager {
|
||||
if (hotspotReservation != null) {
|
||||
hotspotReservation.close();
|
||||
hotspotReservation = null;
|
||||
oreoenabled = false;
|
||||
isHotspotEnabled = false;
|
||||
Log.v(TAG, "Turned off hotspot");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user