From 2c3eb14d43edcecbd85072f7068126cffd7ca493 Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Tue, 8 Sep 2009 13:01:56 -0400 Subject: [PATCH] adding support for webkit plugins to use the java view system Change-Id: I4fb328e5f30476fe4aa70565bacb969dc97b495d --- api/current.xml | 45 +++++++++++++ core/java/android/webkit/PluginActivity.java | 67 ++++++++++++++++++++ core/java/android/webkit/PluginStub.java | 50 +++++++++++++++ core/java/android/webkit/PluginUtil.java | 62 ++++++++++++++++++ 4 files changed, 224 insertions(+) create mode 100644 core/java/android/webkit/PluginActivity.java create mode 100644 core/java/android/webkit/PluginStub.java create mode 100644 core/java/android/webkit/PluginUtil.java diff --git a/api/current.xml b/api/current.xml index ce2ac27180028..83b201ca88f98 100644 --- a/api/current.xml +++ b/api/current.xml @@ -165277,6 +165277,51 @@ + + + + + + + + + + + + + + stubClass = + pluginCL.loadClass(className); + Constructor stubConstructor = + stubClass.getConstructor(int.class); + Object stubObject = stubConstructor.newInstance(NPP); + + if (stubObject instanceof PluginStub) { + return (PluginStub) stubObject; + } else { + Log.e(LOGTAG, "The plugin class is not of type PluginStub"); + } + } catch (Exception e) { + // Any number of things could have happened. Log the exception and + // return null. Careful not to use Log.e(LOGTAG, "String", e) + // because that reports the exception to the checkin service. + Log.e(LOGTAG, Log.getStackTraceString(e)); + } + return null; + } +}