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

Commit 6792a233 authored by Junda Liu's avatar Junda Liu Committed by Android (Google) Code Review
Browse files

Merge "Add calculatePreferredNetworkType to TelephonyManager."

parents 66c67471 1365703d
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -2755,6 +2755,25 @@ public class TelephonyManager {
        }
    }

    /**
     * Get the calculated preferred network type.
     * Used for debugging incorrect network type.
     *
     * @return the preferred network type, defined in RILConstants.java or -1 if
     *         none available.
     * @hide
     */
    public int getCalculatedPreferredNetworkType() {
        try {
            return getITelephony().getCalculatedPreferredNetworkType();
        } catch (RemoteException ex) {
            Rlog.e(TAG, "getCalculatedPreferredNetworkType RemoteException", ex);
        } catch (NullPointerException ex) {
            Rlog.e(TAG, "getCalculatedPreferredNetworkType NPE", ex);
        }
        return -1;
    }

    /**
     * Get the preferred network type.
     * Used for device configuration by some CDMA operators.
+8 −0
Original line number Diff line number Diff line
@@ -583,6 +583,14 @@ interface ITelephony {
     */
    boolean nvResetConfig(int resetType);

    /*
     * Get the calculated preferred network type.
     * Used for device configuration by some CDMA operators.
     *
     * @return the calculated preferred network type, defined in RILConstants.java.
     */
    int getCalculatedPreferredNetworkType();

    /*
     * Get the preferred network type.
     * Used for device configuration by some CDMA operators.