Skip to content

Commit

Permalink
Remove dependency on support (fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanenicolas committed Aug 28, 2014
1 parent ce66c6e commit 4b7b23a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ public static boolean isFragment(CtClass clazz) throws NotFoundException {
}

public static boolean isSupportFragment(CtClass clazz) throws NotFoundException {
return isSubClass(clazz.getClassPool(), clazz, "android.support.v4.app.Fragment");
try {
return isSubClass(clazz.getClassPool(), clazz, "android.support.v4.app.Fragment");
} catch (NotFoundException e) {
//this can happen if support is not present
return false;
}
}

public static boolean isView(CtClass clazz) throws NotFoundException {
Expand Down

0 comments on commit 4b7b23a

Please sign in to comment.