summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2015-05-18 18:47:07 -0700
committerDeepanshu Gupta <deepanshu@google.com>2015-08-25 12:06:43 -0700
commitafedbc47b3c8f3fa9955496e6ceb7f5702dd90a3 (patch)
tree2046fbcf31f9c9747959f9d303d76c9f3317cf8e /tools/aapt2/java/JavaClassGenerator_test.cpp
parent92480a9ad89a813bdf36185fa8c4d227d8415b4c (diff)
Make Context.getClassLoader() work. [DO NOT MERGE]
Context.getClassLoader() is used by the LayoutInflater and can be used by custom views. However, when called from the LayoutInflater, this needs to return only the Framework classes. This is so that the IDE gets a chance to instantiate the custom views, which helps in better error reporting and better fallback in case of exceptions, like MockView. To workaround this need of the same method returning different results based on where it's called from, the method call in LayoutInflater is renamed to getFrameworkClassLoader() and the new method is injected in Context. The implementation of getFrameworkClassLoader() maintains the existing behaviour of getClassLoader(). Context.getClassLoader() is now modified to return classes from both Framework and the app namespace. Also, update the list of packages to search for Framework views. Change-Id: I1a6be4aa1fc5c1c5520b5440a348a52f10b6eb3b (cherry picked from commit f8ea750455eec81e4e6d877b3e18e29a86d4ec95)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions