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

Commit 7ef25720 authored by Chienyuan's avatar Chienyuan
Browse files

MAP: Skip invalid message data

Tag: #refactor
Bug: 169938506
Bug: 176943474
Test: manual
Change-Id: Ia9e1abc217edae3a07cd3d51201c1957c0894fdb
parent e18b4ee6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1412,7 +1412,8 @@ public class BluetoothMapContentObserver {
                    do {
                        int idIndex = c.getColumnIndexOrThrow(Sms._ID);
                        if (c.isNull(idIndex)) {
                            throw new IllegalStateException("ID is null");
                            Log.w(TAG, "handleMsgListChangesSms, ID is null");
                            continue;
                        }
                        long id = c.getLong(idIndex);
                        int type = c.getInt(c.getColumnIndex(Sms.TYPE));
@@ -1572,7 +1573,8 @@ public class BluetoothMapContentObserver {
                    do {
                        int idIndex = c.getColumnIndexOrThrow(Mms._ID);
                        if (c.isNull(idIndex)) {
                            throw new IllegalStateException("ID is null");
                            Log.w(TAG, "handleMsgListChangesMms, ID is null");
                            continue;
                        }
                        long id = c.getLong(idIndex);
                        int type = c.getInt(c.getColumnIndex(Mms.MESSAGE_BOX));