prevent crash when starting swap on devices without Bluetooth/WiFi
This was introduced in f90b030e76ddb03e00bc0d46977c01c1bae3936d
This commit is contained in:
		
							parent
							
								
									c42d7164cf
								
							
						
					
					
						commit
						21e3124b5f
					
				@ -537,11 +537,11 @@ public class SwapService extends Service {
 | 
			
		||||
        Preferences.get().unregisterLocalRepoHttpsListeners(httpsEnabledListener);
 | 
			
		||||
        LocalBroadcastManager.getInstance(this).unregisterReceiver(onWifiChange);
 | 
			
		||||
 | 
			
		||||
        if (!SwapService.wasBluetoothEnabledBeforeSwap()) {
 | 
			
		||||
        if (bluetoothAdapter != null && !wasBluetoothEnabledBeforeSwap()) {
 | 
			
		||||
            bluetoothAdapter.disable();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!SwapService.wasWifiEnabledBeforeSwap()) {
 | 
			
		||||
        if (wifiManager != null && !wasWifiEnabledBeforeSwap()) {
 | 
			
		||||
            wifiManager.setWifiEnabled(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user