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

Commit 34229656 authored by Sean Midford's avatar Sean Midford Committed by Android (Google) Code Review
Browse files

Merge "Silence SQLiteExceptions thrown by providers" into ub-contactsdialer-h-dev

parents d1b6565f c2deb410
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.content.Context;
import android.content.CursorLoader;
import android.database.Cursor;
import android.database.MergeCursor;
import android.database.sqlite.SQLiteException;
import android.os.Bundle;
import android.provider.ContactsContract.Contacts;

@@ -73,8 +74,9 @@ public class FavoritesAndContactsLoader extends CursorLoader {
        // correctly handles null cursors.
        try {
            return super.loadInBackground();
        } catch (NullPointerException | SecurityException e) {
            // Ignore NPEs and SecurityExceptions thrown by providers

        } catch (NullPointerException | SQLiteException | SecurityException e) {
            // Ignore NPEs, SQLiteExceptions and SecurityExceptions thrown by providers
        }
        return null;
    }