summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2013-09-06 18:26:55 -0400
committerJohn Spurlock <jspurlock@google.com>2013-09-06 18:35:50 -0400
commit21efa9ade3a5ff1854bf53a3fdf964d598ef9783 (patch)
treee74380111854432f9023d8016cce268c2b6d609b /packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
parentf96b104a7f6e4c2a8883b6d4de69e6de24aa8edc (diff)
downloadframeworks_base-21efa9ade3a5ff1854bf53a3fdf964d598ef9783.zip
frameworks_base-21efa9ade3a5ff1854bf53a3fdf964d598ef9783.tar.gz
frameworks_base-21efa9ade3a5ff1854bf53a3fdf964d598ef9783.tar.bz2
Update signal, wifi, battery assets + global dimming.
Global status bar dimming is now 75%. Signal/wifi: use problem color if not fully connected. Battery: frame 40% white, charge level = white, new hollow bolt. (hollow bolt simulated for now until we can draw it in code) Update ic_notification_overlay, all sizes. Workaround animation bug on tablets. Bug:10502089 Change-Id: I10f979b7a48ccb1bc94022d8c189ec216283dbe6
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/BatteryMeterView.java')
-rwxr-xr-xpackages/SystemUI/src/com/android/systemui/BatteryMeterView.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index 6a0f6e3..be5c326 100755
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -23,6 +23,7 @@ import android.content.IntentFilter;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
+import android.graphics.LightingColorFilter;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
@@ -42,6 +43,11 @@ public class BatteryMeterView extends View implements DemoMode {
public static final boolean SINGLE_DIGIT_PERCENT = false;
public static final boolean SHOW_100_PERCENT = false;
+ private static final LightingColorFilter LIGHTNING_FILTER_OPAQUE =
+ new LightingColorFilter(0x00000000, 0x00000000);
+ private static final LightingColorFilter LIGHTNING_FILTER_TRANS =
+ new LightingColorFilter(0x00999999, 0x00000000);
+
public static final int FULL = 96;
public static final int EMPTY = 4;
@@ -214,6 +220,15 @@ public class BatteryMeterView extends View implements DemoMode {
return color;
}
+ // TODO jspurlock - remove once we draw hollow bolt in code
+ public void setBarTransparent(boolean isTransparent) {
+ mLightning.setColorFilter(isTransparent ? LIGHTNING_FILTER_TRANS : LIGHTNING_FILTER_OPAQUE);
+ BatteryTracker tracker = mDemoMode ? mDemoTracker : mTracker;
+ if (tracker.plugged) {
+ postInvalidate();
+ }
+ }
+
@Override
public void draw(Canvas c) {
BatteryTracker tracker = mDemoMode ? mDemoTracker : mTracker;
@@ -290,17 +305,6 @@ public class BatteryMeterView extends View implements DemoMode {
x,
y,
mTextPaint);
-
-// Paint pt = new Paint();
-// pt.setStrokeWidth(1f);
-// pt.setStyle(Paint.Style.STROKE);
-// pt.setColor(0xFFFF0000);
-// c.drawRect(x, y-mTextHeight, x+tw, y, pt);
-//
-// Slog.v(TAG, "tw=" + tw + " th=" + mTextHeight);
-//
-// pt.setColor(0xFFFF00FF);
-// c.drawRect(1, 1, mWidth, mHeight, pt);
}
}