summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2012-10-21 08:08:01 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-21 08:08:01 -0700
commit86a52bec4b0134e540cc5c546da4e88dc2d62487 (patch)
tree85da6cad3da8a9109277ee5cec5a4b0ec3f8597b
parent9055dd74f4ac42e422de941259d9f9c437ef9eca (diff)
parent5c412204a63031b4dee3195d3a350d9e2d929fe4 (diff)
downloadpackages_apps_Settings-86a52bec4b0134e540cc5c546da4e88dc2d62487.zip
packages_apps_Settings-86a52bec4b0134e540cc5c546da4e88dc2d62487.tar.gz
packages_apps_Settings-86a52bec4b0134e540cc5c546da4e88dc2d62487.tar.bz2
am 5c412204: am 56a166e9: Added info about why Wi-Fi is required
* commit '5c412204a63031b4dee3195d3a350d9e2d929fe4': Added info about why Wi-Fi is required
-rw-r--r--res/layout/setup_preference.xml9
-rw-r--r--res/values/strings.xml4
-rw-r--r--src/com/android/settings/wifi/WifiSettings.java10
3 files changed, 21 insertions, 2 deletions
diff --git a/res/layout/setup_preference.xml b/res/layout/setup_preference.xml
index 384ee86..4c206dd 100644
--- a/res/layout/setup_preference.xml
+++ b/res/layout/setup_preference.xml
@@ -74,6 +74,15 @@
android:background="@android:color/transparent"
android:orientation="vertical" >
+ <TextView
+ android:id="@+id/wifi_required_info"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="6dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/wifi_required_info_text"
+ android:visibility="gone" />
+
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2a60dd1..b39e8b5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -32,7 +32,7 @@
<string name="show_dev_on">You are now a developer!</string>
<!-- [CHAR LIMIT=NONE] Device Info screen. Okay we get it, stop pressing, you already have it on -->
<string name="show_dev_already">No need, you are already a developer.</string>
-
+
<!-- Category headings in left-pane header menu --> <skip />
<!-- Settings main menu category heading. Wireless and networks (Wi-Fi, Bluetooth, data usage...). [CHAR LIMIT=40] -->
<string name="header_category_wireless_networks">WIRELESS &amp; NETWORKS</string>
@@ -1319,6 +1319,8 @@
<string name="wifi_more">More</string>
<!-- Wi-Fi settings. wps menu title [CHAR LIMIT=25]-->
<string name="wifi_setup_wps">Automatic setup (WPS)</string>
+ <!-- Message informing that wifi is required during setup [CHAR LIMIT=NONE] -->
+ <string name="wifi_required_info_text">To complete setup, your tablet needs access to Wi-Fi. After setup, you can switch between mobile data and Wi-Fi.</string>
<!-- Dialog for Access Points --> <skip />
<!-- Label to show/hide advanced options -->
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 9c3f07f..aedb79e 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -152,6 +152,9 @@ public class WifiSettings extends SettingsPreferenceFragment
// this boolean extra shows a custom button that we can control
protected static final String EXTRA_SHOW_CUSTOM_BUTTON = "wifi_show_custom_button";
+ // show a text regarding data charges when wifi connection is required during setup wizard
+ protected static final String EXTRA_SHOW_WIFI_REQUIRED_INFO = "wifi_show_wifi_required_info";
+
// this boolean extra is set if we are being invoked by the Setup Wizard
private static final String EXTRA_IS_FIRST_RUN = "firstRun";
@@ -238,7 +241,8 @@ public class WifiSettings extends SettingsPreferenceFragment
});
}
- if (getActivity().getIntent().getBooleanExtra(EXTRA_SHOW_CUSTOM_BUTTON, false)) {
+ Intent intent = getActivity().getIntent();
+ if (intent.getBooleanExtra(EXTRA_SHOW_CUSTOM_BUTTON, false)) {
view.findViewById(R.id.button_bar).setVisibility(View.VISIBLE);
view.findViewById(R.id.back_button).setVisibility(View.INVISIBLE);
view.findViewById(R.id.skip_button).setVisibility(View.INVISIBLE);
@@ -258,6 +262,10 @@ public class WifiSettings extends SettingsPreferenceFragment
});
}
+ if (intent.getBooleanExtra(EXTRA_SHOW_WIFI_REQUIRED_INFO, false)) {
+ view.findViewById(R.id.wifi_required_info).setVisibility(View.VISIBLE);
+ }
+
return view;
} else {
return super.onCreateView(inflater, container, savedInstanceState);