summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrianoC <adriano.carrata@gmail.com>2012-03-26 21:10:20 +0200
committerrmcc@arcee-kang1 <cyanogenmod@cerqueira.org>2012-03-30 15:11:16 +0100
commite952e69b3177d3324696901a644160d4b24423be (patch)
treeab088bf57429d7b965bae2b54a85d4e61ee94f1f
parent93ca6aca74c6224df945c26498e34c618e695e53 (diff)
downloadframeworks_base-e952e69b3177d3324696901a644160d4b24423be.zip
frameworks_base-e952e69b3177d3324696901a644160d4b24423be.tar.gz
frameworks_base-e952e69b3177d3324696901a644160d4b24423be.tar.bz2
Fix wrong 'USB debugging connected' notify color
Change-Id: I8ad4ce8652325e2e10dd529a934c8928ee0b149c
-rwxr-xr-xservices/java/com/android/server/NotificationManagerService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index a2bfe78..2d3efa0 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -1819,7 +1819,14 @@ public class NotificationManagerService extends INotificationManager.Stub
PendingIntent pi = PendingIntent.getActivity(mContext, 0,
intent, 0);
- mAdbNotification.setLatestEventInfo(mContext, title, message, pi);
+ try {
+ //The service context doesn't contain the style needed to skin the notification in the Status Bar
+ Context c = mContext.createPackageContext("com.android.systemui",Context.CONTEXT_RESTRICTED);
+ mAdbNotification.setLatestEventInfo(c, title, message, pi);
+ } catch(Exception ex) {
+ //Program would NEVER follow this path. If so we use the current context
+ mAdbNotification.setLatestEventInfo(mContext, title, message, pi);
+ }
mAdbNotificationShown = true;
mAdbNotificationIsUsb = !networkEnabled;