diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2010-11-24 17:20:59 -0800 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2010-11-24 17:20:59 -0800 |
commit | 99be5007ef13a403404d5455c622cdf7af96a1ca (patch) | |
tree | 8eecf326def87ab6886659442c79a453a81795ae /src/com | |
parent | 582ab4d414c21f71cf1e4df658b304d1a409c155 (diff) | |
download | packages_apps_settings-99be5007ef13a403404d5455c622cdf7af96a1ca.zip packages_apps_settings-99be5007ef13a403404d5455c622cdf7af96a1ca.tar.gz packages_apps_settings-99be5007ef13a403404d5455c622cdf7af96a1ca.tar.bz2 |
Don't use the internal data-enable mechanism
Use public stuff. Note that the public stuff will move soon to Telephony,
but one step at a time.
Change-Id: Id81ee0ffb0f67d762b5ad0c813f692842dc170b0
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/RadioInfo.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java index fd643cd..beea51e 100644 --- a/src/com/android/settings/RadioInfo.java +++ b/src/com/android/settings/RadioInfo.java @@ -17,10 +17,12 @@ package com.android.settings; import android.app.Activity; +import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.res.Resources; +import android.net.ConnectivityManager; import android.net.LinkProperties; import android.net.Uri; import android.os.AsyncResult; @@ -856,13 +858,15 @@ public class RadioInfo extends Activity { private MenuItem.OnMenuItemClickListener mToggleData = new MenuItem.OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { + ConnectivityManager cm = + (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); int state = mTelephonyManager.getDataState(); switch (state) { case TelephonyManager.DATA_CONNECTED: - phone.disableDataConnectivity(); + cm.setMobileDataEnabled(false); break; case TelephonyManager.DATA_DISCONNECTED: - phone.enableDataConnectivity(); + cm.setMobileDataEnabled(true); break; default: // do nothing |