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

Commit 94be4d2e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "CSD: Quick fix for dose record sanitization" into main

parents 2167b765 418a1071
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