diff --git a/src/com/android/settings/AirplaneModeEnabler.java b/src/com/android/settings/AirplaneModeEnabler.java
index 45411b2..ff4b27d 100644
--- a/src/com/android/settings/AirplaneModeEnabler.java
+++ b/src/com/android/settings/AirplaneModeEnabler.java
@@ -22,11 +22,14 @@
 import android.content.Intent;
 import android.os.Handler;
 import android.os.Message;
+import android.os.SystemProperties;
 import android.preference.CheckBoxPreference;
 import android.preference.Preference;
 import android.provider.Settings;
 import android.telephony.ServiceState;
 
+import com.android.internal.telephony.TelephonyProperties;
+
 public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListener {
 
     private final Context mContext;
@@ -111,8 +114,23 @@
      * Called when someone clicks on the checkbox preference.
      */
     public boolean onPreferenceChange(Preference preference, Object newValue) {
-        setAirplaneModeOn((Boolean) newValue);
+        if (Boolean.parseBoolean(
+                    SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE))) {
+            // In ECM mode, do not update database at this point
+        } else {
+            setAirplaneModeOn((Boolean) newValue);
+        }
         return true;
     }
 
+    public void setAirplaneModeInECM(boolean isECMExit, boolean isAirplaneModeOn) {
+        if (isECMExit) {
+            // update database based on the current checkbox state
+            setAirplaneModeOn(isAirplaneModeOn);
+        } else {
+            // update checkbox state based on database value
+            onAirplaneModeChanged();
+        }
+    }
+
 }
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
index f160bac..b5c9ec1 100644
--- a/src/com/android/settings/WirelessSettings.java
+++ b/src/com/android/settings/WirelessSettings.java
@@ -19,13 +19,19 @@
 import com.android.settings.bluetooth.BluetoothEnabler;
 import com.android.settings.wifi.WifiEnabler;
 
+import android.content.Intent;
 import android.net.wifi.WifiManager;
 import android.os.Bundle;
+import android.os.SystemProperties;
 import android.preference.CheckBoxPreference;
 import android.preference.Preference;
+import android.preference.PreferenceScreen;
 import android.preference.PreferenceActivity;
 import android.provider.Settings;
 
+import com.android.internal.telephony.TelephonyIntents;
+import com.android.internal.telephony.TelephonyProperties;
+
 public class WirelessSettings extends PreferenceActivity {
 
     private static final String KEY_TOGGLE_AIRPLANE = "toggle_airplane";
@@ -33,10 +39,36 @@
     private static final String KEY_TOGGLE_WIFI = "toggle_wifi";
     private static final String KEY_WIFI_SETTINGS = "wifi_settings";
     private static final String KEY_VPN_SETTINGS = "vpn_settings";
+    public static final String EXIT_ECM_RESULT = "exit_ecm_result";
+    public static final int REQUEST_CODE_EXIT_ECM = 1;
 
     private WifiEnabler mWifiEnabler;
     private AirplaneModeEnabler mAirplaneModeEnabler;
     private BluetoothEnabler mBtEnabler;
+    private CheckBoxPreference mAirplaneModePreference;
+
+    /**
+     * Invoked on each preference click in this hierarchy, overrides
+     * PreferenceActivity's implementation.  Used to make sure we track the
+     * preference click events.
+     */
+    @Override
+    public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+        if ( (preference == mAirplaneModePreference) &&
+                (Boolean.parseBoolean(
+                    SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE))) ) {
+            // In ECM mode launch ECM app dialog
+            startActivityForResult(
+                new Intent(TelephonyIntents.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS, null),
+                REQUEST_CODE_EXIT_ECM);
+
+            return true;
+        }
+        else {
+            // Let the intents be launched by the Preference manager
+            return false;
+        }
+    }
     
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -45,6 +77,7 @@
         addPreferencesFromResource(R.xml.wireless_settings);
 
         initToggles();
+        mAirplaneModePreference = (CheckBoxPreference) findPreference(KEY_TOGGLE_AIRPLANE);
     }
     
     @Override
@@ -90,4 +123,20 @@
         }
     }
 
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        switch(requestCode) {
+        case REQUEST_CODE_EXIT_ECM:
+            Boolean isChoiceYes =
+                data.getBooleanExtra(EXIT_ECM_RESULT, false);
+            // Set Airplane mode based on the return value and checkbox state
+            mAirplaneModeEnabler.setAirplaneModeInECM(isChoiceYes,
+                    mAirplaneModePreference.isChecked());
+            break;
+
+        default:
+            break;
+        }
+    }
+
 }
