Merge "Catch SQLiteFullException in AccountManagerService" am: 74d1d270ec

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1733493

Change-Id: I3838767f63eedeab9233c8eb88ce7fa85a865c64
This commit is contained in:
Treehugger Robot
2021-06-21 22:26:04 +00:00
committed by Automerger Merge Worker

View File

@@ -67,6 +67,7 @@ import android.content.pm.ResolveInfo;
import android.content.pm.Signature; import android.content.pm.Signature;
import android.content.pm.UserInfo; import android.content.pm.UserInfo;
import android.database.Cursor; import android.database.Cursor;
import android.database.sqlite.SQLiteFullException;
import android.database.sqlite.SQLiteStatement; import android.database.sqlite.SQLiteStatement;
import android.os.Binder; import android.os.Binder;
import android.os.Bundle; import android.os.Bundle;
@@ -5153,7 +5154,7 @@ public class AccountManagerService
logStatement.bindLong(6, userDebugDbInsertionPoint); logStatement.bindLong(6, userDebugDbInsertionPoint);
try { try {
logStatement.execute(); logStatement.execute();
} catch (IllegalStateException e) { } catch (IllegalStateException | SQLiteFullException e) {
// Guard against crash, DB can already be closed // Guard against crash, DB can already be closed
// since this statement is executed on a handler thread // since this statement is executed on a handler thread
Slog.w(TAG, "Failed to insert a log record. accountId=" + accountId Slog.w(TAG, "Failed to insert a log record. accountId=" + accountId