diff options
author | Elliott Hughes <enh@google.com> | 2011-04-08 20:01:01 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-04-11 15:31:20 -0700 |
commit | 24ce5fb2cc09d0a14406e7b935f8648c5720d27e (patch) | |
tree | 022bd63502ea1a649ecf32bdb3dc2e0205376901 /opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl | |
parent | 7797e647fc8fcd5091b9449c0044f5cb70db5b47 (diff) |
Kill the global references in the OpenGL wrappers.
Just use jniThrowException instead. Note that it would be trivial to throw
seemingly more appropriate exceptions (NullPointerException and
OutOfMemoryException in particular), but I'm only attempting to preserve
existing behavior here.
I also found shadowing bugs in some of the special-case functions, which
would previously always have leaked memory.
This also moves an accidental change to a generated file (ActivityThread ->
AppGlobals) into the generator, so it won't be overwritten in future.
Change-Id: Iab570310b568cb406c60dd0e2b8211f8a36ae590
Diffstat (limited to 'opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl')
-rw-r--r-- | opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl b/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl index 372710625e4c..cd730aa95b21 100644 --- a/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl +++ b/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl @@ -18,7 +18,7 @@ package com.google.android.gles_jni; -import android.app.ActivityThread; +import android.app.AppGlobals; import android.content.pm.ApplicationInfo; import android.content.pm.IPackageManager; import android.os.Build; @@ -64,7 +64,7 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack { private static boolean allowIndirectBuffers(String appName) { boolean result = false; int version = 0; - IPackageManager pm = ActivityThread.getPackageManager(); + IPackageManager pm = AppGlobals.getPackageManager(); try { ApplicationInfo applicationInfo = pm.getApplicationInfo(appName, 0); if (applicationInfo != null) { |