am bef77ca1: am 8f04a6fb: Merge "Write the airplane setting in addition to sending the Intent." into jb-dev

* commit 'bef77ca177dd23e7a4d557f4a6cac68557a2afeb':
  Write the airplane setting in addition to sending the Intent.
This commit is contained in:
Vikram Aggarwal
2012-05-04 16:35:49 -07:00
committed by Android Git Automerger

View File

@@ -33,6 +33,7 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.storage.IMountService;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
@@ -628,6 +629,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
TelephonyManager.getDefault().getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE;
if (!isLteDevice) {
Log.d(TAG, "Going into airplane mode.");
Settings.System.putInt(getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 1);
final Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
intent.putExtra("state", true);
sendBroadcast(intent);