OSDN Git Service

Fix delegation of methods within inner static classes
authorDiego Perez <diegoperez@google.com>
Fri, 13 Nov 2015 13:58:14 +0000 (13:58 +0000)
committerDiego Perez <diegoperez@google.com>
Fri, 13 Nov 2015 14:06:50 +0000 (14:06 +0000)
commit6777f54fa44341dd4b23456c97d97c6e4ffe915f
tree879d92f92007cb7070e1688f295869971fce3a28
parent7a062ed396f6e563766367de70e0d9c6ba615fed
Fix delegation of methods within inner static classes

Currently, delegation of inner static classes methods is broken since
the rewritten method tries to pass an instance to the outer class. This
updates the method generation to only pass the reference if the inner
class is not static.

Change-Id: I8493929cafdbd80968989b422af0f956fa65681a
tools/layoutlib/create/src/com/android/tools/layoutlib/create/DelegateClassAdapter.java
tools/layoutlib/create/src/com/android/tools/layoutlib/create/DelegateMethodAdapter.java
tools/layoutlib/create/tests/com/android/tools/layoutlib/create/DelegateClassAdapterTest.java
tools/layoutlib/create/tests/com/android/tools/layoutlib/create/dataclass/OuterClass.java
tools/layoutlib/create/tests/com/android/tools/layoutlib/create/dataclass/OuterClass_StaticInnerClass_Delegate.java [new file with mode: 0644]