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