Merge "Fix wifi flow" into honeycomb

This commit is contained in:
Daisuke Miyakawa
2011-01-24 14:00:07 -08:00
committed by Android (Google) Code Review

View File

@@ -258,6 +258,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
} }
case CONNECTED: { case CONNECTED: {
hideSoftwareKeyboard(); hideSoftwareKeyboard();
setPaddingVisibility(View.VISIBLE);
// If the device is already connected to a wifi without users' "Connect" request, // If the device is already connected to a wifi without users' "Connect" request,
// this can be false here. We want to treat it as "after connect action". // this can be false here. We want to treat it as "after connect action".
@@ -302,8 +303,13 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
showConnectingTitle(); showConnectingTitle();
mProgressBar.setIndeterminate(false); mProgressBar.setIndeterminate(false);
mProgressBar.setProgress(1); mProgressBar.setProgress(1);
// We may enter "Connecting" status during editing password again (if the Wifi module
// tries to (re)connect a network.)
if (mAfterConnectAction) {
setPaddingVisibility(View.VISIBLE); setPaddingVisibility(View.VISIBLE);
} }
}
private void showDefaultTitle() { private void showDefaultTitle() {
mTitleView.setText(getString(R.string.wifi_setup_title)); mTitleView.setText(getString(R.string.wifi_setup_title));
@@ -535,6 +541,14 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
*/ */
/* package */ void onAccessPointsUpdated( /* package */ void onAccessPointsUpdated(
PreferenceCategory holder, Collection<AccessPoint> accessPoints) { PreferenceCategory holder, Collection<AccessPoint> accessPoints) {
// If we already show some of access points but the bar still shows "scanning" state, it
// should be stopped.
if (mProgressBar.isIndeterminate() && accessPoints.size() > 0) {
mProgressBar.setIndeterminate(false);
mAddNetworkButton.setEnabled(true);
mRefreshButton.setEnabled(true);
}
for (AccessPoint accessPoint : accessPoints) { for (AccessPoint accessPoint : accessPoints) {
accessPoint.setLayoutResource(R.layout.custom_preference); accessPoint.setLayoutResource(R.layout.custom_preference);
holder.addPreference(accessPoint); holder.addPreference(accessPoint);