Catch SQLiteFullException in AccountManagerService

Bug:190638634
Test: Manual
Change-Id: I6ca088995d8a9af13ae6085953706ba21d09acae
Signed-off-by: huyuxin <huyuxin@xiaomi.com>
This commit is contained in:
huyuxin
2021-05-27 17:15:24 +08:00
committed by Yuxin Hu
parent 842af18352
commit f5ea4604b8

View File

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