From 5eab2b72afe5b20dc66c237b1cceedfc09de2d52 Mon Sep 17 00:00:00 2001 From: Chris Wren Date: Tue, 16 Jun 2015 13:56:22 -0400 Subject: high-frequency notification stats. Aggregate and then periodically report stats that are high-frequency because they are driven by app behavior, not user behavior. Reuse the NotificationUsageStats facility. Remove redundant stats. Lessen memory foot print. Enable in-memeory aggregates with small, bounded memory footprint. Bug: 20258744 Change-Id: I87e391419c53917fa13c68a56f8cdb40a7c8e548 --- .../src/com/android/server/notification/RankingHelperTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'services/tests') diff --git a/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java b/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java index 3cc04e8..b40fd068 100644 --- a/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java +++ b/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java @@ -15,6 +15,9 @@ */ package com.android.server.notification; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + import android.app.Notification; import android.os.UserHandle; import android.service.notification.StatusBarNotification; @@ -24,6 +27,7 @@ import android.test.suitebuilder.annotation.SmallTest; import java.util.ArrayList; public class RankingHelperTest extends AndroidTestCase { + @Mock NotificationUsageStats mUsageStats; private Notification mNotiGroupGSortA; private Notification mNotiGroupGSortB; @@ -39,9 +43,10 @@ public class RankingHelperTest extends AndroidTestCase { @Override public void setUp() { + MockitoAnnotations.initMocks(this); UserHandle user = UserHandle.ALL; - mHelper = new RankingHelper(getContext(), null, new String[0]); + mHelper = new RankingHelper(getContext(), null, mUsageStats, new String[0]); mNotiGroupGSortA = new Notification.Builder(getContext()) .setContentTitle("A") -- cgit v1.1