summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-01-23 07:47:45 -0800
committerGerrit Code Review <gerrit@review.cyanogenmod.com>2013-01-23 07:47:45 -0800
commitcc9628903d05ba3e30d1f53401699a3f7788351c (patch)
tree8acaec2cc35e6debc19cc13f0416d8a90396ef6b
parentfa2c24a134300a3ede09e02d3d007f41c9a58740 (diff)
parentdb8816c642ec1c2fc91e8c979a07534214948110 (diff)
downloadframeworks_opt_telephony-cc9628903d05ba3e30d1f53401699a3f7788351c.zip
frameworks_opt_telephony-cc9628903d05ba3e30d1f53401699a3f7788351c.tar.gz
frameworks_opt_telephony-cc9628903d05ba3e30d1f53401699a3f7788351c.tar.bz2
Merge "SamsungExynos3RIL: fix unable to swtich 2G/3G while connected to wifi" into cm-10.1
-rw-r--r--src/java/com/android/internal/telephony/SamsungExynos3RIL.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/com/android/internal/telephony/SamsungExynos3RIL.java b/src/java/com/android/internal/telephony/SamsungExynos3RIL.java
index e4050ee..f7bd517 100644
--- a/src/java/com/android/internal/telephony/SamsungExynos3RIL.java
+++ b/src/java/com/android/internal/telephony/SamsungExynos3RIL.java
@@ -27,6 +27,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
import android.os.Handler;
import android.os.Message;
import android.os.AsyncResult;
@@ -872,8 +873,8 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
ConnectivityManager cm =
(ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
- if(cm.getMobileDataEnabled())
- {
+ NetworkInfo.State mobileState = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState();
+ if (mobileState == NetworkInfo.State.CONNECTED || mobileState == NetworkInfo.State.CONNECTING) {
ConnectivityHandler handler = new ConnectivityHandler(mContext);
handler.setPreferedNetworkType(networkType, response);
} else {