summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2010-12-03 20:14:02 +0000
committerGerrit Code Review <gerrit@review.cyanogenmod.com>2010-12-03 20:14:02 +0000
commitffa2badfa7c6b1f84c3f671850833ebc94581843 (patch)
treed811bf8aa9abc1035114f97be29d5b958a734fba
parent0e0692f3b67eb3dc770d3eecea819280a8e97688 (diff)
parentc43894ea798a8786a6b1581b366a20e39305090b (diff)
downloadframeworks_base-ffa2badfa7c6b1f84c3f671850833ebc94581843.zip
frameworks_base-ffa2badfa7c6b1f84c3f671850833ebc94581843.tar.gz
frameworks_base-ffa2badfa7c6b1f84c3f671850833ebc94581843.tar.bz2
Merge "Trackball/LED fixes:" into froyo
-rw-r--r--services/java/com/android/server/LightsService.java16
-rw-r--r--services/java/com/android/server/NotificationManagerService.java6
2 files changed, 14 insertions, 8 deletions
diff --git a/services/java/com/android/server/LightsService.java b/services/java/com/android/server/LightsService.java
index 7c0a80e..c70aab9 100644
--- a/services/java/com/android/server/LightsService.java
+++ b/services/java/com/android/server/LightsService.java
@@ -109,19 +109,19 @@ public class LightsService {
public void pulse(int color, int onMS) {
synchronized (this) {
- if (mColor == 0 && !mFlashing) {
+ if (mColor == 0 && !mFlashing) {
setLightLocked(color, LIGHT_FLASH_HARDWARE, onMS, 1000, BRIGHTNESS_MODE_USER);
mH.sendMessageDelayed(Message.obtain(mH, 1, this), onMS);
}
}
}
- public void notificationPulse(int color, int onMs, int offMs) {
- synchronized (this) {
- setLightLocked(color, LIGHT_FLASH_TIMED, onMs, 1000, BRIGHTNESS_MODE_USER);
- mH.sendMessageDelayed(Message.obtain(mH, 1, this), onMs);
- }
- }
+ public void notificationPulse(int color, int onMs, int offMs) {
+ synchronized (this) {
+ setLightLocked(color, LIGHT_FLASH_TIMED, onMs, offMs, BRIGHTNESS_MODE_USER);
+ mH.sendMessageDelayed(Message.obtain(mH, 1, this), onMs);
+ }
+ }
public void turnOff() {
synchronized (this) {
@@ -216,7 +216,7 @@ public class LightsService {
@Override
public void handleMessage(Message msg) {
Light light = (Light)msg.obj;
- light.stopFlashing();
+ light.turnOff();
}
};
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 8207146..7534070 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -42,6 +42,7 @@ import android.media.AudioManager;
import android.net.Uri;
import android.os.BatteryManager;
import android.os.Binder;
+import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
@@ -1396,6 +1397,7 @@ class NotificationManagerService extends INotificationManager.Stub {
}
private void updateRGBLightsLocked() {
+ boolean SHOLES_DEVICE = Build.DEVICE.contains("sholes");
int mPulseScreen = Settings.System.getInt(mContext.getContentResolver(),
Settings.System.TRACKBALL_SCREEN_ON, 0);
int mSuccession = Settings.System.getInt(mContext.getContentResolver(),
@@ -1413,6 +1415,10 @@ class NotificationManagerService extends INotificationManager.Stub {
mPulseAllColor = 0;
}
+ if (SHOLES_DEVICE) {
+ mBlendColor = 0;
+ }
+
// Battery low always shows, other states only show if charging.
if (mBatteryLow) {
if (mBatteryCharging) {