OSDN Git Service

Improve error reporting on Exceptions in fw views.
authorDeepanshu Gupta <deepanshu@google.com>
Wed, 21 Oct 2015 00:29:44 +0000 (17:29 -0700)
committerDeepanshu Gupta <deepanshu@google.com>
Thu, 12 Nov 2015 21:56:14 +0000 (13:56 -0800)
commitd30c141a2dee881fd83e1415a50161def1acf227
tree7112178d0f0dd57f1e91cf4f45504fc6faf0305b
parent7a062ed396f6e563766367de70e0d9c6ba615fed
Improve error reporting on Exceptions in fw views.

When there's an exception during the inflation of a framework view (for
example invalid attributes), report the exception correctly. The earlier
behaviour assumed the exception to be a ClassNotFoundException and tried
to load it from the user's project. This is not longer the case.

Also, update the MockView class to a FrameLayout with a single TextView.
This means that the MockView is a ViewGroup and will not choke when
someone attempts to add a View to it (although, the view will be
silently dropped).

Change-Id: Ice003817ceb627ebfbbbb245ab6be10f9141e728
tools/layoutlib/bridge/src/android/view/BridgeInflater.java
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/MockView.java