mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 721741 - Add support for Flash on Android 4.0+, follow up to use reflection and not require ICS SDK r=dougt
This commit is contained in:
parent
ced0347f0e
commit
16a5bb5bd6
@ -221,7 +221,7 @@ abstract public class GeckoApp
|
||||
String[] getPluginDirectories() {
|
||||
// we don't support Honeycomb
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB &&
|
||||
Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH)
|
||||
Build.VERSION.SDK_INT < 14 /*Build.VERSION_CODES.ICE_CREAM_SANDWICH*/ )
|
||||
return new String[0];
|
||||
|
||||
Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - start of getPluginDirectories");
|
||||
|
@ -84,7 +84,14 @@ public class SurfaceTextureLayer extends Layer implements SurfaceTexture.OnFrame
|
||||
mSurfaceTexture = new SurfaceTexture(mTextureId);
|
||||
mSurfaceTexture.setOnFrameAvailableListener(this);
|
||||
|
||||
mSurface = new Surface(mSurfaceTexture);
|
||||
Surface tmp = null;
|
||||
try {
|
||||
tmp = Surface.class.getConstructor(SurfaceTexture.class).newInstance(mSurfaceTexture); }
|
||||
catch (Exception ie) {
|
||||
Log.e(LOGTAG, "error constructing the surface", ie);
|
||||
}
|
||||
|
||||
mSurface = tmp;
|
||||
|
||||
float textureMap[] = {
|
||||
0.0f, 1.0f, // top left
|
||||
@ -150,9 +157,17 @@ public class SurfaceTextureLayer extends Layer implements SurfaceTexture.OnFrame
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
if (mSurfaceTexture != null)
|
||||
mSurfaceTexture.release();
|
||||
|
||||
if (mSurfaceTexture != null) {
|
||||
try {
|
||||
SurfaceTexture.class.getDeclaredMethod("release").invoke(mSurfaceTexture);
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
Log.e(LOGTAG, "error finding release method on mSurfaceTexture", nsme);
|
||||
} catch (IllegalAccessException iae) {
|
||||
Log.e(LOGTAG, "error invoking release method on mSurfaceTexture", iae);
|
||||
} catch (Exception e) {
|
||||
Log.e(LOGTAG, "some other exception while invoking release method on mSurfaceTexture", e);
|
||||
}
|
||||
}
|
||||
if (mTextureId > 0)
|
||||
TextureReaper.get().add(mTextureId);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user