* commit 'd5b8ee9ba48f6b22135abc7ab59b3b971f0d85e0': Allow tablets to send SMS if enabled in device overlays (1/2)
This commit is contained in:
@@ -64,7 +64,7 @@ public final class SmsDefaultDialog extends AlertActivity implements
|
|||||||
|
|
||||||
private boolean buildDialog(String packageName) {
|
private boolean buildDialog(String packageName) {
|
||||||
TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
|
TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) {
|
if (!tm.isSmsCapable()) {
|
||||||
// No phone, no SMS
|
// No phone, no SMS
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -256,7 +256,7 @@ public class WirelessSettings extends RestrictedSettingsFragment
|
|||||||
|
|
||||||
private boolean isSmsSupported() {
|
private boolean isSmsSupported() {
|
||||||
// Some tablet has sim card but could not do telephony operations. Skip those.
|
// Some tablet has sim card but could not do telephony operations. Skip those.
|
||||||
return (mTm.getPhoneType() != TelephonyManager.PHONE_TYPE_NONE);
|
return mTm.isSmsCapable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user