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

Commit 418a1071 authored by Vlad Popa's avatar Vlad Popa
Browse files

CSD: Quick fix for dose record sanitization

Test: trivial
Bug: 321299221
Change-Id: Iff3fdc42510556294486254e3d395dfdd760b4b7
parent f1e1be0f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1203,7 +1203,7 @@ public class SoundDoseHelper {
    @GuardedBy("mCsdStateLock")
    private void sanitizeDoseRecords_l() {
        if (mDoseRecords.size() > MAX_NUMBER_OF_CACHED_RECORDS) {
            int nrToRemove = MAX_NUMBER_OF_CACHED_RECORDS - mDoseRecords.size();
            int nrToRemove = mDoseRecords.size() - MAX_NUMBER_OF_CACHED_RECORDS;
            Log.w(TAG,
                    "Removing " + nrToRemove + " records from the total of " + mDoseRecords.size());
            // Remove older elements to fit into persisted settings max length