diff options
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/AndroidRuntime.cpp | 4 | ||||
-rw-r--r-- | core/jni/android/graphics/Paint.cpp | 8 | ||||
-rw-r--r-- | core/jni/android/graphics/TextLayoutCache.cpp | 5 | ||||
-rw-r--r-- | core/jni/android_net_wifi_Wifi.cpp | 3 | ||||
-rw-r--r-- | core/jni/android_view_InputDevice.cpp | 7 |
5 files changed, 19 insertions, 8 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 879b9d2..b877071 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -549,6 +549,10 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) opt.optionString = heapsizeOptsBuf; mOptions.add(opt); + // Increase the main thread's interpreter stack size for bug 6315322. + opt.optionString = "-XX:mainThreadStackSize=24K"; + mOptions.add(opt); + strcpy(heapgrowthlimitOptsBuf, "-XX:HeapGrowthLimit="); property_get("dalvik.vm.heapgrowthlimit", heapgrowthlimitOptsBuf+20, ""); if (heapgrowthlimitOptsBuf[20] != '\0') { diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp index 376c841..a65262c 100644 --- a/core/jni/android/graphics/Paint.cpp +++ b/core/jni/android/graphics/Paint.cpp @@ -254,6 +254,13 @@ public: obj->setTextAlign(align); } + static void setTextLocale(JNIEnv* env, jobject clazz, SkPaint* obj, jstring locale) { + const char* localeArray = env->GetStringUTFChars(locale, NULL); + SkString skLocale(localeArray); + obj->setTextLocale(skLocale); + env->ReleaseStringUTFChars(locale, localeArray); + } + static jfloat getTextSize(JNIEnv* env, jobject paint) { NPE_CHECK_RETURN_ZERO(env, paint); return SkScalarToFloat(GraphicsJNI::getNativePaint(env, paint)->getTextSize()); @@ -817,6 +824,7 @@ static JNINativeMethod methods[] = { {"native_setRasterizer","(II)I", (void*) SkPaintGlue::setRasterizer}, {"native_getTextAlign","(I)I", (void*) SkPaintGlue::getTextAlign}, {"native_setTextAlign","(II)V", (void*) SkPaintGlue::setTextAlign}, + {"native_setTextLocale","(ILjava/lang/String;)V", (void*) SkPaintGlue::setTextLocale}, {"getTextSize","()F", (void*) SkPaintGlue::getTextSize}, {"setTextSize","(F)V", (void*) SkPaintGlue::setTextSize}, {"getTextScaleX","()F", (void*) SkPaintGlue::getTextScaleX}, diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp index a7abbfa..a97c710 100644 --- a/core/jni/android/graphics/TextLayoutCache.cpp +++ b/core/jni/android/graphics/TextLayoutCache.cpp @@ -29,10 +29,7 @@ extern "C" { namespace android { //-------------------------------------------------------------------------------------------------- -// Using DroidSansArabic for shaping Arabic with Harfbuzz because its metrics are more compatible -// with the "Roboto" metrics (compared to DroidNaskh-Regular). When we will have an Arabic font -// whose metrics are similar to the Roboto ones, then we will need to use it for shaping. -#define TYPEFACE_ARABIC "/system/fonts/DroidSansArabic.ttf" +#define TYPEFACE_ARABIC "/system/fonts/DroidNaskh-Regular-Shift.ttf" #define TYPE_FACE_HEBREW_REGULAR "/system/fonts/DroidSansHebrew-Regular.ttf" #define TYPE_FACE_HEBREW_BOLD "/system/fonts/DroidSansHebrew-Bold.ttf" #define TYPEFACE_BENGALI "/system/fonts/Lohit-Bengali.ttf" diff --git a/core/jni/android_net_wifi_Wifi.cpp b/core/jni/android_net_wifi_Wifi.cpp index c5ff16e..e7c4c23 100644 --- a/core/jni/android_net_wifi_Wifi.cpp +++ b/core/jni/android_net_wifi_Wifi.cpp @@ -27,6 +27,7 @@ #define WIFI_PKG_NAME "android/net/wifi/WifiNative" #define BUF_SIZE 256 +#define EVENT_BUF_SIZE 2048 namespace android { @@ -140,7 +141,7 @@ static void android_net_wifi_closeSupplicantConnection(JNIEnv* env, jobject, jst static jstring android_net_wifi_waitForEvent(JNIEnv* env, jobject, jstring jIface) { - char buf[BUF_SIZE]; + char buf[EVENT_BUF_SIZE]; ScopedUtfChars ifname(env, jIface); int nread = ::wifi_wait_for_event(ifname.c_str(), buf, sizeof buf); if (nread > 0) { diff --git a/core/jni/android_view_InputDevice.cpp b/core/jni/android_view_InputDevice.cpp index d7d476a..e8a3a3b 100644 --- a/core/jni/android_view_InputDevice.cpp +++ b/core/jni/android_view_InputDevice.cpp @@ -54,8 +54,9 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi } ScopedLocalRef<jobject> inputDeviceObj(env, env->NewObject(gInputDeviceClassInfo.clazz, - gInputDeviceClassInfo.ctor, deviceInfo.getId(), nameObj.get(), - descriptorObj.get(), deviceInfo.getSources(), deviceInfo.getKeyboardType(), + gInputDeviceClassInfo.ctor, deviceInfo.getId(), deviceInfo.getGeneration(), + nameObj.get(), descriptorObj.get(), + deviceInfo.getSources(), deviceInfo.getKeyboardType(), kcmObj.get())); const Vector<InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges(); @@ -86,7 +87,7 @@ int register_android_view_InputDevice(JNIEnv* env) gInputDeviceClassInfo.clazz = jclass(env->NewGlobalRef(gInputDeviceClassInfo.clazz)); GET_METHOD_ID(gInputDeviceClassInfo.ctor, gInputDeviceClassInfo.clazz, - "<init>", "(ILjava/lang/String;Ljava/lang/String;IILandroid/view/KeyCharacterMap;)V"); + "<init>", "(IILjava/lang/String;Ljava/lang/String;IILandroid/view/KeyCharacterMap;)V"); GET_METHOD_ID(gInputDeviceClassInfo.addMotionRange, gInputDeviceClassInfo.clazz, "addMotionRange", "(IIFFFF)V"); |