summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-05-25 10:44:45 -0700
committerRomain Guy <romainguy@google.com>2012-05-25 10:44:45 -0700
commit648342f1f257663fc5b3065b23c80eb015edfbea (patch)
tree70f09d07f750b098bafa76a7d63378c2b2e271ab /packages/SystemUI/src
parentf7f16f7f3fec4e422b6382a3caead9eeb0c22a1e (diff)
downloadframeworks_base-648342f1f257663fc5b3065b23c80eb015edfbea.zip
frameworks_base-648342f1f257663fc5b3065b23c80eb015edfbea.tar.gz
frameworks_base-648342f1f257663fc5b3065b23c80eb015edfbea.tar.bz2
Tale of status bar on crespo, part 2
Bug #6541079 In which a flood destroys flatland. Change-Id: Ifd1913b645c08531b221b3e010c133f14bcfb0c2
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java43
1 files changed, 40 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 841467a..409e684 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -33,8 +33,12 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.content.res.Resources;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
import android.graphics.PixelFormat;
+import android.graphics.PorterDuff;
import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
import android.inputmethodservice.InputMethodService;
import android.os.IBinder;
import android.os.Message;
@@ -313,8 +317,8 @@ public class PhoneStatusBar extends BaseStatusBar {
if (!ActivityManager.isHighEndGfx(mDisplay)) {
mStatusBarWindow.setBackground(null);
- mNotificationPanel.setBackgroundColor(context.getResources().getColor(
- R.color.notification_panel_solid_background));
+ mNotificationPanel.setBackground(new FastColorDrawable(context.getResources().getColor(
+ R.color.notification_panel_solid_background)));
}
if (ENABLE_INTRUDERS) {
@@ -2127,5 +2131,38 @@ public class PhoneStatusBar extends BaseStatusBar {
protected boolean shouldDisableNavbarGestures() {
return mExpanded || (mDisabled & StatusBarManager.DISABLE_HOME) != 0;
}
-}
+ private static class FastColorDrawable extends Drawable {
+ private final int mColor;
+
+ public FastColorDrawable(int color) {
+ mColor = 0xff000000 | color;
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ canvas.drawColor(mColor, PorterDuff.Mode.SRC);
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter cf) {
+ }
+
+ @Override
+ public int getOpacity() {
+ return PixelFormat.OPAQUE;
+ }
+
+ @Override
+ public void setBounds(int left, int top, int right, int bottom) {
+ }
+
+ @Override
+ public void setBounds(Rect bounds) {
+ }
+ }
+}