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

Commit b3c5a616 authored by Pawit Pornkitprasan's avatar Pawit Pornkitprasan
Browse files

TelephonyManager: isSmsCapable: respect telephony properties

The 2 telephony properties override if SMS send/receive is enabled
in the telephony code. Also respect them for the isSmsCapable API.

Use case: Acer A700/701 (Wi-Fi only/3G) share the same build

Change-Id: Iaa1b45c62fa5a48a4c4a222d5e47980dd1678d48
parent c875f23e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1401,6 +1401,10 @@ public class TelephonyManager {
     * @hide pending API review
     */
    public boolean isSmsCapable() {
        if (!SystemProperties.getBoolean(TelephonyProperties.PROPERTY_SMS_RECEIVE, true)
                && !SystemProperties.getBoolean(TelephonyProperties.PROPERTY_SMS_SEND, true)) {
            return false;
        }
        if (mContext == null) return true;
        return mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_sms_capable);