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

Commit cd137a22 authored by Dave Daynard's avatar Dave Daynard Committed by Steve Kondik
Browse files

Allow tablets to send SMS if enabled in device overlays (1/2)

Change-Id: I51771c28415352ee0838fa1507a1461c652d56e8
parent 39b2b7c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public final class SmsDefaultDialog extends AlertActivity implements

    private boolean buildDialog(String packageName) {
        TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
        if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) {
        if (!tm.isSmsCapable()) {
            // No phone, no SMS
            return false;
        }
+3 −3
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ public class WirelessSettings extends RestrictedSettingsFragment

    private boolean isSmsSupported() {
        // Some tablet has sim card but could not do telephony operations. Skip those.
        return (mTm.getPhoneType() != TelephonyManager.PHONE_TYPE_NONE);
        return mTm.isSmsCapable();
    }

    @Override
@@ -377,9 +377,9 @@ public class WirelessSettings extends RestrictedSettingsFragment

        // Enable link to CMAS app settings depending on the value in config.xml.
        PackageManager pm = getPackageManager();
        boolean hasPhoneFeatures = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
        // boolean hasPhoneFeatures = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
        boolean isCellBroadcastAppLinkEnabled = false;
        if (hasPhoneFeatures) {
        if (isSmsSupported()) {
            isCellBroadcastAppLinkEnabled = this.getResources().getBoolean(
                    com.android.internal.R.bool.config_cellBroadcastAppLinks);
            try {