diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 415de5b..8eacc32 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -43,6 +43,7 @@
 import android.os.ServiceManager;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.os.storage.StorageManager;
 import android.preference.Preference;
 import android.preference.PreferenceFragment;
 import android.preference.PreferenceManager;
@@ -532,7 +533,12 @@
         getFragmentManager().addOnBackStackChangedListener(this);
 
         if (mIsShowingDashboard) {
-            Index.getInstance(getApplicationContext()).update();
+            // Run the Index update only if we have some space
+            if (!Utils.isLowStorage(this)) {
+                Index.getInstance(getApplicationContext()).update();
+            } else {
+                Log.w(LOG_TAG, "Cannot update the Indexer as we are running low on storage space!");
+            }
         }
 
         if (savedState != null) {
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 9257c30..5a2618e 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -52,6 +52,7 @@
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.os.storage.StorageManager;
 import android.preference.Preference;
 import android.preference.PreferenceFrameLayout;
 import android.preference.PreferenceGroup;
@@ -1071,4 +1072,15 @@
         return inflater.inflate(resId, parent, false);
     }
 
+    /**
+     * Return if we are running low on storage space or not.
+     *
+     * @param context The context
+     * @return true if we are running low on storage space
+     */
+    public static boolean isLowStorage(Context context) {
+        final StorageManager sm = StorageManager.from(context);
+        return (sm.getStorageBytesUntilLow(context.getFilesDir()) < 0);
+    }
+
 }
diff --git a/src/com/android/settings/search/Index.java b/src/com/android/settings/search/Index.java
index 5dbf24f..267c6c0 100644
--- a/src/com/android/settings/search/Index.java
+++ b/src/com/android/settings/search/Index.java
@@ -30,6 +30,7 @@
 import android.database.DatabaseUtils;
 import android.database.MergeCursor;
 import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteException;
 import android.net.Uri;
 import android.os.AsyncTask;
 import android.provider.SearchIndexableData;
@@ -501,7 +502,12 @@
     }
 
     private SQLiteDatabase getWritableDatabase() {
-        return IndexDatabaseHelper.getInstance(mContext).getWritableDatabase();
+        try {
+            return IndexDatabaseHelper.getInstance(mContext).getWritableDatabase();
+        } catch (SQLiteException e) {
+            Log.e(LOG_TAG, "Cannot open writable database", e);
+            return null;
+        }
     }
 
     private static Uri buildUriForXmlResources(String authority) {
@@ -1172,6 +1178,10 @@
             final boolean forceUpdate = params[0].forceUpdate;
 
             final SQLiteDatabase database = getWritableDatabase();
+            if (database == null) {
+                Log.e(LOG_TAG, "Cannot update Index as I cannot get a writable database");
+                return null;
+            }
             final String localeStr = Locale.getDefault().toString();
 
             try {
@@ -1292,8 +1302,12 @@
             values.put(IndexDatabaseHelper.SavedQueriesColums.TIME_STAMP, now);
 
             final SQLiteDatabase database = getWritableDatabase();
+            if (database == null) {
+                Log.e(LOG_TAG, "Cannot save Search queries as I cannot get a writable database");
+                return -1L;
+            }
 
-            long lastInsertedRowId = -1;
+            long lastInsertedRowId = -1L;
             try {
                 // First, delete all saved queries that are the same
                 database.delete(Tables.TABLE_SAVED_QUERIES,
