Skip to content

Commit 4b0902f

Browse files
Fix SMS and Dialing on Android multi-mode devices (e.g., Galaxy Fold).
This change decouples telephony capabilities from the form factor check (`isTablet`). Previously, `canDial()` returned `false` if `isTablet()` was true, which caused `getSMSSupport()` to return `SMS_NOT_SUPPORTED` on large-screen devices even if they had telephony hardware (like the Galaxy Fold). Changes: - Override `canDial()` in `AndroidImplementation` to explicitly check for `PackageManager.FEATURE_TELEPHONY`. - This ensures `getSMSSupport()` returns `SMS_INTERACTIVE` on all devices with telephony hardware, regardless of screen size. - `isTablet()` remains based on screen layout size to preserve correct UI behavior.
1 parent a5c39f0 commit 4b0902f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2954,6 +2954,14 @@ private boolean isEmulator() {
29542954
}
29552955

29562956

2957+
/**
2958+
* @inheritDoc
2959+
*/
2960+
@Override
2961+
public boolean canDial() {
2962+
return getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
2963+
}
2964+
29572965
/**
29582966
* @inheritDoc
29592967
*/

0 commit comments

Comments
 (0)