summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-08-12 13:58:13 -0700
committerDianne Hackborn <hackbod@google.com>2011-08-12 14:23:03 -0700
commitb375632c9cf7b7be9309ff55f602499d59cfa597 (patch)
tree12d78f6f4712cb5e4b6b78f3498b9e8da6ce6e2f /policy
parent8a5c6617d513bd0a47c733520facb3ba543b70b0 (diff)
downloadframeworks_base-b375632c9cf7b7be9309ff55f602499d59cfa597.zip
frameworks_base-b375632c9cf7b7be9309ff55f602499d59cfa597.tar.gz
frameworks_base-b375632c9cf7b7be9309ff55f602499d59cfa597.tar.bz2
Don't use HW accel drawing in lock screen on lower-end devices.
This saves about 8MB in the system process because we don't need to do HW accelerated drawing there anymore. Change-Id: Ieaf72fe772536e12d10cf129d9338ca9fce6a6d4
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/KeyguardViewManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java
index 6ee5861..f52bb26 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java
@@ -18,6 +18,7 @@ package com.android.internal.policy.impl;
import com.android.internal.R;
+import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.res.Resources;
@@ -107,13 +108,16 @@ public class KeyguardViewManager implements KeyguardWindowController {
int flags = WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER
| WindowManager.LayoutParams.FLAG_KEEP_SURFACE_WHILE_ANIMATING
- | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
- | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED_SYSTEM
/*| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR*/ ;
if (!mNeedsInput) {
flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
}
+ if (ActivityManager.isHighEndGfx(((WindowManager)mContext.getSystemService(
+ Context.WINDOW_SERVICE)).getDefaultDisplay())) {
+ flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
+ | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED_SYSTEM;
+ }
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
stretch, stretch, WindowManager.LayoutParams.TYPE_KEYGUARD,
flags, PixelFormat.TRANSLUCENT);