Cleanup SmsDatabase

This commit is contained in:
Andrew 2024-02-18 02:22:57 +10:30
parent 403058c5cf
commit 4ead21cf1a

View File

@ -498,22 +498,18 @@ public class SmsDatabase extends MessagingDatabase {
} }
private long getCallMessageTypeMask(CallMessageType callMessageType) { private long getCallMessageTypeMask(CallMessageType callMessageType) {
long typeMask = 0;
switch (callMessageType) { switch (callMessageType) {
case CALL_OUTGOING: case CALL_OUTGOING:
typeMask = Types.OUTGOING_CALL_TYPE; return Types.OUTGOING_CALL_TYPE;
break;
case CALL_INCOMING: case CALL_INCOMING:
typeMask = Types.INCOMING_CALL_TYPE; return Types.INCOMING_CALL_TYPE;
break;
case CALL_MISSED: case CALL_MISSED:
typeMask = Types.MISSED_CALL_TYPE; return Types.MISSED_CALL_TYPE;
break;
case CALL_FIRST_MISSED: case CALL_FIRST_MISSED:
typeMask = Types.FIRST_MISSED_CALL_TYPE; return Types.FIRST_MISSED_CALL_TYPE;
break; default:
return 0;
} }
return typeMask;
} }
public Optional<InsertResult> insertMessageInbox(IncomingTextMessage message, boolean runThreadUpdate) { public Optional<InsertResult> insertMessageInbox(IncomingTextMessage message, boolean runThreadUpdate) {