diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-05-30 15:45:25 +0100 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-05-30 15:45:25 +0100 |
commit | c1ccade8fe528add8f9ea36b70a689c17f70d1ea (patch) | |
tree | bdbb2033c95556a2da93f1c17a6291243c96c36d /telephony | |
parent | 7cd1edc9f495ef58a1389fc4ac41e028facc0a72 (diff) | |
download | frameworks_base-c1ccade8fe528add8f9ea36b70a689c17f70d1ea.zip frameworks_base-c1ccade8fe528add8f9ea36b70a689c17f70d1ea.tar.gz frameworks_base-c1ccade8fe528add8f9ea36b70a689c17f70d1ea.tar.bz2 |
QualcommSharedRIL: Fix restoring network mode preference on reboot.
Change-Id Ib9e4bba6da705c127ce1f3aa3c242b9262541cee fixed this in the
master RIL class, and broke the qcom-specific implementation. Fix
it by rescoping the variable.
Change-Id: I70784ee0f8e7b0b74cab8dafdc83610191ba245c
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/QualcommSharedRIL.java | 6 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/RIL.java | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/telephony/java/com/android/internal/telephony/QualcommSharedRIL.java b/telephony/java/com/android/internal/telephony/QualcommSharedRIL.java index 6c3402f..9829449 100644 --- a/telephony/java/com/android/internal/telephony/QualcommSharedRIL.java +++ b/telephony/java/com/android/internal/telephony/QualcommSharedRIL.java @@ -46,7 +46,6 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface { protected IccHandler mIccHandler; protected String mAid; protected boolean mUSIM = false; - protected int mSetPreferredNetworkType; protected String[] mLastDataIface = new String[20]; boolean RILJ_LOGV = true; boolean RILJ_LOGD = true; @@ -60,6 +59,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface { public QualcommSharedRIL(Context context, int networkMode, int cdmaSubscription) { super(context, networkMode, cdmaSubscription); + mSetPreferredNetworkType = -1; } @Override public void @@ -334,10 +334,12 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface { /** * If not using a USIM, ignore LTE mode and go to 3G */ - if (!mUSIM && networkType == RILConstants.NETWORK_MODE_LTE_GSM_WCDMA) { + if (!mUSIM && networkType == RILConstants.NETWORK_MODE_LTE_GSM_WCDMA && + mSetPreferredNetworkType >= RILConstants.NETWORK_MODE_WCDMA_PREF) { networkType = RILConstants.NETWORK_MODE_WCDMA_PREF; } mSetPreferredNetworkType = networkType; + super.setPreferredNetworkType(networkType, response); } diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java index d393ce4..b8e7029 100644 --- a/telephony/java/com/android/internal/telephony/RIL.java +++ b/telephony/java/com/android/internal/telephony/RIL.java @@ -1862,7 +1862,7 @@ public class RIL extends BaseCommands implements CommandsInterface { if (RILJ_LOGD) riljLog("setCurrentPreferredNetworkType: " + mSetPreferredNetworkType); setPreferredNetworkType(mSetPreferredNetworkType, null); } - private int mSetPreferredNetworkType; + protected int mSetPreferredNetworkType; /** * {@inheritDoc} |