Update strings for Wi-Fi DPP handshake running state
Bug: 125987679 Test: manual test Change-Id: I55eddee5f3c0c28d1be23b5b9d8c0b56280be797
This commit is contained in:
@@ -224,13 +224,7 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
} else {
|
||||
mTitle.setText(R.string.wifi_dpp_scan_qr_code);
|
||||
|
||||
String description;
|
||||
if (TextUtils.isEmpty(mSsid)) {
|
||||
description = getString(R.string.wifi_dpp_scan_qr_code_join_unknown_network, mSsid);
|
||||
} else {
|
||||
description = getString(R.string.wifi_dpp_scan_qr_code_join_network, mSsid);
|
||||
}
|
||||
mSummary.setText(description);
|
||||
updateEnrolleeSummary();
|
||||
}
|
||||
|
||||
mErrorMessage = view.findViewById(R.id.error_message);
|
||||
@@ -410,6 +404,7 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
if (!mIsConfiguratorMode) {
|
||||
mProgressBar.setVisibility(View.VISIBLE);
|
||||
startWifiDppEnrolleeInitiator((WifiQrCode)msg.obj);
|
||||
updateEnrolleeSummary();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -453,6 +448,7 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
|
||||
Log.e(TAG, "Invalid networkId " + newNetworkId);
|
||||
mLatestStatusCode = EasyConnectStatusCallback.EASY_CONNECT_EVENT_FAILURE_GENERIC;
|
||||
updateEnrolleeSummary();
|
||||
mProgressBar.setVisibility(View.INVISIBLE);
|
||||
showErrorMessage(getString(R.string.wifi_dpp_check_connection_try_again));
|
||||
restartCamera();
|
||||
@@ -520,6 +516,7 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
}
|
||||
|
||||
mLatestStatusCode = code;
|
||||
updateEnrolleeSummary();
|
||||
mProgressBar.setVisibility(View.INVISIBLE);
|
||||
restartCamera();
|
||||
}
|
||||
@@ -578,4 +575,18 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
|
||||
mCamera.start(surfaceTexture);
|
||||
}
|
||||
|
||||
private void updateEnrolleeSummary() {
|
||||
if (isGoingInitiator()) {
|
||||
mSummary.setText(R.string.wifi_dpp_connecting);
|
||||
} else {
|
||||
String description;
|
||||
if (TextUtils.isEmpty(mSsid)) {
|
||||
description = getString(R.string.wifi_dpp_scan_qr_code_join_unknown_network, mSsid);
|
||||
} else {
|
||||
description = getString(R.string.wifi_dpp_scan_qr_code_join_network, mSsid);
|
||||
}
|
||||
mSummary.setText(description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user