summaryrefslogtreecommitdiffstats
path: root/services/tests
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2015-06-16 13:56:22 -0400
committerChris Wren <cwren@android.com>2015-06-17 11:42:45 -0400
commit5eab2b72afe5b20dc66c237b1cceedfc09de2d52 (patch)
treeb00c7658f7e70c25cddf75b55bc9bb730eb2ebfe /services/tests
parent1a5dad867419e76928c84f0f4fdc4feacce43bbd (diff)
downloadframeworks_base-5eab2b72afe5b20dc66c237b1cceedfc09de2d52.zip
frameworks_base-5eab2b72afe5b20dc66c237b1cceedfc09de2d52.tar.gz
frameworks_base-5eab2b72afe5b20dc66c237b1cceedfc09de2d52.tar.bz2
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
Diffstat (limited to 'services/tests')
-rw-r--r--services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java7
1 files changed, 6 insertions, 1 deletions
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")