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

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

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

* commit '0dc8618d':
  Do not start RILReceiver if wifi-only.
parents 3905bc6c 0dc8618d
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;
@@ -656,6 +658,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();
@@ -665,6 +674,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
            filter.addAction(Intent.ACTION_SCREEN_OFF);
            context.registerReceiver(mIntentReceiver, filter);
        }
    }

    //***** CommandsInterface implementation