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

Commit 103a6b26 authored by Sungsoo Lim's avatar Sungsoo Lim
Browse files

Catch SQLiteException while delete()

Bug: 285476292
Test: atest BluetoothInstrumentationTests:BluetoothMapContentObserverTest
Change-Id: I89ed87a47c60829c0d44b5c91a14639408aca983
parent 804d8083
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -3673,8 +3673,13 @@ public class BluetoothMapContentObserver {
    }

    private void removeDeletedMessages() {
        try {
            /* Remove messages from virtual "deleted" folder (thread_id -1) */
            mResolver.delete(Sms.CONTENT_URI, "thread_id = " + DELETED_THREAD_ID, null);
        } catch (SQLiteException e) {
            // TODO: Include this unexpected exception in Bluetooth metrics
            Log.w("SQLite exception while removing deleted messages.", e);
        }
    }

    private PhoneStateListener mPhoneListener = new PhoneStateListener() {