diff options
| author | Xavier Ducrohet <xav@android.com> | 2011-02-09 17:17:49 -0800 |
|---|---|---|
| committer | Xavier Ducrohet <xav@android.com> | 2011-02-09 17:29:29 -0800 |
| commit | 9a4fe29c8d92014d2d9a848e9116b8cc9d0842f9 (patch) | |
| tree | 97d83ce52c0a5cffaa82be0bae9919f112acd7c9 /tools/layoutlib/bridge/src/android/animation | |
| parent | e18457fbef2ef8b74fb6d7a023b5a6fe4a707bed (diff) | |
| download | frameworks_base-9a4fe29c8d92014d2d9a848e9116b8cc9d0842f9.zip frameworks_base-9a4fe29c8d92014d2d9a848e9116b8cc9d0842f9.tar.gz frameworks_base-9a4fe29c8d92014d2d9a848e9116b8cc9d0842f9.tar.bz2 | |
LayoutLib: Annotate the custom delegate methods.
Every method implementing a delegate needed by the
layoutlib_create bytecode modification must now be
annotated with LayoutlibDelegate.
The methods in the original source code that are delegated
are already automatically annotated. Now with the implementations
being annotated we can do bi-directional tests and find not
only missing implementations but also dead obsolete code.
This will be useful when backporting to earlier versions of
Android, or when native (non public) method disappear. In fact,
the new test detected one such method in Shader.
Change-Id: I491708b68ac2736ca5669aa86cd5e930a00f9db3
Diffstat (limited to 'tools/layoutlib/bridge/src/android/animation')
| -rw-r--r-- | tools/layoutlib/bridge/src/android/animation/PropertyValuesHolder_Delegate.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/layoutlib/bridge/src/android/animation/PropertyValuesHolder_Delegate.java b/tools/layoutlib/bridge/src/android/animation/PropertyValuesHolder_Delegate.java index 7d41d1c..7b444aa 100644 --- a/tools/layoutlib/bridge/src/android/animation/PropertyValuesHolder_Delegate.java +++ b/tools/layoutlib/bridge/src/android/animation/PropertyValuesHolder_Delegate.java @@ -17,6 +17,7 @@ package android.animation; import com.android.layoutlib.bridge.impl.DelegateManager; +import com.android.tools.layoutlib.annotations.LayoutlibDelegate; /** * Delegate implementing the native methods of android.animation.PropertyValuesHolder @@ -34,20 +35,24 @@ import com.android.layoutlib.bridge.impl.DelegateManager; */ /*package*/ class PropertyValuesHolder_Delegate { + @LayoutlibDelegate /*package*/ static int nGetIntMethod(Class<?> targetClass, String methodName) { // return 0 to force PropertyValuesHolder to use Java reflection. return 0; } + @LayoutlibDelegate /*package*/ static int nGetFloatMethod(Class<?> targetClass, String methodName) { // return 0 to force PropertyValuesHolder to use Java reflection. return 0; } + @LayoutlibDelegate /*package*/ static void nCallIntMethod(Object target, int methodID, int arg) { // do nothing } + @LayoutlibDelegate /*package*/ static void nCallFloatMethod(Object target, int methodID, float arg) { // do nothing } |
