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

Commit 03f4ddb1 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

am: 1249e0a1

Change-Id: I962bd3c6dee3d635c6f5b56f2141e8f785fa4cfb
parents bc4dc428 1249e0a1
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;
@@ -718,7 +719,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]++;
        }