summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-03-14 13:24:56 -0700
committerDeepanshu Gupta <deepanshu@google.com>2014-03-14 13:31:12 -0700
commit103d40960daa0420995aa12881bef33892a0a2ab (patch)
tree08185e83298b37933330f61fd7f21df2fb04aa88 /tools
parent885ddcaa6df92d173a5b8798d0f37ae63ae2b6a1 (diff)
downloadframeworks_base-103d40960daa0420995aa12881bef33892a0a2ab.zip
frameworks_base-103d40960daa0420995aa12881bef33892a0a2ab.tar.gz
frameworks_base-103d40960daa0420995aa12881bef33892a0a2ab.tar.bz2
Add native method delegates to layoutlib
Add delegates for Path.native_isConvex and ICU.getCurrencyNumericCode. The original methods were added in 5be83edd15e11420287cc0af93a95d5a6dfae68f and d627bd4525e41b0503f94c2887c3e01618c73105 respectively. TODO: Implement Path_Delegate.native_isConvex Change-Id: If1046467d3950ab6955c6b81383a60fd6bd03fd2
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java7
-rw-r--r--tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java6
2 files changed, 13 insertions, 0 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
index 6666385..b235408 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
@@ -142,6 +142,13 @@ public final class Path_Delegate {
}
@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);
if (pathDelegate == null) {
diff --git a/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java b/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java
index d40352f..78ef06d 100644
--- a/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java
+++ b/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java
@@ -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;
@@ -117,6 +118,11 @@ public class ICU_Delegate {
}
@LayoutlibDelegate
+ /*package*/ static int getCurrencyNumericCode(String currencyCode) {
+ return Currency.getInstance(currencyCode).getNumericCode();
+ }
+
+ @LayoutlibDelegate
/*package*/ static String getCurrencySymbol(String locale, String currencyCode) {
return "";
}