summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaisuke Miyakawa <dmiyakawa@google.com>2011-01-17 17:36:49 -0800
committerDaisuke Miyakawa <dmiyakawa@google.com>2011-01-17 18:01:34 -0800
commita0587d028a79397b8c3c2ccf66ee1d5b2dacb625 (patch)
treea26c663cb6e4897c7b69d8325b9adffaa5b5181f /src
parent81f794dfa11fa21527ea33335dc76ad488aa9bfa (diff)
downloadpackages_apps_Settings-a0587d028a79397b8c3c2ccf66ee1d5b2dacb625.zip
packages_apps_Settings-a0587d028a79397b8c3c2ccf66ee1d5b2dacb625.tar.gz
packages_apps_Settings-a0587d028a79397b8c3c2ccf66ee1d5b2dacb625.tar.bz2
Show correct title.
Bug: 3347865 Change-Id: Ide13ab46f480107c6be1ff22edf44c2ac465fbf9
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
index 59d61ab..cb33d3b 100644
--- a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
+++ b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
@@ -172,6 +172,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
}
private void restoreFirstButtonVisibilityState() {
+ showDefaultTitle();
mAddNetworkButton.setVisibility(View.VISIBLE);
mRefreshButton.setVisibility(View.VISIBLE);
mSkipOrNextButton.setVisibility(View.VISIBLE);
@@ -252,6 +253,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
mProgressBar.setIndeterminate(false);
mProgressBar.setProgress(2);
+ showConnectedTitle();
mConnectButton.setVisibility(View.GONE);
mAddNetworkButton.setVisibility(View.GONE);
mRefreshButton.setVisibility(View.GONE);
@@ -278,19 +280,37 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
private void showConnectingStatus() {
// We save this title and show it when authentication failed.
mEditingTitle = mTitleView.getText();
- showTitleForNetworkEditing();
+ showConnectingTitle();
mProgressBar.setIndeterminate(false);
mProgressBar.setProgress(1);
setPaddingVisibility(View.VISIBLE);
}
- private void showTitleForNetworkEditing() {
+ private void showDefaultTitle() {
+ mTitleView.setText(getString(R.string.wifi_setup_title));
+ }
+
+ private void showEditingTitle() {
if (TextUtils.isEmpty(mNetworkName) && mWifiConfig != null) {
mNetworkName = mWifiConfig.getController().getConfig().SSID;
}
mTitleView.setText(getString(R.string.wifi_setup_title_editing_network, mNetworkName));
}
+ private void showConnectingTitle() {
+ if (TextUtils.isEmpty(mNetworkName) && mWifiConfig != null) {
+ mNetworkName = mWifiConfig.getController().getConfig().SSID;
+ }
+ mTitleView.setText(getString(R.string.wifi_setup_title_connecting_network, mNetworkName));
+ }
+
+ private void showConnectedTitle() {
+ if (TextUtils.isEmpty(mNetworkName) && mWifiConfig != null) {
+ mNetworkName = mWifiConfig.getController().getConfig().SSID;
+ }
+ mTitleView.setText(getString(R.string.wifi_setup_title_connected_network, mNetworkName));
+ }
+
private void showScanningStatus() {
mProgressBar.setIndeterminate(true);
((Button)findViewById(R.id.wifi_setup_add_network)).setEnabled(false);
@@ -344,6 +364,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
selectedAccessPoint.security == AccessPoint.SECURITY_EAP) {
mConnectButton.setVisibility(View.GONE);
+ showEditingTitle();
mSkipOrNextButton.setVisibility(View.GONE);
mAddNetworkButton.setVisibility(View.GONE);
mRefreshButton.setVisibility(View.GONE);
@@ -356,6 +377,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
// In SetupWizard, we just show the button as "Connect" instead.
mConnectButton.setText(R.string.wifi_connect);
+ showEditingTitle();
mSkipOrNextButton.setVisibility(View.GONE);
mAddNetworkButton.setVisibility(View.GONE);
mRefreshButton.setVisibility(View.GONE);
@@ -493,7 +515,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
mTitleView.setText(mEditingTitle);
} else {
Log.w(TAG, "Title during editing/adding a network was empty.");
- showTitleForNetworkEditing();
+ showEditingTitle();
}
// Restore View status which was tweaked on connection.