summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2013-10-28 18:33:19 +0100
committerPaul Kocialkowski <contact@paulk.fr>2013-10-28 18:33:19 +0100
commit149870bfe6397e0f14dd43e7e7d24009cebd142d (patch)
tree0db7082140b3f5a4caa4ad4c2b8997d166840630
parent3f3f72b124a67139a8d5b409fb52accdde363420 (diff)
downloadframeworks_base-149870bfe6397e0f14dd43e7e7d24009cebd142d.zip
frameworks_base-149870bfe6397e0f14dd43e7e7d24009cebd142d.tar.gz
frameworks_base-149870bfe6397e0f14dd43e7e7d24009cebd142d.tar.bz2
Always disable StrictModeFlash
Change-Id: I6d891cd4b3f40110c8b99a67cd467c2501d30317 Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--services/java/com/android/server/wm/StrictModeFlash.java12
1 files 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;