Write the airplane setting in addition to sending the Intent.

dab was right. :)

Fix b/6006192 in association with https://android-git.corp.google.com/g/187160

Change-Id: I3edfb3191ab35a4e5de1b18f3e2e1dae5f882354
This commit is contained in:
Vikram Aggarwal
2012-05-04 14:09:52 -07:00
parent 8b399cc71c
commit 6ebbd30e18

View File

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