diff options
-rw-r--r-- | res/values/cm_strings.xml | 1 | ||||
-rw-r--r-- | src/com/android/settings/profiles/ProfileConfig.java | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index a1b83e2..787083f 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -295,6 +295,7 @@ <string name="toggleFlashlight">Flashlight</string> <string name="toggleLockScreen">Lock Screen</string> <string name="toggleWimax">WiMAX</string> + <string name="toggleNfc">NFC</string> <!-- Screen security - Screen security --> <string name="screen_security_category">Screen security</string> diff --git a/src/com/android/settings/profiles/ProfileConfig.java b/src/com/android/settings/profiles/ProfileConfig.java index 4e6967b..fc47ff0 100644 --- a/src/com/android/settings/profiles/ProfileConfig.java +++ b/src/com/android/settings/profiles/ProfileConfig.java @@ -16,6 +16,8 @@ package com.android.settings.profiles; +import static com.android.internal.util.cm.QSUtils.*; + import java.util.ArrayList; import java.util.UUID; @@ -91,15 +93,22 @@ public class ProfileConfig extends SettingsPreferenceFragment }; mConnections = new ArrayList<ConnectionItem>(); - mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_MOBILEDATA, getString(R.string.toggleData))); - mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_BLUETOOTH, getString(R.string.toggleBluetooth))); + if (deviceSupportsBluetooth()) { + mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_BLUETOOTH, getString(R.string.toggleBluetooth))); + } mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_GPS, getString(R.string.toggleGPS))); mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_WIFI, getString(R.string.toggleWifi))); mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_SYNC, getString(R.string.toggleSync))); - mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_WIFIAP, getString(R.string.toggleWifiAp))); + if (deviceSupportsMobileData(getActivity())) { + mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_MOBILEDATA, getString(R.string.toggleData))); + mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_WIFIAP, getString(R.string.toggleWifiAp))); + } if (WimaxHelper.isWimaxSupported(getActivity())) { mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_WIMAX, getString(R.string.toggleWimax))); } + if (deviceSupportsNfc(getActivity())) { + mConnections.add(new ConnectionItem(ConnectionSettings.PROFILE_CONNECTION_NFC, getString(R.string.toggleNfc))); + } addPreferencesFromResource(R.xml.profile_config); |