summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/wifi/WifiDialog.java
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2013-03-22 17:17:33 +0000
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-04-13 05:51:02 -0700
commit8182fd428aa91947c4202b260c5cbc018dcde0aa (patch)
tree972a39beeb4efa812dc6bdad074c85933908770b /src/com/android/settings/wifi/WifiDialog.java
parent2a2057506bc7096eafdae070c3d800538439849d (diff)
downloadpackages_apps_settings-8182fd428aa91947c4202b260c5cbc018dcde0aa.zip
packages_apps_settings-8182fd428aa91947c4202b260c5cbc018dcde0aa.tar.gz
packages_apps_settings-8182fd428aa91947c4202b260c5cbc018dcde0aa.tar.bz2
Wifi: Add frequency selection for new IBSS
Allow users to select a frequency for newly created Ad-Hoc (IBSS) networks, and show the frequency for existing IBSS. Change-Id: Icaa09c9386967fdf0a88865ff2e64cc9b219da1f
Diffstat (limited to 'src/com/android/settings/wifi/WifiDialog.java')
-rw-r--r--src/com/android/settings/wifi/WifiDialog.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/settings/wifi/WifiDialog.java b/src/com/android/settings/wifi/WifiDialog.java
index a46755b..f5a99c5 100644
--- a/src/com/android/settings/wifi/WifiDialog.java
+++ b/src/com/android/settings/wifi/WifiDialog.java
@@ -18,12 +18,15 @@ package com.android.settings.wifi;
import com.android.settings.R;
+import java.util.List;
+
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
+import android.net.wifi.WifiChannel;
class WifiDialog extends AlertDialog implements WifiConfigUiBase {
static final int BUTTON_SUBMIT = DialogInterface.BUTTON_POSITIVE;
@@ -31,6 +34,7 @@ class WifiDialog extends AlertDialog implements WifiConfigUiBase {
private final boolean mEdit;
private final boolean mIbssSupported;
+ private List<WifiChannel> mSupportedChannels;
private final DialogInterface.OnClickListener mListener;
private final AccessPoint mAccessPoint;
@@ -38,10 +42,11 @@ class WifiDialog extends AlertDialog implements WifiConfigUiBase {
private WifiConfigController mController;
public WifiDialog(Context context, DialogInterface.OnClickListener listener,
- AccessPoint accessPoint, boolean edit, boolean ibssSupported) {
+ AccessPoint accessPoint, boolean edit, boolean ibssSupported, List<WifiChannel> chan) {
super(context, R.style.Theme_WifiDialog);
mEdit = edit;
mIbssSupported = ibssSupported;
+ mSupportedChannels = chan;
mListener = listener;
mAccessPoint = accessPoint;
}
@@ -56,7 +61,7 @@ class WifiDialog extends AlertDialog implements WifiConfigUiBase {
mView = getLayoutInflater().inflate(R.layout.wifi_dialog, null);
setView(mView);
setInverseBackgroundForced(true);
- mController = new WifiConfigController(this, mView, mAccessPoint, mEdit, mIbssSupported);
+ mController = new WifiConfigController(this, mView, mAccessPoint, mEdit, mIbssSupported, mSupportedChannels);
super.onCreate(savedInstanceState);
/* During creation, the submit button can be unavailable to determine
* visibility. Right after creation, update button visibility */