Convert utils fastjni -> @FastNative
Test: builds & boots, refactor no behavior change
Change-Id: Ieb569a70fd05b88a8d2bd7b285099c1fc1888a75
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index 428159a..ef32afee 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -2161,9 +2161,11 @@
(void*) android_content_AssetManager_readAsset },
{ "seekAsset", "(JJI)J",
(void*) android_content_AssetManager_seekAsset },
- { "getAssetLength", "!(J)J",
+ // @FastNative
+ { "getAssetLength", "(J)J",
(void*) android_content_AssetManager_getAssetLength },
- { "getAssetRemainingLength", "!(J)J",
+ // @FastNative
+ { "getAssetRemainingLength", "(J)J",
(void*) android_content_AssetManager_getAssetRemainingLength },
{ "addAssetPathNative", "(Ljava/lang/String;Z)I",
(void*) android_content_AssetManager_addAssetPath },
@@ -2179,25 +2181,35 @@
(void*) android_content_AssetManager_getNonSystemLocales },
{ "getSizeConfigurations", "()[Landroid/content/res/Configuration;",
(void*) android_content_AssetManager_getSizeConfigurations },
- { "setConfiguration", "!(IILjava/lang/String;IIIIIIIIIIIIII)V",
+ // @FastNative
+ { "setConfiguration", "(IILjava/lang/String;IIIIIIIIIIIIII)V",
(void*) android_content_AssetManager_setConfiguration },
- { "getResourceIdentifier","!(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I",
+ // @FastNative
+ { "getResourceIdentifier","(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I",
(void*) android_content_AssetManager_getResourceIdentifier },
- { "getResourceName","!(I)Ljava/lang/String;",
+ // @FastNative
+ { "getResourceName","(I)Ljava/lang/String;",
(void*) android_content_AssetManager_getResourceName },
- { "getResourcePackageName","!(I)Ljava/lang/String;",
+ // @FastNative
+ { "getResourcePackageName","(I)Ljava/lang/String;",
(void*) android_content_AssetManager_getResourcePackageName },
- { "getResourceTypeName","!(I)Ljava/lang/String;",
+ // @FastNative
+ { "getResourceTypeName","(I)Ljava/lang/String;",
(void*) android_content_AssetManager_getResourceTypeName },
- { "getResourceEntryName","!(I)Ljava/lang/String;",
+ // @FastNative
+ { "getResourceEntryName","(I)Ljava/lang/String;",
(void*) android_content_AssetManager_getResourceEntryName },
- { "loadResourceValue","!(ISLandroid/util/TypedValue;Z)I",
+ // @FastNative
+ { "loadResourceValue","(ISLandroid/util/TypedValue;Z)I",
(void*) android_content_AssetManager_loadResourceValue },
- { "loadResourceBagValue","!(IILandroid/util/TypedValue;Z)I",
+ // @FastNative
+ { "loadResourceBagValue","(IILandroid/util/TypedValue;Z)I",
(void*) android_content_AssetManager_loadResourceBagValue },
- { "getStringBlockCount","!()I",
+ // @FastNative
+ { "getStringBlockCount","()I",
(void*) android_content_AssetManager_getStringBlockCount },
- { "getNativeStringBlock","!(I)J",
+ // @FastNative
+ { "getNativeStringBlock","(I)J",
(void*) android_content_AssetManager_getNativeStringBlock },
{ "getCookieName","(I)Ljava/lang/String;",
(void*) android_content_AssetManager_getCookieName },
@@ -2215,21 +2227,28 @@
(void*) android_content_AssetManager_copyTheme },
{ "clearTheme", "(J)V",
(void*) android_content_AssetManager_clearTheme },
- { "loadThemeAttributeValue", "!(JILandroid/util/TypedValue;Z)I",
+ // @FastNative
+ { "loadThemeAttributeValue", "(JILandroid/util/TypedValue;Z)I",
(void*) android_content_AssetManager_loadThemeAttributeValue },
- { "getThemeChangingConfigurations", "!(J)I",
+ // @FastNative
+ { "getThemeChangingConfigurations", "(J)I",
(void*) android_content_AssetManager_getThemeChangingConfigurations },
{ "dumpTheme", "(JILjava/lang/String;Ljava/lang/String;)V",
(void*) android_content_AssetManager_dumpTheme },
- { "applyStyle","!(JIIJ[I[I[I)Z",
+ // @FastNative
+ { "applyStyle","(JIIJ[I[I[I)Z",
(void*) android_content_AssetManager_applyStyle },
- { "resolveAttrs","!(JII[I[I[I[I)Z",
+ // @FastNative
+ { "resolveAttrs","(JII[I[I[I[I)Z",
(void*) android_content_AssetManager_resolveAttrs },
- { "retrieveAttributes","!(J[I[I[I)Z",
+ // @FastNative
+ { "retrieveAttributes","(J[I[I[I)Z",
(void*) android_content_AssetManager_retrieveAttributes },
- { "getArraySize","!(I)I",
+ // @FastNative
+ { "getArraySize","(I)I",
(void*) android_content_AssetManager_getArraySize },
- { "retrieveArray","!(I[I)I",
+ // @FastNative
+ { "retrieveArray","(I[I)I",
(void*) android_content_AssetManager_retrieveArray },
// XML files.
@@ -2239,11 +2258,14 @@
// Arrays.
{ "getArrayStringResource","(I)[Ljava/lang/String;",
(void*) android_content_AssetManager_getArrayStringResource },
- { "getArrayStringInfo","!(I)[I",
+ // @FastNative
+ { "getArrayStringInfo","(I)[I",
(void*) android_content_AssetManager_getArrayStringInfo },
- { "getArrayIntResource","!(I)[I",
+ // @FastNative
+ { "getArrayIntResource","(I)[I",
(void*) android_content_AssetManager_getArrayIntResource },
- { "getStyleAttributes","!(I)[I",
+ // @FastNative
+ { "getStyleAttributes","(I)[I",
(void*) android_content_AssetManager_getStyleAttributes },
// Bookkeeping.
diff --git a/core/jni/android_util_PathParser.cpp b/core/jni/android_util_PathParser.cpp
index 53669a8..10efb95 100644
--- a/core/jni/android_util_PathParser.cpp
+++ b/core/jni/android_util_PathParser.cpp
@@ -101,14 +101,17 @@
static const JNINativeMethod gMethods[] = {
{"nParseStringForPath", "(JLjava/lang/String;I)V", (void*)parseStringForPath},
- {"nCreateEmptyPathData", "!()J", (void*)createEmptyPathData},
- {"nCreatePathData", "!(J)J", (void*)createPathData},
{"nCreatePathDataFromString", "(Ljava/lang/String;I)J", (void*)createPathDataFromStringPath},
- {"nInterpolatePathData", "!(JJJF)Z", (void*)interpolatePathData},
- {"nFinalize", "!(J)V", (void*)deletePathData},
- {"nCanMorph", "!(JJ)Z", (void*)canMorphPathData},
- {"nSetPathData", "!(JJ)V", (void*)setPathData},
- {"nCreatePathFromPathData", "!(JJ)V", (void*)setSkPathFromPathData},
+
+ // ---------------- @FastNative -----------------
+
+ {"nCreateEmptyPathData", "()J", (void*)createEmptyPathData},
+ {"nCreatePathData", "(J)J", (void*)createPathData},
+ {"nInterpolatePathData", "(JJJF)Z", (void*)interpolatePathData},
+ {"nFinalize", "(J)V", (void*)deletePathData},
+ {"nCanMorph", "(JJ)Z", (void*)canMorphPathData},
+ {"nSetPathData", "(JJ)V", (void*)setPathData},
+ {"nCreatePathFromPathData", "(JJ)V", (void*)setSkPathFromPathData},
};
int register_android_util_PathParser(JNIEnv* env) {
diff --git a/core/jni/android_util_XmlBlock.cpp b/core/jni/android_util_XmlBlock.cpp
index a15c23c..99882cc 100644
--- a/core/jni/android_util_XmlBlock.cpp
+++ b/core/jni/android_util_XmlBlock.cpp
@@ -372,42 +372,45 @@
(void*) android_content_XmlBlock_nativeGetStringBlock },
{ "nativeCreateParseState", "(J)J",
(void*) android_content_XmlBlock_nativeCreateParseState },
- { "nativeNext", "!(J)I",
- (void*) android_content_XmlBlock_nativeNext },
- { "nativeGetNamespace", "!(J)I",
- (void*) android_content_XmlBlock_nativeGetNamespace },
- { "nativeGetName", "!(J)I",
- (void*) android_content_XmlBlock_nativeGetName },
- { "nativeGetText", "!(J)I",
- (void*) android_content_XmlBlock_nativeGetText },
- { "nativeGetLineNumber", "!(J)I",
- (void*) android_content_XmlBlock_nativeGetLineNumber },
- { "nativeGetAttributeCount", "!(J)I",
- (void*) android_content_XmlBlock_nativeGetAttributeCount },
- { "nativeGetAttributeNamespace","!(JI)I",
- (void*) android_content_XmlBlock_nativeGetAttributeNamespace },
- { "nativeGetAttributeName", "!(JI)I",
- (void*) android_content_XmlBlock_nativeGetAttributeName },
- { "nativeGetAttributeResource", "!(JI)I",
- (void*) android_content_XmlBlock_nativeGetAttributeResource },
- { "nativeGetAttributeDataType", "!(JI)I",
- (void*) android_content_XmlBlock_nativeGetAttributeDataType },
- { "nativeGetAttributeData", "!(JI)I",
- (void*) android_content_XmlBlock_nativeGetAttributeData },
- { "nativeGetAttributeStringValue", "!(JI)I",
- (void*) android_content_XmlBlock_nativeGetAttributeStringValue },
- { "nativeGetAttributeIndex", "!(JLjava/lang/String;Ljava/lang/String;)I",
- (void*) android_content_XmlBlock_nativeGetAttributeIndex },
- { "nativeGetIdAttribute", "!(J)I",
- (void*) android_content_XmlBlock_nativeGetIdAttribute },
- { "nativeGetClassAttribute", "!(J)I",
- (void*) android_content_XmlBlock_nativeGetClassAttribute },
- { "nativeGetStyleAttribute", "!(J)I",
- (void*) android_content_XmlBlock_nativeGetStyleAttribute },
{ "nativeDestroyParseState", "(J)V",
(void*) android_content_XmlBlock_nativeDestroyParseState },
{ "nativeDestroy", "(J)V",
(void*) android_content_XmlBlock_nativeDestroy },
+
+ // ------------------- @FastNative ----------------------
+
+ { "nativeNext", "(J)I",
+ (void*) android_content_XmlBlock_nativeNext },
+ { "nativeGetNamespace", "(J)I",
+ (void*) android_content_XmlBlock_nativeGetNamespace },
+ { "nativeGetName", "(J)I",
+ (void*) android_content_XmlBlock_nativeGetName },
+ { "nativeGetText", "(J)I",
+ (void*) android_content_XmlBlock_nativeGetText },
+ { "nativeGetLineNumber", "(J)I",
+ (void*) android_content_XmlBlock_nativeGetLineNumber },
+ { "nativeGetAttributeCount", "(J)I",
+ (void*) android_content_XmlBlock_nativeGetAttributeCount },
+ { "nativeGetAttributeNamespace","(JI)I",
+ (void*) android_content_XmlBlock_nativeGetAttributeNamespace },
+ { "nativeGetAttributeName", "(JI)I",
+ (void*) android_content_XmlBlock_nativeGetAttributeName },
+ { "nativeGetAttributeResource", "(JI)I",
+ (void*) android_content_XmlBlock_nativeGetAttributeResource },
+ { "nativeGetAttributeDataType", "(JI)I",
+ (void*) android_content_XmlBlock_nativeGetAttributeDataType },
+ { "nativeGetAttributeData", "(JI)I",
+ (void*) android_content_XmlBlock_nativeGetAttributeData },
+ { "nativeGetAttributeStringValue", "(JI)I",
+ (void*) android_content_XmlBlock_nativeGetAttributeStringValue },
+ { "nativeGetAttributeIndex", "(JLjava/lang/String;Ljava/lang/String;)I",
+ (void*) android_content_XmlBlock_nativeGetAttributeIndex },
+ { "nativeGetIdAttribute", "(J)I",
+ (void*) android_content_XmlBlock_nativeGetIdAttribute },
+ { "nativeGetClassAttribute", "(J)I",
+ (void*) android_content_XmlBlock_nativeGetClassAttribute },
+ { "nativeGetStyleAttribute", "(J)I",
+ (void*) android_content_XmlBlock_nativeGetStyleAttribute },
};
int register_android_content_XmlBlock(JNIEnv* env)