diff options
author | Wink Saville <wink@google.com> | 2011-02-24 10:52:53 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-02-24 10:52:53 -0800 |
commit | df3c4b45c85cc33e83f2d37cd34752493b334d12 (patch) | |
tree | 884cea5033d0cc02dc08453069a7c63c684277d8 /telephony | |
parent | b5b85a9416afc139426ddcdc3437a30739256ea2 (diff) | |
parent | ee38808dcca92fa8677e7d03401f6bb7b54ec781 (diff) | |
download | frameworks_base-df3c4b45c85cc33e83f2d37cd34752493b334d12.zip frameworks_base-df3c4b45c85cc33e83f2d37cd34752493b334d12.tar.gz frameworks_base-df3c4b45c85cc33e83f2d37cd34752493b334d12.tar.bz2 |
am ee38808d: am 0dc8618d: Do not start RILReceiver if wifi-only.
* commit 'ee38808dcca92fa8677e7d03401f6bb7b54ec781':
Do not start RILReceiver if wifi-only.
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/RIL.java | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java index bccb219..804ace4 100644 --- a/telephony/java/com/android/internal/telephony/RIL.java +++ b/telephony/java/com/android/internal/telephony/RIL.java @@ -244,6 +244,8 @@ public final class RIL extends BaseCommands implements CommandsInterface { Object mLastNITZTimeInfo; + private static final String WIFI_ONLY_CARRIER = "wifi-only"; + //***** Events static final int EVENT_SEND = 1; @@ -654,14 +656,22 @@ public final class RIL extends BaseCommands implements CommandsInterface { Looper looper = mSenderThread.getLooper(); mSender = new RILSender(looper); - mReceiver = new RILReceiver(); - mReceiverThread = new Thread(mReceiver, "RILReceiver"); - mReceiverThread.start(); - - IntentFilter filter = new IntentFilter(); - filter.addAction(Intent.ACTION_SCREEN_ON); - filter.addAction(Intent.ACTION_SCREEN_OFF); - context.registerReceiver(mIntentReceiver, filter); + // TODO: Provide a common API for determining if a + // device is wifi-only. bug: 3480713 + String carrier = SystemProperties.get("ro.carrier"); + if (WIFI_ONLY_CARRIER.equals(carrier)) { + riljLog("Not starting RILReceiver: wifi-only"); + } else { + riljLog("Starting RILReceiver"); + mReceiver = new RILReceiver(); + mReceiverThread = new Thread(mReceiver, "RILReceiver"); + mReceiverThread.start(); + + IntentFilter filter = new IntentFilter(); + filter.addAction(Intent.ACTION_SCREEN_ON); + filter.addAction(Intent.ACTION_SCREEN_OFF); + context.registerReceiver(mIntentReceiver, filter); + } } //***** CommandsInterface implementation |