Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df3c4b45 authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am ee38808d: am 0dc8618d: Do not start RILReceiver if wifi-only.

* commit 'ee38808d':
  Do not start RILReceiver if wifi-only.
parents b5b85a94 ee38808d
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -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,6 +656,13 @@ public final class RIL extends BaseCommands implements CommandsInterface {
        Looper looper = mSenderThread.getLooper();
        mSender = new RILSender(looper);

        // 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();
@@ -663,6 +672,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
            filter.addAction(Intent.ACTION_SCREEN_OFF);
            context.registerReceiver(mIntentReceiver, filter);
        }
    }

    //***** CommandsInterface implementation