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

Commit ef71f605 authored by Jason Monk's avatar Jason Monk
Browse files

Don't crash settings when out of space.

Change-Id: I2e36fe845601558d789f38ae9f70d1a1684d8fd4
Fixes: 28198128
parent 1ec941db
Loading
Loading
Loading
Loading
+29 −24
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.database.DatabaseUtils;
import android.database.MergeCursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteFullException;
import android.net.Uri;
import android.os.AsyncTask;
import android.provider.SearchIndexableData;
@@ -1194,6 +1195,7 @@ public class Index {

        @Override
        protected Void doInBackground(UpdateData... params) {
            try {
                final List<SearchIndexableData> dataToUpdate = params[0].dataToUpdate;
                final List<SearchIndexableData> dataToDelete = params[0].dataToDelete;
                final Map<String, List<String>> nonIndexableKeys = params[0].nonIndexableKeys;
@@ -1224,6 +1226,9 @@ public class Index {
                if (fullIndex) {
                    IndexDatabaseHelper.setLocaleIndexed(mContext, localeStr);
                }
            } catch (SQLiteFullException e) {
                Log.e(LOG_TAG, "Unable to index search, out of space", e);
            }

            return null;
        }