Move some wifi tracking code to SettingsLib
Move tracking of which networks are available/saved and their state over to SettingsLib to share it with Quick Settings. Bug: 19180466 Change-Id: Iaeef06b26da8cb38e1ba09a7d105d04d499dc181
This commit is contained in:
@@ -24,14 +24,13 @@ import android.content.IntentFilter;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.Switch;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.WirelessSettings;
|
||||
import com.android.settings.search.Index;
|
||||
import com.android.settings.widget.SwitchBar;
|
||||
import com.android.settingslib.WirelessUtils;
|
||||
|
||||
/**
|
||||
* BluetoothEnabler is a helper to manage the Bluetooth on/off checkbox
|
||||
@@ -177,7 +176,7 @@ public final class BluetoothEnabler implements SwitchBar.OnSwitchChangeListener
|
||||
public void onSwitchChanged(Switch switchView, boolean isChecked) {
|
||||
// Show toast message if Bluetooth is not allowed in airplane mode
|
||||
if (isChecked &&
|
||||
!WirelessSettings.isRadioAllowed(mContext, Settings.Global.RADIO_BLUETOOTH)) {
|
||||
!WirelessUtils.isRadioAllowed(mContext, Settings.Global.RADIO_BLUETOOTH)) {
|
||||
Toast.makeText(mContext, R.string.wifi_in_airplane_mode, Toast.LENGTH_SHORT).show();
|
||||
// Reset switch to off
|
||||
switchView.setChecked(false);
|
||||
|
Reference in New Issue
Block a user