diff options
author | Pedlar <pedlar88@gmail.com> | 2010-08-12 04:43:14 -0400 |
---|---|---|
committer | Pedlar <pedlar88@gmail.com> | 2010-08-12 04:49:46 -0400 |
commit | 6453bd8a34dd7a877c40c766bed7ba16654e7761 (patch) | |
tree | 0084b79d27b6a34315eb01e36c9f0e5355ebf98c /services/java/com/android | |
parent | e80fc32dd7e9ba6ef7fbe6a3e817a21e7b3961b9 (diff) | |
download | frameworks_base-6453bd8a34dd7a877c40c766bed7ba16654e7761.zip frameworks_base-6453bd8a34dd7a877c40c766bed7ba16654e7761.tar.gz frameworks_base-6453bd8a34dd7a877c40c766bed7ba16654e7761.tar.bz2 |
fixing build issue with Blend. made code more simple
Diffstat (limited to 'services/java/com/android')
-rwxr-xr-x | services/java/com/android/server/NotificationManagerService.java | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 27af8cc..26c601c 100755 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -1273,28 +1273,16 @@ class NotificationManagerService extends INotificationManager.Stub } else if(mBlendColor == 1) { // Blend lights: Credit to eshabtai for the application of this. ledARGB = 0; for (int n=0; n < mLights.size(); n++) { - int x = 0; - boolean found = false; long pkgcolor = Color.parseColor("white"); - for(x = 0; x < mPackages.length; x++) { - mPackageInfo = getPackageInfo(mPackages[x]); - if(mPackageInfo == null) { - continue; - } - if(mPackageInfo[0].matches(mLights.get(n).pkg)) { - if(mPackageInfo[1].equals("random")) { - Random generator = new Random(); - int j = generator.nextInt(colorList.length - 1); - pkgcolor = Color.parseColor(colorList[j]); - } else { - pkgcolor = Color.parseColor(mPackageInfo[1]); - } - found = true; - break; - } - } - if(found) { - ledARGB |= pkgcolor; + mPackageInfo = findPackage(mLights.get(n).pkg); + if(mPackageInfo != null) { + if(mPackageInfo[1].equals("random")) { + Random generator = new Random(); + int j = generator.nextInt(colorList.length - 1); + ledARGB |= Color.parseColor(colorList[j]); + } else { + ledARGB |= Color.parseColor(mPackageInfo[1]); + } } else if ((mLights.get(n).notification.defaults & Notification.DEFAULT_LIGHTS) != 0) { ledARGB |= mLights.get(n).notification.ledARGB; } |