summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/create
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2015-06-01 14:21:24 -0700
committerDeepanshu Gupta <deepanshu@google.com>2015-06-01 14:43:28 -0700
commit86caef1892e1ce063e0e880396c8deaa3a6a171d (patch)
treeadf59c1fe3baf13444cbf6f48e37e9d0d0e3df48 /tools/layoutlib/create
parentb3e872be9e634c8d1f34d07778ea753880bbf2d9 (diff)
downloadframeworks_base-86caef1892e1ce063e0e880396c8deaa3a6a171d.zip
frameworks_base-86caef1892e1ce063e0e880396c8deaa3a6a171d.tar.gz
frameworks_base-86caef1892e1ce063e0e880396c8deaa3a6a171d.tar.bz2
LayoutLib: Skip classes from java package.
Classes in "java" package can't be defined at runtime anyway. No use including them in LayoutLib. Change-Id: I7e7c46f0d74e32c893b23093828569b4fa5e3a73
Diffstat (limited to 'tools/layoutlib/create')
-rw-r--r--tools/layoutlib/create/src/com/android/tools/layoutlib/create/DependencyFinder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/DependencyFinder.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/DependencyFinder.java
index 7690fcd..61b64a2 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/DependencyFinder.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/DependencyFinder.java
@@ -307,7 +307,9 @@ public class DependencyFinder {
try {
// exclude classes that are part of the default JRE (the one executing this program)
- if (getClass().getClassLoader().loadClass(className) != null) {
+ // or in java package (we won't be able to load them anyway).
+ if (className.startsWith("java.") ||
+ getClass().getClassLoader().loadClass(className) != null) {
return;
}
} catch (ClassNotFoundException e) {