OSDN Git Service

Use a more benign icon for ADB notifications.
authorDaniel Sandler <dsandler@google.com>
Thu, 25 Mar 2010 20:02:33 +0000 (16:02 -0400)
committerDaniel Sandler <dsandler@google.com>
Thu, 25 Mar 2010 20:19:53 +0000 (16:19 -0400)
Also suppress vibe & noise for ADB notifications.

Bug: 2544480
Bug: 2545486

Change-Id: I955a7271f47601f9b35f0d3fcd48363370ebd252

core/res/res/drawable-hdpi/stat_sys_adb.png [new file with mode: 0644]
core/res/res/drawable-mdpi/stat_sys_adb.png [new file with mode: 0644]
services/java/com/android/server/NotificationManagerService.java

diff --git a/core/res/res/drawable-hdpi/stat_sys_adb.png b/core/res/res/drawable-hdpi/stat_sys_adb.png
new file mode 100644 (file)
index 0000000..aef8650
Binary files /dev/null and b/core/res/res/drawable-hdpi/stat_sys_adb.png differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_adb.png b/core/res/res/drawable-mdpi/stat_sys_adb.png
new file mode 100644 (file)
index 0000000..12abeda
Binary files /dev/null and b/core/res/res/drawable-mdpi/stat_sys_adb.png differ
index da9232b..3e1adf1 100755 (executable)
@@ -1136,11 +1136,13 @@ class NotificationManagerService extends INotificationManager.Stub
 
                     if (mAdbNotification == null) {
                         mAdbNotification = new Notification();
-                        mAdbNotification.icon = com.android.internal.R.drawable.stat_sys_warning;
+                        mAdbNotification.icon = com.android.internal.R.drawable.stat_sys_adb;
                         mAdbNotification.when = 0;
                         mAdbNotification.flags = Notification.FLAG_ONGOING_EVENT;
                         mAdbNotification.tickerText = title;
-                        mAdbNotification.defaults |= Notification.DEFAULT_SOUND;
+                        mAdbNotification.defaults = 0; // please be quiet
+                        mAdbNotification.sound = null;
+                        mAdbNotification.vibrate = null;
                     }
 
                     Intent intent = new Intent(