mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 03:53:09 +08:00
Change PluginManager.isPhoneGapPlugin() to be much shorter like on the BlackBerry
This commit is contained in:
parent
032db387f8
commit
522a7225db
@ -140,15 +140,7 @@ public final class PluginManager {
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean isPhoneGapPlugin(Class c) {
|
||||
if (c != null) {
|
||||
if (c.getSuperclass().getName().equals("com.phonegap.api.Plugin")) {
|
||||
return true;
|
||||
}
|
||||
Class[] interfaces = c.getInterfaces();
|
||||
for (int j=0; j<interfaces.length; j++) {
|
||||
if (interfaces[j].getName().equals("com.phonegap.api.IPlugin")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return com.phonegap.api.Plugin.class.isAssignableFrom(c);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user