Added info about why Wi-Fi is required
Added a new optional textview to wifi settings, informing that wifi is required during setup. For use on Nakasi 3G. Bug: 7383934 Change-Id: I231472438e61ccddedc1e680a362f90738d64a2d
This commit is contained in:
@@ -74,6 +74,15 @@
|
|||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:orientation="vertical" >
|
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
|
<ListView
|
||||||
android:id="@android:id/list"
|
android:id="@android:id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -1319,6 +1319,8 @@
|
|||||||
<string name="wifi_more">More</string>
|
<string name="wifi_more">More</string>
|
||||||
<!-- Wi-Fi settings. wps menu title [CHAR LIMIT=25]-->
|
<!-- Wi-Fi settings. wps menu title [CHAR LIMIT=25]-->
|
||||||
<string name="wifi_setup_wps">Automatic setup (WPS)</string>
|
<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 />
|
<!-- Dialog for Access Points --> <skip />
|
||||||
<!-- Label to show/hide advanced options -->
|
<!-- Label to show/hide advanced options -->
|
||||||
|
@@ -152,6 +152,9 @@ public class WifiSettings extends SettingsPreferenceFragment
|
|||||||
// this boolean extra shows a custom button that we can control
|
// this boolean extra shows a custom button that we can control
|
||||||
protected static final String EXTRA_SHOW_CUSTOM_BUTTON = "wifi_show_custom_button";
|
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
|
// this boolean extra is set if we are being invoked by the Setup Wizard
|
||||||
private static final String EXTRA_IS_FIRST_RUN = "firstRun";
|
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.button_bar).setVisibility(View.VISIBLE);
|
||||||
view.findViewById(R.id.back_button).setVisibility(View.INVISIBLE);
|
view.findViewById(R.id.back_button).setVisibility(View.INVISIBLE);
|
||||||
view.findViewById(R.id.skip_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;
|
return view;
|
||||||
} else {
|
} else {
|
||||||
return super.onCreateView(inflater, container, savedInstanceState);
|
return super.onCreateView(inflater, container, savedInstanceState);
|
||||||
|
Reference in New Issue
Block a user