summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-05-08 15:30:57 -0700
committerRomain Guy <romainguy@google.com>2012-05-08 15:30:57 -0700
commit328b35827e6ce7eba844e338e59427c8cae7b681 (patch)
treec0f00b10e5a7883fc4eb1f593668fd33d87e933c /packages/SystemUI/src
parent2a0f228a30c85a124f92a5a7c1b10a81cf69af6d (diff)
downloadframeworks_base-328b35827e6ce7eba844e338e59427c8cae7b681.zip
frameworks_base-328b35827e6ce7eba844e338e59427c8cae7b681.tar.gz
frameworks_base-328b35827e6ce7eba844e338e59427c8cae7b681.tar.bz2
Make window shade fast on non-high end gfx displays
Change-Id: I64a4861845978f9209c2b7d24c40c65ce7483dcb
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java19
1 files changed, 14 insertions, 5 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 f6f41b8..96f08b1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -311,6 +311,12 @@ public class PhoneStatusBar extends BaseStatusBar {
}
});
+ if (!ActivityManager.isHighEndGfx(mDisplay)) {
+ mStatusBarWindow.setBackground(null);
+ mNotificationPanel.setBackgroundColor(context.getResources().getColor(
+ R.color.notification_panel_solid_background));
+ }
+
if (ENABLE_INTRUDERS) {
mIntruderAlertView = (IntruderAlertView) View.inflate(context, R.layout.intruder_alert, null);
mIntruderAlertView.setVisibility(View.GONE);
@@ -1987,11 +1993,14 @@ public class PhoneStatusBar extends BaseStatusBar {
Slog.v(TAG, "updated cropView height=" + panelh + " grav=" + lp.gravity);
}
mNotificationPanel.setLayoutParams(lp);
- // woo, special effects
- final int barh = getCloseViewHeight() + getStatusBarHeight();
- final float frac = saturate((float)(panelh - barh) / (disph - barh));
- final int color = ((int)(0xB0 * Math.sin(frac * 1.57f))) << 24;
- mStatusBarWindow.setBackgroundColor(color);
+
+ if (ActivityManager.isHighEndGfx(mDisplay)) {
+ // woo, special effects
+ final int barh = getCloseViewHeight() + getStatusBarHeight();
+ final float frac = saturate((float)(panelh - barh) / (disph - barh));
+ final int color = ((int)(0xB0 * Math.sin(frac * 1.57f))) << 24;
+ mStatusBarWindow.setBackgroundColor(color);
+ }
}
void updateDisplaySize() {