summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-04-22 13:50:09 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-22 13:50:10 +0000
commit97ca5855f9baebb03a6c65363c613d305d62c52e (patch)
tree1fe9d19690461a1c7d6a5fe0967f7b9fcc29da08 /luni
parent298bf64cb09d9e11f99aeda8a7a0a1f709ec91f9 (diff)
parent3f7c674bd1d220d1a8c149b5658145171c28094f (diff)
downloadlibcore-97ca5855f9baebb03a6c65363c613d305d62c52e.zip
libcore-97ca5855f9baebb03a6c65363c613d305d62c52e.tar.gz
libcore-97ca5855f9baebb03a6c65363c613d305d62c52e.tar.bz2
Merge "Move java.nio.Charsets to libcore.util."
Diffstat (limited to 'luni')
-rw-r--r--luni/src/main/java/libcore/util/CharsetUtils.java (renamed from luni/src/main/java/java/nio/charset/Charsets.java)6
-rw-r--r--luni/src/main/native/Register.cpp2
-rw-r--r--luni/src/main/native/libcore_util_CharsetUtils.cpp (renamed from luni/src/main/native/java_nio_charset_Charsets.cpp)4
-rw-r--r--luni/src/main/native/sub.mk2
4 files changed, 7 insertions, 7 deletions
diff --git a/luni/src/main/java/java/nio/charset/Charsets.java b/luni/src/main/java/libcore/util/CharsetUtils.java
index 3dede7a..2e426c4 100644
--- a/luni/src/main/java/java/nio/charset/Charsets.java
+++ b/luni/src/main/java/libcore/util/CharsetUtils.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package java.nio.charset;
+package libcore.util;
/**
* Various special-case charset conversions (for performance).
*
* @hide internal use only
*/
-public final class Charsets {
+public final class CharsetUtils {
/**
* Returns a new byte array containing the bytes corresponding to the given characters,
* encoded in US-ASCII. Unrepresentable characters are replaced by (byte) '?'.
@@ -75,6 +75,6 @@ public final class Charsets {
*/
public static native void isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars);
- private Charsets() {
+ private CharsetUtils() {
}
}
diff --git a/luni/src/main/native/Register.cpp b/luni/src/main/native/Register.cpp
index 035b1d9..0f2d0ad 100644
--- a/luni/src/main/native/Register.cpp
+++ b/luni/src/main/native/Register.cpp
@@ -48,7 +48,6 @@ jint JNI_OnLoad(JavaVM* vm, void*) {
REGISTER(register_java_lang_System);
REGISTER(register_java_math_NativeBN);
REGISTER(register_java_nio_ByteOrder);
- REGISTER(register_java_nio_charset_Charsets);
REGISTER(register_java_text_Bidi);
REGISTER(register_java_util_jar_StrictJarFile);
REGISTER(register_java_util_regex_Matcher);
@@ -70,6 +69,7 @@ jint JNI_OnLoad(JavaVM* vm, void*) {
REGISTER(register_libcore_io_AsynchronousCloseMonitor);
REGISTER(register_libcore_io_Memory);
REGISTER(register_libcore_io_Posix);
+ REGISTER(register_libcore_util_CharsetUtils);
REGISTER(register_org_apache_harmony_dalvik_NativeTestTarget);
REGISTER(register_org_apache_harmony_xml_ExpatParser);
REGISTER(register_sun_misc_Unsafe);
diff --git a/luni/src/main/native/java_nio_charset_Charsets.cpp b/luni/src/main/native/libcore_util_CharsetUtils.cpp
index a49ba22..57c8172 100644
--- a/luni/src/main/native/java_nio_charset_Charsets.cpp
+++ b/luni/src/main/native/libcore_util_CharsetUtils.cpp
@@ -245,6 +245,6 @@ static JNINativeMethod gMethods[] = {
NATIVE_METHOD(Charsets, toIsoLatin1Bytes, "([CII)[B"),
NATIVE_METHOD(Charsets, toUtf8Bytes, "([CII)[B"),
};
-void register_java_nio_charset_Charsets(JNIEnv* env) {
- jniRegisterNativeMethods(env, "java/nio/charset/Charsets", gMethods, NELEM(gMethods));
+void register_libcore_util_CharsetUtils(JNIEnv* env) {
+ jniRegisterNativeMethods(env, "libcore/util/CharsetUtils", gMethods, NELEM(gMethods));
}
diff --git a/luni/src/main/native/sub.mk b/luni/src/main/native/sub.mk
index 2bc44ed..a90c683 100644
--- a/luni/src/main/native/sub.mk
+++ b/luni/src/main/native/sub.mk
@@ -28,7 +28,6 @@ LOCAL_SRC_FILES := \
java_lang_System.cpp \
java_math_NativeBN.cpp \
java_nio_ByteOrder.cpp \
- java_nio_charset_Charsets.cpp \
java_text_Bidi.cpp \
java_util_jar_StrictJarFile.cpp \
java_util_regex_Matcher.cpp \
@@ -50,6 +49,7 @@ LOCAL_SRC_FILES := \
libcore_io_AsynchronousCloseMonitor.cpp \
libcore_io_Memory.cpp \
libcore_io_Posix.cpp \
+ libcore_util_CharsetUtils.cpp \
org_apache_harmony_xml_ExpatParser.cpp \
readlink.cpp \
sun_misc_Unsafe.cpp \