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

Commit 6d8c5edb authored by Jay Shrauner's avatar Jay Shrauner Committed by Android Git Automerger
Browse files

am 5413fd74: Merge "Handle SQLiteFullExceptions" into lmp-mr1-dev

* commit '5413fd74':
  Handle SQLiteFullExceptions
parents 22f63740 5413fd74
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Intent;
import android.content.Loader;
import android.content.res.Resources;
import android.database.Cursor;
import android.database.sqlite.SQLiteFullException;
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
@@ -31,6 +32,7 @@ import android.provider.ContactsContract.PhoneLookup;
import android.telecom.PhoneAccountHandle;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.AccessibilityDelegate;
@@ -69,6 +71,7 @@ import java.util.LinkedList;
 */
public class CallLogAdapter extends GroupingListAdapter
        implements ViewTreeObserver.OnPreDrawListener, CallLogGroupBuilder.GroupCreator {
    private static final String TAG = CallLogAdapter.class.getSimpleName();

    private static final int VOICEMAIL_TRANSCRIPTION_MAX_LINES = 10;

@@ -1183,6 +1186,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",
@@ -1192,6 +1196,9 @@ public class CallLogAdapter extends GroupingListAdapter
                        Calls.NUMBER + " = ? AND " + Calls.COUNTRY_ISO + " = ?",
                        new String[]{ number, countryIso });
            }
        } catch (SQLiteFullException e) {
            Log.e(TAG, "Unable to update contact info in call log db", e);
        }
    }

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