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

Commit 103d4096 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

Add native method delegates to layoutlib

Add delegates for Path.native_isConvex and ICU.getCurrencyNumericCode.
The original methods were added in
5be83edd and
d627bd4525e41b0503f94c2887c3e01618c73105 respectively.

TODO: Implement Path_Delegate.native_isConvex

Change-Id: If1046467d3950ab6955c6b81383a60fd6bd03fd2
parent 885ddcaa
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -141,6 +141,13 @@ public final class Path_Delegate {
        pathDstDelegate.set(pathSrcDelegate);
    }

    @LayoutlibDelegate
    /*package*/ static boolean native_isConvex(long nPath) {
        Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
                "Path.isConvex is not supported.", null, null);
        return true;
    }

    @LayoutlibDelegate
    /*package*/ static int native_getFillType(long nPath) {
        Path_Delegate pathDelegate = sManager.getDelegate(nPath);
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package libcore.icu;

import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
import com.ibm.icu.text.DateTimePatternGenerator;
import com.ibm.icu.util.Currency;
import com.ibm.icu.util.ULocale;

import java.util.Locale;
@@ -116,6 +117,11 @@ public class ICU_Delegate {
        return 0;
    }

    @LayoutlibDelegate
    /*package*/ static int getCurrencyNumericCode(String currencyCode) {
        return Currency.getInstance(currencyCode).getNumericCode();
    }

    @LayoutlibDelegate
    /*package*/ static String getCurrencySymbol(String locale, String currencyCode) {
        return "";