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

Commit 67720d84 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Expose Searching Status" am: 11485b80 am: 80987377 am: d421d17d

Change-Id: Ic41f57dcedd1eca1d6bff89bac8f33ff7ff1442d
parents 0d506559 d421d17d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45716,6 +45716,7 @@ package android.telephony {
    method public String getOperatorNumeric();
    method public boolean getRoaming();
    method public int getState();
    method public boolean isSearching();
    method public void setIsManualSelection(boolean);
    method public void setOperatorName(String, String, String);
    method public void setRoaming(boolean);
+23 −0
Original line number Diff line number Diff line
@@ -2044,4 +2044,27 @@ public class ServiceState implements Parcelable {
    public boolean isIwlanPreferred() {
        return mIsIwlanPreferred;
    }
     /**
     * @return {@code true}Returns True whenever the modem is searching for service.
     * To check both CS and PS domain
     */

    public boolean isSearching() {
        NetworkRegistrationInfo psRegState = getNetworkRegistrationInfo(
                NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);

        if (psRegState != null && psRegState.getRegistrationState()
                == NetworkRegistrationInfo.REGISTRATION_STATE_NOT_REGISTERED_SEARCHING) {
            return true;
        }

        NetworkRegistrationInfo csRegState = getNetworkRegistrationInfo(
                NetworkRegistrationInfo.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN);

        if (csRegState != null && csRegState.getRegistrationState()
                == NetworkRegistrationInfo.REGISTRATION_STATE_NOT_REGISTERED_SEARCHING) {
            return true;
        }
        return false;
    }
}