diff options
author | Raphael <raphael@google.com> | 2010-10-22 15:29:04 -0700 |
---|---|---|
committer | Raphael <raphael@google.com> | 2010-10-22 15:29:04 -0700 |
commit | e2e8ba904b306f11dfc5b71e00ab9ac013358cd7 (patch) | |
tree | 21931ec99ebb589620af398db5ca7559652cbc02 /tools | |
parent | 280372e2c7db128254b5f65395ea843ef285729e (diff) | |
download | frameworks_base-e2e8ba904b306f11dfc5b71e00ab9ac013358cd7.zip frameworks_base-e2e8ba904b306f11dfc5b71e00ab9ac013358cd7.tar.gz frameworks_base-e2e8ba904b306f11dfc5b71e00ab9ac013358cd7.tar.bz2 |
Layoutlib_Create: Fix order of class adapters.
The Transform adapter was running last, instead of
running on the output of the Delegate adapter.
Change-Id: I2cd777add7b0972c6bb197aaac6693d39dd5a103
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java index a880c56..a9ede26 100644 --- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java +++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java @@ -313,6 +313,11 @@ public class AsmGenerator { rv = new RenameClassAdapter(cw, className, newName); } + ClassVisitor cv = new TransformClassAdapter(mLog, mStubMethods, + mDeleteReturns.get(className), + newName, rv, + stubNativesOnly, stubNativesOnly || hasNativeMethods); + Set<String> delegateMethods = mDelegateMethods.get(className); if (delegateMethods != null && !delegateMethods.isEmpty()) { // If delegateMethods only contains one entry ALL_NATIVES and the class is @@ -320,14 +325,10 @@ public class AsmGenerator { if (hasNativeMethods || !(delegateMethods.size() == 1 && delegateMethods.contains(DelegateClassAdapter.ALL_NATIVES))) { - rv = new DelegateClassAdapter(mLog, rv, className, delegateMethods); + cv = new DelegateClassAdapter(mLog, cv, className, delegateMethods); } } - TransformClassAdapter cv = new TransformClassAdapter(mLog, mStubMethods, - mDeleteReturns.get(className), - newName, rv, - stubNativesOnly, stubNativesOnly || hasNativeMethods); cr.accept(cv, 0 /* flags */); return cw.toByteArray(); } |