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

Commit 40cde7b7 authored by Shuo Qian's avatar Shuo Qian Committed by android-build-merger
Browse files

Merge "ECBM SystemProperty cleanup"

am: 47186063

Change-Id: Ie6b43fd0a0bfa7c813960d1bb53b7b57a4f82721
parents 176bfb58 47186063
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -245,8 +245,7 @@ public class GpsNetInitiatedHandler {
    }

    public boolean getInEmergency() {
        boolean isInEmergencyCallback = Boolean.parseBoolean(
                SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
        boolean isInEmergencyCallback = mTelephonyManager.getEmergencyCallbackMode();
        return mIsInEmergency || isInEmergencyCallback;
    }

+28 −0
Original line number Diff line number Diff line
@@ -6170,5 +6170,33 @@ public class TelephonyManager {

        return null;
    }

    /**
     * Check if phone is in emergency callback mode
     * @return true if phone is in emergency callback mode
     * @hide
     */
    public boolean getEmergencyCallbackMode() {
        return getEmergencyCallbackMode(getSubId());
    }

    /**
     * Check if phone is in emergency callback mode
     * @return true if phone is in emergency callback mode
     * @param subId the subscription ID that this action applies to.
     * @hide
     */
    public boolean getEmergencyCallbackMode(int subId) {
        try {
            ITelephony telephony = getITelephony();
            if (telephony == null) {
                return false;
            }
            return telephony.getEmergencyCallbackMode(subId);
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#getEmergencyCallbackMode", e);
        }
        return false;
    }
}
+8 −0
Original line number Diff line number Diff line
@@ -1257,4 +1257,12 @@ interface ITelephony {
     * @param appType the icc application type, like {@link #APPTYPE_USIM}
     */
    String[] getForbiddenPlmns(int subId, int appType);

    /**
     * Check if phone is in emergency callback mode
     * @return true if phone is in emergency callback mode
     * @param subId the subscription ID that this action applies to.
     * @hide
     */
    boolean getEmergencyCallbackMode(int subId);
}