mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 703069 - Do a better job of guessing plugin package name r=blassey
This commit is contained in:
parent
4866903b3c
commit
1c68992047
@ -326,6 +326,23 @@ abstract public class GeckoApp
|
||||
return result;
|
||||
}
|
||||
|
||||
String getPluginPackage(String pluginLib) {
|
||||
|
||||
if (pluginLib == null || pluginLib.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
synchronized(mPackageInfoCache) {
|
||||
for (PackageInfo pkgInfo : mPackageInfoCache) {
|
||||
if (pluginLib.contains(pkgInfo.packageName)) {
|
||||
return pkgInfo.packageName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Class<?> getPluginClass(String packageName, String className)
|
||||
throws NameNotFoundException, ClassNotFoundException {
|
||||
Context pluginContext = this.mAppContext.createPackageContext(packageName,
|
||||
|
@ -1274,8 +1274,7 @@ public class GeckoAppShell
|
||||
Log.i(LOGTAG, "libName: " + libName);
|
||||
|
||||
try {
|
||||
String[] split = libName.split("/");
|
||||
String packageName = split[split.length - 3];
|
||||
String packageName = GeckoApp.mAppContext.getPluginPackage(libName);
|
||||
Log.i(LOGTAG, "load \"" + className + "\" from \"" + packageName +
|
||||
"\" for \"" + libName + "\"");
|
||||
Context pluginContext =
|
||||
|
Loading…
Reference in New Issue
Block a user