mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 14:45:08 +00:00
Potentially fix SMS/MMS access on Samsung devices
According to some information I stumbled across while working on a different issue, Samsung devices do not support the content provider I was using to populate the list of SMS conversations. This is very annoying, but nevertheless there appears to be a workaround. BUG: 401677 Many users with Samsung devices have reported problems using the SMS plugin. Hopefully this will fix the SMS plugin on Samsung devices.
This commit is contained in:
@@ -106,6 +106,13 @@ public class SMSHelper {
|
|||||||
private static Uri getConversationUri() {
|
private static Uri getConversationUri() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
return Telephony.MmsSms.CONTENT_CONVERSATIONS_URI;
|
return Telephony.MmsSms.CONTENT_CONVERSATIONS_URI;
|
||||||
|
} else if ("Samsung".equals(Build.MANUFACTURER)){
|
||||||
|
// For some presumably asinine reason, Samsung devices do not support the regular SmsMms column.
|
||||||
|
// However, according to https://stackoverflow.com/a/13640868/3723163, we can work around it this way.
|
||||||
|
// By my understanding, "simple=true" means we can't support multi-target messages.
|
||||||
|
// Go complain to Samsung about their crappy OS changes!
|
||||||
|
Log.i("SMSHelper", "Samsung compatibility mode enabled. This may cause some features to not work properly.");
|
||||||
|
return Uri.parse("content://mms-sms/conversations?simple=true");
|
||||||
} else {
|
} else {
|
||||||
// As with getSMSUriBad, this is potentially unsafe depending on whether a specific
|
// As with getSMSUriBad, this is potentially unsafe depending on whether a specific
|
||||||
// manufacturer decided to do their own thing
|
// manufacturer decided to do their own thing
|
||||||
|
Reference in New Issue
Block a user