diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2014-04-16 11:58:32 -0700 |
---|---|---|
committer | Deepanshu Gupta <deepanshu@google.com> | 2014-04-16 11:58:32 -0700 |
commit | 16191f8c4fe92036c8ff2eecd4e57b4642068b99 (patch) | |
tree | fe4de8b0a042ada83940954a78b1c0118183e4fb /tools | |
parent | ec6676ddf682e22dfb56aa54359c9480dfa661d3 (diff) | |
parent | 0e2049cd3905aac54496d14355117f8325e37357 (diff) | |
download | frameworks_base-16191f8c4fe92036c8ff2eecd4e57b4642068b99.zip frameworks_base-16191f8c4fe92036c8ff2eecd4e57b4642068b99.tar.gz frameworks_base-16191f8c4fe92036c8ff2eecd4e57b4642068b99.tar.bz2 |
resolved conflicts for merge of 0e2049cd to klp-modular-dev
Change-Id: I518e18d0c769a4cb5d325fc22165a8ead36e11de
Diffstat (limited to 'tools')
3 files changed, 15 insertions, 5 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java index 89d7e23..7016136 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java @@ -518,7 +518,8 @@ public final class Bitmap_Delegate { } @LayoutlibDelegate - /*package*/ static void nativeSetHasAlpha(long nativeBitmap, boolean hasAlpha) { + /*package*/ static void nativeSetAlphaAndPremultiplied(long nativeBitmap, boolean hasAlpha, + boolean isPremul) { // get the delegate from the native int. Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); if (delegate == null) { diff --git a/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java index ea23649..d2aae92 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java @@ -275,21 +275,21 @@ public class Region_Delegate { } @LayoutlibDelegate - /*package*/ static boolean nativeSetRegion(long native_dst, long native_src) { + /*package*/ static void nativeSetRegion(long native_dst, long native_src) { Region_Delegate dstRegion = sManager.getDelegate(native_dst); if (dstRegion == null) { - return true; + return; } Region_Delegate srcRegion = sManager.getDelegate(native_src); if (srcRegion == null) { - return true; + return; } dstRegion.mArea.reset(); dstRegion.mArea.add(srcRegion.mArea); - return true; + return; } @LayoutlibDelegate diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java index d3218db..7c0bc84 100644 --- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java +++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java @@ -129,6 +129,15 @@ public class TestDelegates extends TestCase { originalClass.getName()), delegateMethod.getAnnotation(LayoutlibDelegate.class)); + // check the return type of the methods match. + assertTrue( + String.format("Delegate method %1$s.%2$s does not match the corresponding " + + "framework method which returns %3$s", + delegateClass.getName(), + getMethodName(delegateMethod), + originalMethod.getReturnType().getName()), + delegateMethod.getReturnType() == originalMethod.getReturnType()); + // check that the method is static assertTrue( String.format( |