OSDN Git Service

allow forcing HighEndGfx mode
authorAndrew Sutherland <dr3wsuth3rland@gmail.com>
Sun, 1 Dec 2013 09:29:19 +0000 (03:29 -0600)
committerSteve Kondik <steve@cyngn.com>
Tue, 13 Sep 2016 07:12:42 +0000 (00:12 -0700)
people have already started fipping the lomRam prop to enable
transparent status bar, this will enable it with fewer
repercussions

Change-Id: Ied6de65276425fa1e7db0bf9da35f1932a355172

core/java/android/app/ActivityManager.java

index 5eca0b3..3f3a200 100644 (file)
@@ -899,9 +899,17 @@ public class ActivityManager {
      * @hide
      */
     static public boolean isHighEndGfx() {
-        return !("1".equals(SystemProperties.get("persist.sys.force_sw_gles", "0"))) &&
+        return (!("1".equals(SystemProperties.get("persist.sys.force_sw_gles", "0"))) &&
                !isLowRamDeviceStatic() &&
-                !Resources.getSystem().getBoolean(com.android.internal.R.bool.config_avoidGfxAccel);
+                !Resources.getSystem().getBoolean(com.android.internal.R.bool.config_avoidGfxAccel))
+                || isForcedHighEndGfx();
+    }
+
+    /**
+     * @hide
+     */
+    public static boolean isForcedHighEndGfx() {
+        return SystemProperties.getBoolean("persist.sys.force_highendgfx", false);
     }
 
     /**