[DPP] Fix usage of "DPP" public API to "Easy Connect"

All DPP public API and constants renamed to use Easy Connect,
which is the WFA public technology name. Update the settings code to use the
new API names.

Bug: 122851551
Test: atest DppManagerTest
Test: act.py -c ../WifiDppConfig.json -tc WifiDppTest
Change-Id: Ib531393a81526c468c978e31f1c62c5022245d55
This commit is contained in:
Hai Shalom
2019-01-14 15:49:59 -08:00
parent de324b9b70
commit e046e8af2a
2 changed files with 11 additions and 9 deletions

View File

@@ -45,7 +45,7 @@ public class WifiDppAddDeviceFragment extends WifiDppQrCodeBaseFragment {
private Button mButtonLeft;
private Button mButtonRight;
private class DppStatusCallback extends android.net.wifi.DppStatusCallback {
private class EasyConnectStatusCallback extends android.net.wifi.EasyConnectStatusCallback {
@Override
public void onEnrolleeSuccess(int newNetworkId) {
// Do nothing
@@ -65,7 +65,7 @@ public class WifiDppAddDeviceFragment extends WifiDppQrCodeBaseFragment {
@Override
public void onFailure(int code) {
Log.d(TAG, "DppStatusCallback.onFailure " + code);
Log.d(TAG, "EasyConnectStatusCallback.onFailure " + code);
// Update fail UI.
mTitle.setText(R.string.wifi_dpp_could_not_add_device);
@@ -149,8 +149,9 @@ public class WifiDppAddDeviceFragment extends WifiDppQrCodeBaseFragment {
((WifiDppConfiguratorActivity) getActivity()).getWifiNetworkConfig().getNetworkId();
final WifiManager wifiManager = getContext().getSystemService(WifiManager.class);
wifiManager.startDppAsConfiguratorInitiator(qrCode, networkId,
WifiManager.DPP_NETWORK_ROLE_STA, /* handler */ null, new DppStatusCallback());
wifiManager.startEasyConnectAsConfiguratorInitiator(qrCode, networkId,
WifiManager.EASY_CONNECT_NETWORK_ROLE_STA, /* handler */ null,
new EasyConnectStatusCallback());
}
// Container Activity must implement this interface