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

Commit a9051d32 authored by muzbit.kim's avatar muzbit.kim Committed by Steve Kondik
Browse files

Add handling SQLiteDatabaseCorruptException.



When SQLiteDatabaseCorruptException occurred on execute() or executeForString(),
DefaultDatabaseErrorHandler.onCorrupt() is not to be called.
So, Malformed DB file can't be deleted.
Because, Instead SQLiteDatabaseCorruptException, code is throwing SQLiteException.
On boot time, system can't open DB file and it throws RuntimeException.
This causes infinite reset.
So, I modified to throw SQLiteDatabaseCorruptException.

Change-Id: I125b69d62acc4c0690b8dd17d4e14b49be141095
Signed-off-by: default avatarmuzbit.kim <muzbit.kim@lge.com>
parent c34a41e5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -387,6 +387,8 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
            } finally {
                execute(success ? "COMMIT" : "ROLLBACK", null, null);
            }
        } catch (SQLiteDatabaseCorruptException ex) {
            throw ex;
        } catch (RuntimeException ex) {
            throw new SQLiteException("Failed to change locale for db '" + mConfiguration.label
                    + "' to '" + newLocale + "'.", ex);