OSDN Git Service

lights: Automatically generate an LED color for notifications
authorSteve Kondik <steve@cyngn.com>
Thu, 24 Sep 2015 18:27:59 +0000 (11:27 -0700)
committerSteve Kondik <steve@cyngn.com>
Wed, 5 Oct 2016 11:38:59 +0000 (04:38 -0700)
commit33086de92a6d1a06e0203ba17de6fe74f5d7a413
tree01d3ee4b76eb8cea295b415fa43ccd843a9bc471
parenteb63c6de916c679d8f4273aeb33a3322ee0e412d
lights: Automatically generate an LED color for notifications

 * When an app doesn't specify a color for the LED, as is the usual
   case, we currently just show the default color. This is boring.
   It's also a pain in the ass to manually map all your apps to
   colors.
 * Use our new helpers to generate this color based on the application's
   icon color. Keep a cache to avoid wasting cycles.

Change-Id: I7288e52499819a6a6c75ed9d9ba7cfa1b13c5669

nms: Only generate LED colors if the device has a multicolored LED

 * Check the overlay value before doing any of this stuff.

Change-Id: Iedfceba6bfc86b2761d8af57ecab51026bfa4c19
services/core/java/com/android/server/notification/NotificationManagerService.java