summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml2
-rw-r--r--res/values/bools.xml3
-rwxr-xr-xres/values/config.xml3
-rw-r--r--res/values/strings.xml8
-rw-r--r--res/xml/device_info_status.xml6
-rw-r--r--res/xml/wireless_settings.xml10
-rw-r--r--src/com/android/settings/WirelessSettings.java15
-rw-r--r--src/com/android/settings/deviceinfo/Status.java21
8 files changed, 66 insertions, 2 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6a17bb955..485e4ed2a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -25,6 +25,8 @@
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.ACCESS_WIMAX_STATE" />
+ <uses-permission android:name="android.permission.CHANGE_WIMAX_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
diff --git a/res/values/bools.xml b/res/values/bools.xml
index a7e6ac834..278859bab 100644
--- a/res/values/bools.xml
+++ b/res/values/bools.xml
@@ -22,4 +22,7 @@
<!-- Whether the power control widget is enabled for this device. Should be overridden for
specific product builds. -->
<bool name="has_powercontrol_widget">true</bool>
+
+ <!-- Display additional System Update menu if true -->
+ <bool name="config_additional_system_update_setting_enable">false</bool>
</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index 4b08c4283..4119b6a06 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -19,4 +19,7 @@
<!-- If false, MIN is displayed. If true, MSID is displayed. -->
<bool name="config_msid_enable" translatable="false">false</bool>
+ <string name="additional_system_update" translatable="false"></string>
+ <string name="additional_system_update_menu" translatable="false"></string>
+
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f9e9c8962..2ed1f1344 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3431,6 +3431,9 @@ found in the list of installed apps.</string>
<!-- Messaage shown in dialog when you can't manually sync -->
<string name="cant_sync_dialog_message">Sync for this item is currently disabled. To change this setting, temporarily turn on background data and automatic sync.</string>
+ <string name="wimax_settings">4G settings</string>
+ <string name="wimax_settings_summary">Set up &amp; manage 4G network and modem</string>
+ <string name="status_wimax_mac_address">4G MAC address</string>
<!-- This is displayed to the user when the device needs to be decrypted -->
<string name="enter_password">Type password to decrypt storage</string>
<!-- This is displayed when the password is entered incorrectly -->
@@ -3764,4 +3767,9 @@ found in the list of installed apps.</string>
<!-- Representation of a numerical percentage. [CHAR LIMIT=8] -->
<string name="percentage"><xliff:g id="number" example="30">%d</xliff:g>%%</string>
+ <!-- A menu item in "About phone" that allows the user to update the phone with settings
+ from their cell phone carrier. The use of the string is similar to the string
+ "system_update_settings_list_item_title" in this project. [CHAR LIMIT=25] -->
+ <string name="additional_system_update_settings_list_item_title">Additional system updates</string>
+
</resources>
diff --git a/res/xml/device_info_status.xml b/res/xml/device_info_status.xml
index 19e22f438..aaa90a920 100644
--- a/res/xml/device_info_status.xml
+++ b/res/xml/device_info_status.xml
@@ -120,5 +120,9 @@
android:title="@string/status_up_time"
android:summary="@string/device_info_not_available"
android:persistent="false" />
-
+ <Preference android:key="wimax_mac_address"
+ style="?android:attr/preferenceInformationStyle"
+ android:title="@string/status_wimax_mac_address"
+ android:summary="@string/device_info_not_available"
+ android:persistent="false" />
</PreferenceScreen>
diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml
index 134461dec..20ffd8eb7 100644
--- a/res/xml/wireless_settings.xml
+++ b/res/xml/wireless_settings.xml
@@ -33,6 +33,16 @@
android:key="tether_settings"
android:title="@string/tether_settings_title_all" />
+ <PreferenceScreen
+ android:key="wimax_settings"
+ android:title="@string/wimax_settings"
+ android:summary="@string/wimax_settings_summary" >
+ <intent
+ android:action="android.intent.action.MAIN"
+ android:targetPackage="com.android.settings.wimax"
+ android:targetClass="com.android.settings.wimax.WimaxSettings" />
+ </PreferenceScreen>
+
<CheckBoxPreference
android:key="toggle_nfc"
android:title="@string/nfc_quick_toggle_title"
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
index 0ed781f40..13f69029d 100644
--- a/src/com/android/settings/WirelessSettings.java
+++ b/src/com/android/settings/WirelessSettings.java
@@ -43,6 +43,7 @@ public class WirelessSettings extends SettingsPreferenceFragment {
private static final String KEY_TOGGLE_AIRPLANE = "toggle_airplane";
private static final String KEY_TOGGLE_NFC = "toggle_nfc";
+ private static final String KEY_WIMAX_SETTINGS = "wimax_settings";
private static final String KEY_ANDROID_BEAM_SETTINGS = "android_beam_settings";
private static final String KEY_VPN_SETTINGS = "vpn_settings";
private static final String KEY_TOGGLE_WIFI_P2P = "toggle_wifi_p2p";
@@ -109,6 +110,20 @@ public class WirelessSettings extends SettingsPreferenceFragment {
String toggleable = Settings.System.getString(activity.getContentResolver(),
Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
+ //enable/disable wimax depending on the value in config.xml
+ boolean isWimaxEnabled = this.getResources().getBoolean(
+ com.android.internal.R.bool.config_wimaxEnabled);
+ if (!isWimaxEnabled) {
+ PreferenceScreen root = getPreferenceScreen();
+ Preference ps = (Preference) findPreference(KEY_WIMAX_SETTINGS);
+ if (ps != null) root.removePreference(ps);
+ } else {
+ if (toggleable == null || !toggleable.contains(Settings.System.RADIO_WIMAX )
+ && isWimaxEnabled) {
+ Preference ps = (Preference) findPreference(KEY_WIMAX_SETTINGS);
+ ps.setDependency(KEY_TOGGLE_AIRPLANE);
+ }
+ }
// Manually set dependencies for Wifi when not toggleable.
if (toggleable == null || !toggleable.contains(Settings.System.RADIO_WIFI)) {
findPreference(KEY_VPN_SETTINGS).setDependency(KEY_TOGGLE_AIRPLANE);
diff --git a/src/com/android/settings/deviceinfo/Status.java b/src/com/android/settings/deviceinfo/Status.java
index d7116c10f..c315acdeb 100644
--- a/src/com/android/settings/deviceinfo/Status.java
+++ b/src/com/android/settings/deviceinfo/Status.java
@@ -22,6 +22,8 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.BatteryManager;
@@ -33,6 +35,7 @@ import android.os.SystemClock;
import android.os.SystemProperties;
import android.preference.Preference;
import android.preference.PreferenceActivity;
+import android.preference.PreferenceScreen;
import android.telephony.PhoneNumberUtils;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
@@ -83,7 +86,7 @@ public class Status extends PreferenceActivity {
private static final String KEY_BT_ADDRESS = "bt_address";
private static final String KEY_SERIAL_NUMBER = "serial_number";
private static final String KEY_ICC_ID = "icc_id";
-
+ private static final String KEY_WIMAX_MAC_ADDRESS = "wimax_mac_address";
private static final String[] PHONE_RELATED_ENTRIES = {
KEY_DATA_STATE,
KEY_SERVICE_STATE,
@@ -248,6 +251,7 @@ public class Status extends PreferenceActivity {
mPhoneStateReceiver.notifyServiceState(EVENT_SERVICE_STATE_CHANGED);
}
+ setWimaxStatus();
setWifiStatus();
setBtStatus();
setIpAddressStatus();
@@ -409,6 +413,21 @@ public class Status extends PreferenceActivity {
}
}
+ private void setWimaxStatus() {
+ ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
+ NetworkInfo ni = cm.getNetworkInfo(ConnectivityManager.TYPE_WIMAX);
+
+ if (ni == null) {
+ PreferenceScreen root = getPreferenceScreen();
+ Preference ps = (Preference) findPreference(KEY_WIMAX_MAC_ADDRESS);
+ if (ps != null) root.removePreference(ps);
+ } else {
+ Preference wimaxMacAddressPref = findPreference(KEY_WIMAX_MAC_ADDRESS);
+ String macAddress = SystemProperties.get("net.wimax.mac.address",
+ getString(R.string.status_unavailable));
+ wimaxMacAddressPref.setSummary(macAddress);
+ }
+ }
private void setWifiStatus() {
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();