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

Commit b5fa771f authored by Sneh Bansal's avatar Sneh Bansal Committed by Susheel nyamala
Browse files

Add extra data to auto network selection message.

If device is already in auto mode, and choose network automatically
option is selected, then network selection complete message is sent to the
application, which triggered the request, without sending the request
to RIL. On the app side, it is not known whether the request was
actually sent to RIL or not.

Add information to the message so that application knows if the request
has been sent to RIL or not.

Change-Id: Ieb5d87041aab2929c4478cb9139abc555114bbeb
Bug-Id: 37200906
parent 30fe8470
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -224,6 +224,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
    // Key used to read/write "disable DNS server check" pref (used for testing)
    private static final String DNS_SERVER_CHECK_DISABLED_KEY = "dns_server_check_disabled_key";

    // Integer used to let the calling application know that the we are ignoring auto mode switch.
    private static final int ALREADY_IN_AUTO_SELECTION = 1;

    /**
     * Small container class used to hold information relevant to
     * the carrier selection process. operatorNumeric can be ""
@@ -1175,6 +1178,11 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
            mCi.setNetworkSelectionModeAutomatic(msg);
        } else {
            Rlog.d(LOG_TAG, "setNetworkSelectionModeAutomatic - already auto, ignoring");
            // let the calling application know that the we are ignoring automatic mode switch.
            if (nsm.message != null) {
                nsm.message.arg1 = ALREADY_IN_AUTO_SELECTION;
            }

            ar.userObj = nsm;
            handleSetSelectNetwork(ar);
        }