diff options
author | Danny Baumann <dannybaumann@web.de> | 2013-05-29 05:31:35 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-05-29 05:31:35 -0700 |
commit | 5cb4debe16f4169827c5dcdbfeef5f80c06ad2c7 (patch) | |
tree | 032f649fb941373ae0e266281ce1cb853246897c | |
parent | ccf68318c7773e73befa67edaf51d7811b31d646 (diff) | |
parent | 0a55f3a3652dde2399cfcd62a41a6b49fa324960 (diff) | |
download | packages_apps_settings-5cb4debe16f4169827c5dcdbfeef5f80c06ad2c7.zip packages_apps_settings-5cb4debe16f4169827c5dcdbfeef5f80c06ad2c7.tar.gz packages_apps_settings-5cb4debe16f4169827c5dcdbfeef5f80c06ad2c7.tar.bz2 |
Merge "ProfilesSettings : Allow nfc override (2/2)" into cm-10.1
-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); |