From 68c3c7518e132bdbfd17a0b122fbe09c08e0acdc Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Sun, 23 Aug 2009 12:51:17 -0700 Subject: [PATCH] Use LED for notification (same parameters as Gmail and GTalk services) * Agreed to by Erick and Prasenjit Change-Id: I1a0f3642c9b10f981b2feed55762407ed853763d --- src/com/android/email/service/MailService.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/com/android/email/service/MailService.java b/src/com/android/email/service/MailService.java index 0a51c1c86..caec0089c 100644 --- a/src/com/android/email/service/MailService.java +++ b/src/com/android/email/service/MailService.java @@ -578,9 +578,16 @@ public class MailService extends Service { pending); notification.sound = ringtone; - notification.defaults = vibrate - ? Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE - : Notification.DEFAULT_LIGHTS; + // Use same code here as in Gmail and GTalk for vibration + if (vibrate) { + notification.defaults |= Notification.DEFAULT_VIBRATE; + } + + // This code is identical to that used by Gmail and GTalk for notifications + notification.flags |= Notification.FLAG_SHOW_LIGHTS; + notification.ledARGB = 0xff00ff00; + notification.ledOnMS = 500; + notification.ledOffMS = 2000; NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);