History log of /frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/create/InjectMethodsAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
23e47f5621271db9b84f53f15a3e3d81d8b8b48d 08-Jan-2016 Deepanshu Gupta <deepanshu@google.com> Java 8 in layoutlib-create

Upgrade to ASM 5 and diamond operators.

Also minor fixes here and there.

Bug: 26442940
Change-Id: I5611ed0889aa94cca8655fec47799e1ddccb0150
/frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/create/InjectMethodsAdapter.java
f8ea750455eec81e4e6d877b3e18e29a86d4ec95 19-May-2015 Deepanshu Gupta <deepanshu@google.com> Make Context.getClassLoader() work.

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
/frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/create/InjectMethodsAdapter.java