summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-04-11 19:28:32 +0200
committerJorim Jaggi <jjaggi@google.com>2014-04-11 19:28:32 +0200
commite46f521161a4269b44f30c9afb19ea3df7cbfeae (patch)
treeccd4f4ca5191ff5d5fe97337374d6480afe4797b /packages
parent99368f94817742247bb42840463f6714ac2d63c2 (diff)
downloadframeworks_base-e46f521161a4269b44f30c9afb19ea3df7cbfeae.zip
frameworks_base-e46f521161a4269b44f30c9afb19ea3df7cbfeae.tar.gz
frameworks_base-e46f521161a4269b44f30c9afb19ea3df7cbfeae.tar.bz2
Change scrim on lockscreen and transparency of cards a bit.
Bug: 13635952 Change-Id: Iaae4728fd7ed4944b3a2b80343bbdeaa5438ca9c
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/values/colors.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java5
2 files changed, 6 insertions, 2 deletions
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 1a5ffa9..59e8360 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -31,7 +31,8 @@
<drawable name="notification_item_background_legacy_color">#ffaaaaaa</drawable>
<drawable name="heads_up_notification_bg_pressed">#ff33B5E5</drawable>
<drawable name="notification_header_bg">#FF000000</drawable>
- <color name="notification_panel_scrim_color">#B0000000</color>
+ <color name="notification_panel_scrim_color">#A0000000</color>
+ <color name="notification_panel_scrim_color_keyguard">#80000000</color>
<color name="batterymeter_frame_color">#66FFFFFF</color><!-- 40% white -->
<color name="batterymeter_charge_color">#FFFFFFFF</color>
<color name="batterymeter_bolt_color">#FFFFFFFF</color>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index e6575dc..583fc3e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -37,6 +37,7 @@ public class PhoneStatusBarView extends PanelBar {
PhoneStatusBar mBar;
int mScrimColor;
+ int mScrimColorKeyguard;
float mSettingsPanelDragzoneFrac;
float mSettingsPanelDragzoneMin;
@@ -52,6 +53,7 @@ public class PhoneStatusBarView extends PanelBar {
Resources res = getContext().getResources();
mScrimColor = res.getColor(R.color.notification_panel_scrim_color);
+ mScrimColorKeyguard = res.getColor(R.color.notification_panel_scrim_color_keyguard);
mSettingsPanelDragzoneMin = res.getDimension(R.dimen.settings_panel_dragzone_min);
try {
mSettingsPanelDragzoneFrac = res.getFraction(R.dimen.settings_panel_dragzone_fraction, 1, 1);
@@ -217,6 +219,7 @@ public class PhoneStatusBarView extends PanelBar {
if (panel == mFadingPanel && mScrimColor != 0 && ActivityManager.isHighEndGfx()
&& mBar.mStatusBarWindow != null) {
if (mShouldFade) {
+ int scrimColor = mBar.isOnKeyguard() ? mScrimColorKeyguard : mScrimColor;
frac = mPanelExpandedFractionSum; // don't judge me
// let's start this 20% of the way down the screen
frac = frac * 1.2f - 0.2f;
@@ -226,7 +229,7 @@ public class PhoneStatusBarView extends PanelBar {
// woo, special effects
final float k = (float)(1f-0.5f*(1f-Math.cos(3.14159f * Math.pow(1f-frac, 2f))));
// attenuate background color alpha by k
- final int color = (int) ((mScrimColor >>> 24) * k) << 24 | (mScrimColor & 0xFFFFFF);
+ final int color = (int) ((scrimColor >>> 24) * k) << 24 | (scrimColor & 0xFFFFFF);
mBar.mStatusBarWindow.setBackgroundColor(color);
}
}