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

Commit c51ab837 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Automerger Merge Worker
Browse files

Merge "Update commit/lease failure reasons for atoms logging." into rvc-dev...

Merge "Update commit/lease failure reasons for atoms logging." into rvc-dev am: 6452044f am: d16e46f2

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

Change-Id: I1fd07e5850785773540bef79d5fd34997874934d
parents d8c9bfbb d16e46f2
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -459,6 +459,9 @@ public class BlobStoreManagerService extends SystemService {
        synchronized (mBlobsLock) {
        synchronized (mBlobsLock) {
            final int leasesCount = getLeasedBlobsCountLocked(callingUid, callingPackage);
            final int leasesCount = getLeasedBlobsCountLocked(callingUid, callingPackage);
            if (leasesCount >= getMaxLeasedBlobs()) {
            if (leasesCount >= getMaxLeasedBlobs()) {
                FrameworkStatsLog.write(FrameworkStatsLog.BLOB_LEASED, callingUid,
                        INVALID_BLOB_ID, INVALID_BLOB_SIZE,
                        FrameworkStatsLog.BLOB_LEASED__RESULT__COUNT_LIMIT_EXCEEDED);
                throw new LimitExceededException("Too many leased blobs for the caller: "
                throw new LimitExceededException("Too many leased blobs for the caller: "
                        + leasesCount);
                        + leasesCount);
            }
            }
@@ -691,6 +694,9 @@ public class BlobStoreManagerService extends SystemService {
                        deleteSessionLocked(session);
                        deleteSessionLocked(session);
                        getUserSessionsLocked(UserHandle.getUserId(session.getOwnerUid()))
                        getUserSessionsLocked(UserHandle.getUserId(session.getOwnerUid()))
                                .remove(session.getSessionId());
                                .remove(session.getSessionId());
                        FrameworkStatsLog.write(FrameworkStatsLog.BLOB_COMMITTED,
                                session.getOwnerUid(), session.getSessionId(), session.getSize(),
                                FrameworkStatsLog.BLOB_COMMITTED__RESULT__COUNT_LIMIT_EXCEEDED);
                        break;
                        break;
                    }
                    }
                    final int userId = UserHandle.getUserId(session.getOwnerUid());
                    final int userId = UserHandle.getUserId(session.getOwnerUid());
@@ -725,7 +731,7 @@ public class BlobStoreManagerService extends SystemService {
                        }
                        }
                        Slog.d(TAG, "Error committing the blob: " + session, e);
                        Slog.d(TAG, "Error committing the blob: " + session, e);
                        FrameworkStatsLog.write(FrameworkStatsLog.BLOB_COMMITTED,
                        FrameworkStatsLog.write(FrameworkStatsLog.BLOB_COMMITTED,
                                session.getOwnerUid(), blob.getBlobId(), blob.getSize(),
                                session.getOwnerUid(), session.getSessionId(), blob.getSize(),
                                FrameworkStatsLog.BLOB_COMMITTED__RESULT__ERROR_DURING_COMMIT);
                                FrameworkStatsLog.BLOB_COMMITTED__RESULT__ERROR_DURING_COMMIT);
                        session.sendCommitCallbackResult(COMMIT_RESULT_ERROR);
                        session.sendCommitCallbackResult(COMMIT_RESULT_ERROR);
                        // If the commit fails and this blob data didn't exist before, delete it.
                        // If the commit fails and this blob data didn't exist before, delete it.