summaryrefslogtreecommitdiffstats
path: root/services/core/java
diff options
context:
space:
mode:
authorChristoph Studer <chstuder@google.com>2014-03-21 13:10:21 +0100
committerChristoph Studer <chstuder@google.com>2014-04-07 14:52:17 -0400
commit760ea554d0022fd88bbe13e3ef7c75cbe8613af6 (patch)
tree8d867287b61f46dfa2e9ee54ee876df0a9c55435 /services/core/java
parent012785d8cbaadb4041707af350e122ad29d22151 (diff)
downloadframeworks_base-760ea554d0022fd88bbe13e3ef7c75cbe8613af6.zip
frameworks_base-760ea554d0022fd88bbe13e3ef7c75cbe8613af6.tar.gz
frameworks_base-760ea554d0022fd88bbe13e3ef7c75cbe8613af6.tar.bz2
Write eventlog entries for notification panel visibility
Change-Id: Ie7e15ed15739cb5f057c900e1cadf90824b2b4ef
Diffstat (limited to 'services/core/java')
-rw-r--r--services/core/java/com/android/server/EventLogTags.logtags6
-rw-r--r--services/core/java/com/android/server/notification/NotificationDelegate.java1
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java6
-rw-r--r--services/core/java/com/android/server/statusbar/StatusBarManagerService.java11
4 files changed, 23 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/EventLogTags.logtags b/services/core/java/com/android/server/EventLogTags.logtags
index 0f78c9b..9768934 100644
--- a/services/core/java/com/android/server/EventLogTags.logtags
+++ b/services/core/java/com/android/server/EventLogTags.logtags
@@ -58,7 +58,11 @@ option java_package com.android.server
2751 notification_cancel (uid|1|5),(pid|1|5),(pkg|3),(id|1|5),(tag|3),(userid|1|5),(required_flags|1),(forbidden_flags|1),(reason|1|5),(listener|3)
# when someone tries to cancel all of the notifications for a particular package
2752 notification_cancel_all (uid|1|5),(pid|1|5),(pkg|3),(userid|1|5),(required_flags|1),(forbidden_flags|1),(reason|1|5),(listener|3)
-
+# when the notification panel is shown
+# Note: New tag range starts here since 2753+ have been used below.
+27500 notification_panel_revealed
+# when the notification panel is hidden
+27501 notification_panel_hidden
# ---------------------------
# Watchdog.java
diff --git a/services/core/java/com/android/server/notification/NotificationDelegate.java b/services/core/java/com/android/server/notification/NotificationDelegate.java
index 4c8dcc3..e0591a2 100644
--- a/services/core/java/com/android/server/notification/NotificationDelegate.java
+++ b/services/core/java/com/android/server/notification/NotificationDelegate.java
@@ -29,5 +29,6 @@ public interface NotificationDelegate {
String pkg, String tag, int id,
int uid, int initialPid, String message, int userId);
void onPanelRevealed();
+ void onPanelHidden();
boolean allowDisable(int what, IBinder token, String pkg);
}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 3b6d288..f9411a4 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -966,6 +966,7 @@ public class NotificationManagerService extends SystemService {
@Override
public void onPanelRevealed() {
+ EventLogTags.writeNotificationPanelRevealed();
synchronized (mNotificationList) {
// sound
mSoundNotification = null;
@@ -998,6 +999,11 @@ public class NotificationManagerService extends SystemService {
}
@Override
+ public void onPanelHidden() {
+ EventLogTags.writeNotificationPanelHidden();
+ }
+
+ @Override
public void onNotificationError(int callingUid, int callingPid, String pkg, String tag, int id,
int uid, int initialPid, String message, int userId) {
Slog.d(TAG, "onNotification error pkg=" + pkg + " tag=" + tag + " id=" + id
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index 4ce02c1..e4b5f3a 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -535,6 +535,17 @@ public class StatusBarManagerService extends IStatusBarService.Stub
}
@Override
+ public void onPanelHidden() throws RemoteException {
+ enforceStatusBarService();
+ long identity = Binder.clearCallingIdentity();
+ try {
+ mNotificationDelegate.onPanelHidden();
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @Override
public void onNotificationClick(String pkg, String tag, int id, int userId) {
enforceStatusBarService();
final int callingUid = Binder.getCallingUid();