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

Commit 24488e01 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "MAP: Throw exception for illegal ID column" am: c0f57758 am: 8d73d47e

Change-Id: I35cb847233e14429b6d1dbd4711f0a73539a0dc9
parents 830dd0e3 8d73d47e
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -1410,7 +1410,11 @@ public class BluetoothMapContentObserver {
            try {
                if (c != null && c.moveToFirst()) {
                    do {
                        long id = c.getLong(c.getColumnIndex(Sms._ID));
                        int idIndex = c.getColumnIndexOrThrow(Sms._ID);
                        if (c.isNull(idIndex)) {
                            throw new IllegalStateException("ID is null");
                        }
                        long id = c.getLong(idIndex);
                        int type = c.getInt(c.getColumnIndex(Sms.TYPE));
                        int threadId = c.getInt(c.getColumnIndex(Sms.THREAD_ID));
                        int read = c.getInt(c.getColumnIndex(Sms.READ));
@@ -1526,8 +1530,6 @@ public class BluetoothMapContentObserver {
                        }
                    } while (c.moveToNext());
                }
            } catch (IllegalStateException e) {
                Log.w(TAG, e);
            } finally {
                if (c != null) {
                    c.close();
@@ -1568,7 +1570,11 @@ public class BluetoothMapContentObserver {
            try {
                if (c != null && c.moveToFirst()) {
                    do {
                        long id = c.getLong(c.getColumnIndex(Mms._ID));
                        int idIndex = c.getColumnIndexOrThrow(Mms._ID);
                        if (c.isNull(idIndex)) {
                            throw new IllegalStateException("ID is null");
                        }
                        long id = c.getLong(idIndex);
                        int type = c.getInt(c.getColumnIndex(Mms.MESSAGE_BOX));
                        int mtype = c.getInt(c.getColumnIndex(Mms.MESSAGE_TYPE));
                        int threadId = c.getInt(c.getColumnIndex(Mms.THREAD_ID));
@@ -1697,8 +1703,6 @@ public class BluetoothMapContentObserver {
                    } while (c.moveToNext());

                }
            } catch (IllegalStateException e) {
                Log.w(TAG, e);
            } finally {
                if (c != null) {
                    c.close();