Update Settings app to use new namespace for airplane-mode settings

Bug 7132230

Change-Id: I0253637e6d464afc229cf11ffe69852bf44fe261
This commit is contained in:
Christopher Tate
2012-09-10 15:39:05 -07:00
parent 955f3477a9
commit 6a5929b086
4 changed files with 19 additions and 17 deletions

View File

@@ -32,6 +32,7 @@ import android.os.PowerManager;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.storage.IMountService;
import android.provider.Settings;
import android.telephony.TelephonyManager;
@@ -641,10 +642,10 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
TelephonyManager.getDefault().getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE;
if (!isLteDevice) {
Log.d(TAG, "Going into airplane mode.");
Settings.System.putInt(getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 1);
Settings.Global.putInt(getContentResolver(), Settings.Global.AIRPLANE_MODE_ON, 1);
final Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
intent.putExtra("state", true);
sendBroadcast(intent);
sendBroadcastAsUser(intent, UserHandle.ALL);
}
}