Fix WPS to provides immediate feedback
If WPS is already active, we drop user's request and convey an in progress message If WPS fails to start, a failure indication is conveyed to the user Bug: 3316078 Change-Id: I238c55973cb29cf5c1be66197ffcb4978316cb89
This commit is contained in:
@ -37,6 +37,7 @@ import android.net.wifi.WifiConfiguration;
|
||||
import android.net.wifi.SupplicantState;
|
||||
import android.net.wifi.WifiConfiguration.KeyMgmt;
|
||||
import android.net.wifi.WpsConfiguration;
|
||||
import android.net.wifi.WpsResult;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.InterfaceConfiguration;
|
||||
import android.net.DhcpInfo;
|
||||
@ -841,13 +842,13 @@ public class WifiService extends IWifiManager.Stub {
|
||||
mWifiStateMachine.forgetNetwork(netId);
|
||||
}
|
||||
|
||||
public String startWps(WpsConfiguration config) {
|
||||
public WpsResult startWps(WpsConfiguration config) {
|
||||
enforceChangePermission();
|
||||
if (mChannel != null) {
|
||||
return mWifiStateMachine.startWps(mChannel, config);
|
||||
} else {
|
||||
Slog.e(TAG, "mChannel is not initialized");
|
||||
return "";
|
||||
return new WpsResult(WpsResult.Status.FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user