Loading core/java/android/view/ViewRoot.java +11 −5 Original line number Diff line number Diff line Loading @@ -498,14 +498,20 @@ public final class ViewRoot extends Handler implements ViewParent, mAttachInfo.mHardwareAccelerationRequested = false; // Try to enable hardware acceleration if requested if (attrs != null && (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0) { final boolean hardwareAccelerated = (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0; if (attrs != null && hardwareAccelerated) { // Only enable hardware acceleration if we are not in the system process // The window manager creates ViewRoots to display animated preview windows // of launching apps and we don't want those to be hardware accelerated if (!HardwareRenderer.sRendererDisabled) { final boolean systemHwAccelerated = (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED_SYSTEM) != 0; if (!HardwareRenderer.sRendererDisabled || systemHwAccelerated) { // Don't enable hardware acceleration when we're not on the main thread if (Looper.getMainLooper() != Looper.myLooper()) { if (!systemHwAccelerated && Looper.getMainLooper() != Looper.myLooper()) { Log.w(HardwareRenderer.LOG_TAG, "Attempting to initialize hardware " + "acceleration outside of the main thread, aborting"); return; Loading core/java/android/view/WindowManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -666,6 +666,17 @@ public interface WindowManager extends ViewManager { */ public static final int FLAG_HARDWARE_ACCELERATED = 0x01000000; /** * Like {@link #FLAG_HARDWARE_ACCELERATED} except for trusted system windows * that need hardware acceleration (e.g. LockScreen), where hardware acceleration * is generally disabled. This flag must be specified in addition to * {@link #FLAG_HARDWARE_ACCELERATED} to enable hardware acceleration for system * windows. * * @hide */ public static final int FLAG_HARDWARE_ACCELERATED_SYSTEM = 0x02000000; // ----- HIDDEN FLAGS. // These start at the high bit and go down. Loading core/java/com/android/internal/widget/WaveView.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import com.android.internal.R; public class WaveView extends View implements ValueAnimator.AnimatorUpdateListener { private static final String TAG = "WaveView"; private static final boolean DBG = false; private static final int WAVE_COUNT = 5; // default wave count private static final int WAVE_COUNT = 20; // default wave count private static final long VIBRATE_SHORT = 20; // msec private static final long VIBRATE_LONG = 20; // msec Loading policy/src/com/android/internal/policy/impl/KeyguardViewManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -103,6 +103,8 @@ 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) { Loading Loading @@ -142,7 +144,7 @@ public class KeyguardViewManager implements KeyguardWindowController { mKeyguardView.onScreenTurnedOn(); } } mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); mKeyguardHost.setVisibility(View.VISIBLE); mKeyguardView.requestFocus(); } Loading policy/src/com/android/internal/policy/impl/LockScreen.java +2 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen, /** {@inheritDoc} */ public void onGrabbedStateChange(View v, int grabbedState) { if (DBG) Log.v(TAG, "*** LockScreen accel is " + (mEnergyWave.isHardwareAccelerated() ? "on":"off")); // Don't poke the wake lock when returning to a state where the handle is // not grabbed since that can happen when the system (instead of the user) // cancels the grab. Loading Loading
core/java/android/view/ViewRoot.java +11 −5 Original line number Diff line number Diff line Loading @@ -498,14 +498,20 @@ public final class ViewRoot extends Handler implements ViewParent, mAttachInfo.mHardwareAccelerationRequested = false; // Try to enable hardware acceleration if requested if (attrs != null && (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0) { final boolean hardwareAccelerated = (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0; if (attrs != null && hardwareAccelerated) { // Only enable hardware acceleration if we are not in the system process // The window manager creates ViewRoots to display animated preview windows // of launching apps and we don't want those to be hardware accelerated if (!HardwareRenderer.sRendererDisabled) { final boolean systemHwAccelerated = (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED_SYSTEM) != 0; if (!HardwareRenderer.sRendererDisabled || systemHwAccelerated) { // Don't enable hardware acceleration when we're not on the main thread if (Looper.getMainLooper() != Looper.myLooper()) { if (!systemHwAccelerated && Looper.getMainLooper() != Looper.myLooper()) { Log.w(HardwareRenderer.LOG_TAG, "Attempting to initialize hardware " + "acceleration outside of the main thread, aborting"); return; Loading
core/java/android/view/WindowManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -666,6 +666,17 @@ public interface WindowManager extends ViewManager { */ public static final int FLAG_HARDWARE_ACCELERATED = 0x01000000; /** * Like {@link #FLAG_HARDWARE_ACCELERATED} except for trusted system windows * that need hardware acceleration (e.g. LockScreen), where hardware acceleration * is generally disabled. This flag must be specified in addition to * {@link #FLAG_HARDWARE_ACCELERATED} to enable hardware acceleration for system * windows. * * @hide */ public static final int FLAG_HARDWARE_ACCELERATED_SYSTEM = 0x02000000; // ----- HIDDEN FLAGS. // These start at the high bit and go down. Loading
core/java/com/android/internal/widget/WaveView.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import com.android.internal.R; public class WaveView extends View implements ValueAnimator.AnimatorUpdateListener { private static final String TAG = "WaveView"; private static final boolean DBG = false; private static final int WAVE_COUNT = 5; // default wave count private static final int WAVE_COUNT = 20; // default wave count private static final long VIBRATE_SHORT = 20; // msec private static final long VIBRATE_LONG = 20; // msec Loading
policy/src/com/android/internal/policy/impl/KeyguardViewManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -103,6 +103,8 @@ 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) { Loading Loading @@ -142,7 +144,7 @@ public class KeyguardViewManager implements KeyguardWindowController { mKeyguardView.onScreenTurnedOn(); } } mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); mKeyguardHost.setVisibility(View.VISIBLE); mKeyguardView.requestFocus(); } Loading
policy/src/com/android/internal/policy/impl/LockScreen.java +2 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen, /** {@inheritDoc} */ public void onGrabbedStateChange(View v, int grabbedState) { if (DBG) Log.v(TAG, "*** LockScreen accel is " + (mEnergyWave.isHardwareAccelerated() ? "on":"off")); // Don't poke the wake lock when returning to a state where the handle is // not grabbed since that can happen when the system (instead of the user) // cancels the grab. Loading