From 936e3faae11441fad05bf244fa44a29515edd1d8 Mon Sep 17 00:00:00 2001 From: Irfan Sheriff Date: Mon, 7 May 2012 15:51:37 -0700 Subject: Remove NSD checkbox Bug: 6449478 Change-Id: Ic4aa44cb08843819c3290b16d906c989ee306727 --- src/com/android/settings/WirelessSettings.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java index 884ff91..3b67ec3 100644 --- a/src/com/android/settings/WirelessSettings.java +++ b/src/com/android/settings/WirelessSettings.java @@ -103,7 +103,10 @@ public class WirelessSettings extends SettingsPreferenceFragment { mAirplaneModeEnabler = new AirplaneModeEnabler(activity, mAirplaneModePreference); mNfcEnabler = new NfcEnabler(activity, nfc, androidBeam); - mNsdEnabler = new NsdEnabler(activity, nsd); + + // Remove NSD checkbox by default + getPreferenceScreen().removePreference(nsd); + //mNsdEnabler = new NsdEnabler(activity, nsd); String toggleable = Settings.System.getString(activity.getContentResolver(), Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS); @@ -178,7 +181,9 @@ public class WirelessSettings extends SettingsPreferenceFragment { if (mNfcEnabler != null) { mNfcEnabler.resume(); } - mNsdEnabler.resume(); + if (mNsdEnabler != null) { + mNsdEnabler.resume(); + } } @Override @@ -189,7 +194,9 @@ public class WirelessSettings extends SettingsPreferenceFragment { if (mNfcEnabler != null) { mNfcEnabler.pause(); } - mNsdEnabler.pause(); + if (mNsdEnabler != null) { + mNsdEnabler.pause(); + } } @Override -- cgit v1.1