diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/widget/Spinner.java | 6 | ||||
| -rw-r--r-- | core/jni/android/graphics/Matrix.cpp | 12 | ||||
| -rw-r--r-- | core/jni/android_util_AssetManager.cpp | 13 | ||||
| -rw-r--r-- | core/res/AndroidManifest.xml | 2 | ||||
| -rw-r--r-- | core/res/res/values/strings.xml | 2 |
5 files changed, 19 insertions, 16 deletions
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java index b75d36f..5cbabef 100644 --- a/core/java/android/widget/Spinner.java +++ b/core/java/android/widget/Spinner.java @@ -952,8 +952,10 @@ public class Spinner extends AbsSpinner implements OnClickListener { private CharSequence mPrompt; public void dismiss() { - mPopup.dismiss(); - mPopup = null; + if (mPopup != null) { + mPopup.dismiss(); + mPopup = null; + } } public boolean isShowing() { diff --git a/core/jni/android/graphics/Matrix.cpp b/core/jni/android/graphics/Matrix.cpp index d0871ac5..4bd59e7 100644 --- a/core/jni/android/graphics/Matrix.cpp +++ b/core/jni/android/graphics/Matrix.cpp @@ -239,8 +239,8 @@ public: SkASSERT(dstIndex >= 0); SkASSERT((unsigned)ptCount <= 4); - AutoJavaFloatArray autoSrc(env, jsrc, srcIndex + (ptCount << 1)); - AutoJavaFloatArray autoDst(env, jdst, dstIndex + (ptCount << 1)); + AutoJavaFloatArray autoSrc(env, jsrc, srcIndex + (ptCount << 1), kRO_JNIAccess); + AutoJavaFloatArray autoDst(env, jdst, dstIndex + (ptCount << 1), kRW_JNIAccess); float* src = autoSrc.ptr() + srcIndex; float* dst = autoDst.ptr() + dstIndex; @@ -268,8 +268,8 @@ public: jfloatArray src, int srcIndex, int ptCount, bool isPts) { SkASSERT(ptCount >= 0); - AutoJavaFloatArray autoSrc(env, src, srcIndex + (ptCount << 1)); - AutoJavaFloatArray autoDst(env, dst, dstIndex + (ptCount << 1)); + AutoJavaFloatArray autoSrc(env, src, srcIndex + (ptCount << 1), kRO_JNIAccess); + AutoJavaFloatArray autoDst(env, dst, dstIndex + (ptCount << 1), kRW_JNIAccess); float* srcArray = autoSrc.ptr() + srcIndex; float* dstArray = autoDst.ptr() + dstIndex; @@ -318,7 +318,7 @@ public: } static void getValues(JNIEnv* env, jobject clazz, SkMatrix* matrix, jfloatArray values) { - AutoJavaFloatArray autoValues(env, values, 9); + AutoJavaFloatArray autoValues(env, values, 9, kRW_JNIAccess); float* dst = autoValues.ptr(); #ifdef SK_SCALAR_IS_FIXED @@ -336,7 +336,7 @@ public: } static void setValues(JNIEnv* env, jobject clazz, SkMatrix* matrix, jfloatArray values) { - AutoJavaFloatArray autoValues(env, values, 9); + AutoJavaFloatArray autoValues(env, values, 9, kRO_JNIAccess); const float* src = autoValues.ptr(); #ifdef SK_SCALAR_IS_FIXED diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp index 2c23f9d..8836918 100644 --- a/core/jni/android_util_AssetManager.cpp +++ b/core/jni/android_util_AssetManager.cpp @@ -229,7 +229,8 @@ static jint android_content_AssetManager_openNonAssetNative(JNIEnv* env, jobject } Asset* a = cookie - ? am->openNonAsset((void*)cookie, fileName8.c_str(), (Asset::AccessMode)mode) + ? am->openNonAsset(static_cast<int32_t>(cookie), fileName8.c_str(), + (Asset::AccessMode)mode) : am->openNonAsset(fileName8.c_str(), (Asset::AccessMode)mode); if (a == NULL) { @@ -260,7 +261,7 @@ static jobject android_content_AssetManager_openNonAssetFdNative(JNIEnv* env, jo } Asset* a = cookie - ? am->openNonAsset((void*)cookie, fileName8.c_str(), Asset::ACCESS_RANDOM) + ? am->openNonAsset(static_cast<int32_t>(cookie), fileName8.c_str(), Asset::ACCESS_RANDOM) : am->openNonAsset(fileName8.c_str(), Asset::ACCESS_RANDOM); if (a == NULL) { @@ -435,10 +436,10 @@ static jint android_content_AssetManager_addAssetPath(JNIEnv* env, jobject clazz return 0; } - void* cookie; + int32_t cookie; bool res = am->addAssetPath(String8(path8.c_str()), &cookie); - return (res) ? (jint)cookie : 0; + return (res) ? static_cast<jint>(cookie) : 0; } static jboolean android_content_AssetManager_isUpToDate(JNIEnv* env, jobject clazz) @@ -800,7 +801,7 @@ static jstring android_content_AssetManager_getCookieName(JNIEnv* env, jobject c if (am == NULL) { return NULL; } - String8 name(am->getAssetPath((void*)cookie)); + String8 name(am->getAssetPath(static_cast<int32_t>(cookie))); if (name.length() == 0) { jniThrowException(env, "java/lang/IndexOutOfBoundsException", "Empty cookie name"); return NULL; @@ -1386,7 +1387,7 @@ static jint android_content_AssetManager_openXmlAssetNative(JNIEnv* env, jobject } Asset* a = cookie - ? am->openNonAsset((void*)cookie, fileName8.c_str(), Asset::ACCESS_BUFFER) + ? am->openNonAsset(static_cast<int32_t>(cookie), fileName8.c_str(), Asset::ACCESS_BUFFER) : am->openNonAsset(fileName8.c_str(), Asset::ACCESS_BUFFER); if (a == NULL) { diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index e546117..cf40501 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1288,7 +1288,7 @@ <!-- @hide Allows an application to create/manage/remove stacks --> <permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" android:permissionGroup="android.permission-group.APP_INFO" - android:protectionLevel="signature" + android:protectionLevel="signature|system" android:label="@string/permlab_manageActivityStacks" android:description="@string/permdesc_manageActivityStacks" /> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 9025400..986a005 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -4191,7 +4191,7 @@ <!-- Message shown when the user enters an invalid SIM pin password in PUK screen --> <string name="kg_invalid_sim_pin_hint">Type a PIN that is 4 to 8 numbers.</string> <!-- Message shown when the user enters an invalid PUK code in the PUK screen --> - <string name="kg_invalid_sim_puk_hint">PUK code should be 8 numbers or more.</string> + <string name="kg_invalid_sim_puk_hint">PUK code should be 8 numbers.</string> <!-- Message shown when the user enters an invalid PUK code --> <string name="kg_invalid_puk">Re-enter the correct PUK code. Repeated attempts will permanently disable the SIM.</string> <!-- String shown in PUK screen when PIN codes don't match --> |
