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

Commit e03114f9 authored by Tetsutoki Shiozawa's avatar Tetsutoki Shiozawa Committed by android-build-merger
Browse files

Merge "Fix: AccountManagerService crashed by accessing closed db" am: 6ac8f42d am: 741736ca

am: 200a65be

Change-Id: I621615c79bce6fea56072dde03a41d4f7c2ce5c0
parents 26b78bc9 200a65be
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -5101,10 +5101,18 @@ public class AccountManagerService
                logStatement.bindLong(4, callingUid);
                logStatement.bindString(5, tableName);
                logStatement.bindLong(6, userDebugDbInsertionPoint);
                try {
                    logStatement.execute();
                } catch (IllegalStateException 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
                            + " action=" + action + " tableName=" + tableName + " Error: " + e);
                } finally {
                    logStatement.clearBindings();
                }
            }
        }

        LogRecordTask logTask = new LogRecordTask(action, tableName, accountId, userAccount,
                callingUid, userAccount.debugDbInsertionPoint);