Commit 489a9d81 authored by Irfan Sheriff's avatar Irfan Sheriff

Rename WpsConfiguration to Wps

For the purpose of exposing the class as a storage for Wps
info with p2p, it is better to just call it Wps

Bug: 5247957
Change-Id: Iaebef958dd8f08fdbeb4b9d7fa5ad5527400710d
parent dff28d52
......@@ -108,6 +108,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framew
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/media/java/android/media/IAudioService.P)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio/)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/nfc/)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/wifi/java)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
......@@ -37,7 +37,7 @@ import android.net.wifi.WifiStateMachine;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiWatchdogStateMachine;
import android.net.wifi.WifiConfiguration.KeyMgmt;
import android.net.wifi.WpsConfiguration;
import android.net.wifi.Wps;
import android.net.wifi.WpsResult;
import android.net.ConnectivityManager;
import android.net.DhcpInfo;
......@@ -286,7 +286,7 @@ public class WifiService extends IWifiManager.Stub {
}
case WifiManager.CMD_START_WPS: {
//replyTo has the original source
mWifiStateMachine.startWps(msg.replyTo, (WpsConfiguration)msg.obj);
mWifiStateMachine.startWps(msg.replyTo, (Wps)msg.obj);
break;
}
case WifiManager.CMD_DISABLE_NETWORK: {
......
......@@ -18,7 +18,7 @@ package android.net.wifi;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WpsConfiguration;
import android.net.wifi.Wps;
import android.net.wifi.WpsResult;
import android.net.wifi.ScanResult;
import android.net.DhcpInfo;
......
......@@ -397,7 +397,7 @@ class WifiConfigStore {
* Start WPS pin method configuration with pin obtained
* from the access point
*/
static WpsResult startWpsWithPinFromAccessPoint(WpsConfiguration config) {
static WpsResult startWpsWithPinFromAccessPoint(Wps config) {
WpsResult result = new WpsResult();
if (WifiNative.startWpsWithPinFromAccessPointCommand(config.BSSID, config.pin)) {
/* WPS leaves all networks disabled */
......@@ -415,7 +415,7 @@ class WifiConfigStore {
* from the device
* @return WpsResult indicating status and pin
*/
static WpsResult startWpsWithPinFromDevice(WpsConfiguration config) {
static WpsResult startWpsWithPinFromDevice(Wps config) {
WpsResult result = new WpsResult();
result.pin = WifiNative.startWpsWithPinFromDeviceCommand(config.BSSID);
/* WPS leaves all networks disabled */
......@@ -432,7 +432,7 @@ class WifiConfigStore {
/**
* Start WPS push button configuration
*/
static WpsResult startWpsPbc(WpsConfiguration config) {
static WpsResult startWpsPbc(Wps config) {
WpsResult result = new WpsResult();
if (WifiNative.startWpsPbcCommand(config.BSSID)) {
/* WPS leaves all networks disabled */
......@@ -594,7 +594,7 @@ class WifiConfigStore {
sendConfiguredNetworksChangedBroadcast();
}
static void updateIpAndProxyFromWpsConfig(int netId, WpsConfiguration wpsConfig) {
static void updateIpAndProxyFromWpsConfig(int netId, Wps wpsConfig) {
synchronized (sConfiguredNetworks) {
WifiConfiguration config = sConfiguredNetworks.get(netId);
if (config != null) {
......
......@@ -1175,7 +1175,7 @@ public class WifiManager {
* @param config WPS configuration
* @hide
*/
public void startWps(WpsConfiguration config) {
public void startWps(Wps config) {
if (config == null) {
return;
}
......
......@@ -261,7 +261,7 @@ public class WifiNative {
public static String p2pConnect(WifiP2pConfig config, boolean joinExistingGroup) {
if (config == null) return null;
List<String> args = new ArrayList<String>();
WpsConfiguration wpsConfig = config.wpsConfig;
Wps wpsConfig = config.wpsConfig;
args.add(config.deviceAddress);
switch (wpsConfig.setup) {
......
......@@ -880,7 +880,7 @@ public class WifiStateMachine extends StateMachine {
sendMessage(message);
}
public void startWps(Messenger replyTo, WpsConfiguration config) {
public void startWps(Messenger replyTo, Wps config) {
Message msg = obtainMessage(CMD_START_WPS, config);
msg.replyTo = replyTo;
sendMessage(msg);
......
......@@ -16,4 +16,4 @@
package android.net.wifi;
parcelable WpsConfiguration;
parcelable Wps;
......@@ -25,10 +25,10 @@ import android.os.Parcel;
import java.util.BitSet;
/**
* A class representing a WPS network configuration
* A class representing Wi-Fi Protected Setup
* @hide
*/
public class WpsConfiguration implements Parcelable {
public class Wps implements Parcelable {
/* Wi-Fi Protected Setup. www.wi-fi.org/wifi-protected-setup has details */
public enum Setup {
......@@ -61,7 +61,7 @@ public class WpsConfiguration implements Parcelable {
public LinkProperties linkProperties;
/** @hide */
public WpsConfiguration() {
public Wps() {
setup = Setup.INVALID;
BSSID = null;
pin = null;
......@@ -94,7 +94,7 @@ public class WpsConfiguration implements Parcelable {
}
/** copy constructor {@hide} */
public WpsConfiguration(WpsConfiguration source) {
public Wps(Wps source) {
if (source != null) {
setup = source.setup;
BSSID = source.BSSID;
......@@ -116,10 +116,10 @@ public class WpsConfiguration implements Parcelable {
}
/** Implement the Parcelable interface {@hide} */
public static final Creator<WpsConfiguration> CREATOR =
new Creator<WpsConfiguration>() {
public WpsConfiguration createFromParcel(Parcel in) {
WpsConfiguration config = new WpsConfiguration();
public static final Creator<Wps> CREATOR =
new Creator<Wps>() {
public Wps createFromParcel(Parcel in) {
Wps config = new Wps();
config.setup = Setup.valueOf(in.readString());
config.BSSID = in.readString();
config.pin = in.readString();
......@@ -129,8 +129,8 @@ public class WpsConfiguration implements Parcelable {
return config;
}
public WpsConfiguration[] newArray(int size) {
return new WpsConfiguration[size];
public Wps[] newArray(int size) {
return new Wps[size];
}
};
}
......@@ -53,7 +53,7 @@ class WpsStateMachine extends StateMachine {
private WifiStateMachine mWifiStateMachine;
private WpsConfiguration mWpsConfig;
private Wps mWpsConfig;
private Context mContext;
AsyncChannel mReplyChannel = new AsyncChannel();
......@@ -90,10 +90,10 @@ class WpsStateMachine extends StateMachine {
@Override
public boolean processMessage(Message message) {
if (DBG) Log.d(TAG, getName() + message.toString() + "\n");
WpsConfiguration wpsConfig;
Wps wpsConfig;
switch (message.what) {
case WifiStateMachine.CMD_START_WPS:
mWpsConfig = (WpsConfiguration) message.obj;
mWpsConfig = (Wps) message.obj;
WpsResult result;
switch (mWpsConfig.setup) {
case PBC:
......
......@@ -16,8 +16,8 @@
package android.net.wifi.p2p;
import android.net.wifi.WpsConfiguration;
import android.net.wifi.WpsConfiguration.Setup;
import android.net.wifi.Wps;
import android.net.wifi.Wps.Setup;
import android.os.Parcelable;
import android.os.Parcel;
......@@ -35,7 +35,7 @@ public class WifiP2pConfig implements Parcelable {
/**
* WPS configuration
*/
public WpsConfiguration wpsConfig;
public Wps wpsConfig;
/**
* This is an integer value between 0 and 15 where 0 indicates the least
......@@ -61,7 +61,7 @@ public class WifiP2pConfig implements Parcelable {
public WifiP2pConfig() {
//set defaults
wpsConfig = new WpsConfiguration();
wpsConfig = new Wps();
wpsConfig.setup = Setup.PBC;
}
......@@ -74,7 +74,7 @@ public class WifiP2pConfig implements Parcelable {
}
deviceAddress = tokens[1];
wpsConfig = new WpsConfiguration();
wpsConfig = new Wps();
if (tokens.length > 2) {
String[] nameVal = tokens[2].split("=");
......@@ -140,7 +140,7 @@ public class WifiP2pConfig implements Parcelable {
public WifiP2pConfig createFromParcel(Parcel in) {
WifiP2pConfig config = new WifiP2pConfig();
config.deviceAddress = in.readString();
config.wpsConfig = (WpsConfiguration) in.readParcelable(null);
config.wpsConfig = (Wps) in.readParcelable(null);
config.groupOwnerIntent = in.readInt();
config.persist = Persist.valueOf(in.readString());
return config;
......
......@@ -41,8 +41,8 @@ import android.net.wifi.WifiManager;
import android.net.wifi.WifiMonitor;
import android.net.wifi.WifiNative;
import android.net.wifi.WifiStateMachine;
import android.net.wifi.WpsConfiguration;
import android.net.wifi.WpsConfiguration.Setup;
import android.net.wifi.Wps;
import android.net.wifi.Wps.Setup;
import android.net.wifi.p2p.WifiP2pDevice.Status;
import android.os.Binder;
import android.os.IBinder;
......@@ -1034,7 +1034,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
private void notifyP2pGoNegotationRequest(WifiP2pConfig config) {
Resources r = Resources.getSystem();
WpsConfiguration wpsConfig = config.wpsConfig;
Wps wpsConfig = config.wpsConfig;
final View textEntryView = LayoutInflater.from(mContext)
.inflate(R.layout.wifi_p2p_go_negotiation_request_alert, null);
final EditText pin = (EditText) textEntryView .findViewById(R.id.wifi_p2p_wps_pin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment