Loading tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java +2 −1 Original line number Diff line number Diff line Loading @@ -518,7 +518,8 @@ public final class Bitmap_Delegate { } @LayoutlibDelegate /*package*/ static void nativeSetHasAlpha(int nativeBitmap, boolean hasAlpha) { /*package*/ static void nativeSetAlphaAndPremultiplied(int nativeBitmap, boolean hasAlpha, boolean isPremul) { // get the delegate from the native int. Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); if (delegate == null) { Loading tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java +4 −4 Original line number Diff line number Diff line Loading @@ -275,21 +275,21 @@ public class Region_Delegate { } @LayoutlibDelegate /*package*/ static boolean nativeSetRegion(int native_dst, int native_src) { /*package*/ static void nativeSetRegion(int native_dst, int 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 Loading tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java +9 −0 Original line number Diff line number Diff line Loading @@ -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( Loading Loading
tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java +2 −1 Original line number Diff line number Diff line Loading @@ -518,7 +518,8 @@ public final class Bitmap_Delegate { } @LayoutlibDelegate /*package*/ static void nativeSetHasAlpha(int nativeBitmap, boolean hasAlpha) { /*package*/ static void nativeSetAlphaAndPremultiplied(int nativeBitmap, boolean hasAlpha, boolean isPremul) { // get the delegate from the native int. Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap); if (delegate == null) { Loading
tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java +4 −4 Original line number Diff line number Diff line Loading @@ -275,21 +275,21 @@ public class Region_Delegate { } @LayoutlibDelegate /*package*/ static boolean nativeSetRegion(int native_dst, int native_src) { /*package*/ static void nativeSetRegion(int native_dst, int 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 Loading
tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/TestDelegates.java +9 −0 Original line number Diff line number Diff line Loading @@ -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( Loading