From 149870bfe6397e0f14dd43e7e7d24009cebd142d Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Mon, 28 Oct 2013 18:33:19 +0100 Subject: Always disable StrictModeFlash Change-Id: I6d891cd4b3f40110c8b99a67cd467c2501d30317 Signed-off-by: Paul Kocialkowski --- services/java/com/android/server/wm/StrictModeFlash.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/services/java/com/android/server/wm/StrictModeFlash.java b/services/java/com/android/server/wm/StrictModeFlash.java index 90bbd08..543ef7b 100644 --- a/services/java/com/android/server/wm/StrictModeFlash.java +++ b/services/java/com/android/server/wm/StrictModeFlash.java @@ -29,6 +29,8 @@ import android.view.SurfaceSession; class StrictModeFlash { private static final String TAG = "StrictModeFlash"; + boolean mDisabled = true; + Surface mSurface; int mLastDW; int mLastDH; @@ -36,6 +38,10 @@ class StrictModeFlash { final int mThickness = 20; public StrictModeFlash(Display display, SurfaceSession session) { + if (mDisabled) { + return; + } + try { mSurface = new Surface(session, "StrictModeFlash", 1, 1, PixelFormat.TRANSLUCENT, Surface.HIDDEN); @@ -51,7 +57,7 @@ class StrictModeFlash { } private void drawIfNeeded() { - if (!mDrawNeeded) { + if (mDisabled || !mDrawNeeded) { return; } mDrawNeeded = false; @@ -88,7 +94,7 @@ class StrictModeFlash { // Note: caller responsible for being inside // Surface.openTransaction() / closeTransaction() public void setVisibility(boolean on) { - if (mSurface == null) { + if (mDisabled || mSurface == null) { return; } drawIfNeeded(); @@ -100,7 +106,7 @@ class StrictModeFlash { } void positionSurface(int dw, int dh) { - if (mLastDW == dw && mLastDH == dh) { + if (mDisabled || (mLastDW == dw && mLastDH == dh)) { return; } mLastDW = dw; -- cgit v1.1