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

Commit 41fe1b96 authored by Kouji Shiotani's avatar Kouji Shiotani Committed by android-build-merger
Browse files

Merge "Fix wrong array index bound in NotificationUsageStats" am: 87e893a4...

Merge "Fix wrong array index bound in NotificationUsageStats" am: 87e893a4 am: 1249e0a1 am: 03f4ddb1
am: 41369279

Change-Id: I067a46e3c4937c5cc3713d1f4080975ff8aa3698
parents 430ac2cb 41369279
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import org.json.JSONException;
import org.json.JSONObject;

import java.io.PrintWriter;
import java.lang.Math;
import java.util.ArrayDeque;
import java.util.Calendar;
import java.util.GregorianCalendar;
@@ -748,7 +749,7 @@ public class NotificationUsageStats {
        }

        void increment(int imp) {
            imp = imp < 0 ? 0 : imp > NUM_IMPORTANCES ? NUM_IMPORTANCES : imp;
            imp = Math.max(0, Math.min(imp, mCount.length - 1));
            mCount[imp]++;
        }