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

Commit aab8fae3 authored by kaiyiz's avatar kaiyiz Committed by emancebo
Browse files

Catch the SQLiteFullException when updaing the call log database

SQLiteFullException happened when updating the call log database.

so catch the SQLiteFullException.

CRs-Fixed: 590692
Change-Id: I7ca093bbcae17852729ba5517676b9e801807962
parent 70357308
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor;
import android.database.sqlite.SQLiteFullException;
import android.net.Uri;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract.PhoneLookup;
@@ -504,6 +505,7 @@ public class CallLogAdapter extends GroupingListAdapter

        if (!needsUpdate) return;

        try {
            if (countryIso == null) {
                mContext.getContentResolver().update(Calls.CONTENT_URI_WITH_VOICEMAIL, values,
                        Calls.NUMBER + " = ? AND " + Calls.COUNTRY_ISO + " IS NULL",
@@ -513,6 +515,9 @@ public class CallLogAdapter extends GroupingListAdapter
                        Calls.NUMBER + " = ? AND " + Calls.COUNTRY_ISO + " = ?",
                        new String[]{ number, countryIso });
            }
        } catch (SQLiteFullException e) {
            e.printStackTrace();
        }
    }

    /** Returns the contact information as stored in the call log. */