OSDN Git Service

disables hardware acceleration if debug.egl.hw=0
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 8 Dec 2011 12:16:29 +0000 (20:16 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 25 Sep 2013 02:45:39 +0000 (10:45 +0800)
core/java/android/app/ActivityManager.java

index a25e311..135a8be 100644 (file)
@@ -377,9 +377,14 @@ public class ActivityManager {
      * Used by persistent processes to determine if they are running on a
      * higher-end device so should be okay using hardware drawing acceleration
      * (which tends to consume a lot more RAM).
+     * Alternatively, setting debug.egl.hw=0 disables hardware acceleration.
      * @hide
      */
     static public boolean isHighEndGfx() {
+        if (SystemProperties.get("debug.egl.hw").equals("0")) {
+            return false;
+        }
+
         MemInfoReader reader = new MemInfoReader();
         reader.readMemInfo();
         if (reader.getTotalSize() >= (512*1024*1024)) {