Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16191f8c authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

resolved conflicts for merge of 0e2049cd to klp-modular-dev

Change-Id: I518e18d0c769a4cb5d325fc22165a8ead36e11de
parents ec6676dd 0e2049cd
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -518,7 +518,8 @@ public final class Bitmap_Delegate {
    }
    }


    @LayoutlibDelegate
    @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.
        // get the delegate from the native int.
        Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap);
        Bitmap_Delegate delegate = sManager.getDelegate(nativeBitmap);
        if (delegate == null) {
        if (delegate == null) {
+4 −4
Original line number Original line Diff line number Diff line
@@ -275,21 +275,21 @@ public class Region_Delegate {
    }
    }


    @LayoutlibDelegate
    @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);
        Region_Delegate dstRegion = sManager.getDelegate(native_dst);
        if (dstRegion == null) {
        if (dstRegion == null) {
            return true;
            return;
        }
        }


        Region_Delegate srcRegion = sManager.getDelegate(native_src);
        Region_Delegate srcRegion = sManager.getDelegate(native_src);
        if (srcRegion == null) {
        if (srcRegion == null) {
            return true;
            return;
        }
        }


        dstRegion.mArea.reset();
        dstRegion.mArea.reset();
        dstRegion.mArea.add(srcRegion.mArea);
        dstRegion.mArea.add(srcRegion.mArea);


        return true;
        return;
    }
    }


    @LayoutlibDelegate
    @LayoutlibDelegate
+9 −0
Original line number Original line Diff line number Diff line
@@ -129,6 +129,15 @@ public class TestDelegates extends TestCase {
                                originalClass.getName()),
                                originalClass.getName()),
                        delegateMethod.getAnnotation(LayoutlibDelegate.class));
                        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
                // check that the method is static
                assertTrue(
                assertTrue(
                        String.format(
                        String.format(