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

Commit db8fb7ca authored by Evan Severson's avatar Evan Severson
Browse files

Fix lock contention in AppOpsService

Credit to our partner Samsung for suggesting this fix.

Test: None
Fixes: 181639255
Change-Id: I556ce9caa45e2cbea93fed9c7c27bd16e32ec883
parent 56547bfd
Loading
Loading
Loading
Loading
+15 −16
Original line number Diff line number Diff line
@@ -384,11 +384,10 @@ final class HistoricalRegistry {
                        callback.sendResult(new Bundle());
                        return;
                    }
                }
                mPersistence.collectHistoricalOpsDLocked(result, uid, packageName,
                        attributionTag,
                        opNames, filter, beginTimeMillis, endTimeMillis, flags);

                }
            }
        }

@@ -576,6 +575,7 @@ final class HistoricalRegistry {
                    Slog.e(LOG_TAG, "Interaction before persistence initialized");
                    return;
                }
            }
            final List<HistoricalOps> history = mPersistence.readHistoryDLocked();
            clearHistoricalRegistry();
            if (history != null) {
@@ -591,7 +591,6 @@ final class HistoricalRegistry {
            }
        }
    }
    }

    void addHistoricalOps(HistoricalOps ops) {
        final List<HistoricalOps> pendingWrites;