summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-01-27 15:45:38 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-27 15:45:38 -0800
commite90a8b06b771881e08d04436d664417a865867f1 (patch)
tree25d23fe34527a2f4fc36112f372ec47ea1515854 /core/jni
parentfdc8757ac42234a42dd0a0037ca396074cb91012 (diff)
parent01a5812902668d0dbba51cd0efe22bfba3711230 (diff)
downloadframeworks_base-e90a8b06b771881e08d04436d664417a865867f1.zip
frameworks_base-e90a8b06b771881e08d04436d664417a865867f1.tar.gz
frameworks_base-e90a8b06b771881e08d04436d664417a865867f1.tar.bz2
am 01a58129: am 0250bc2f: Merge "Catch exception when ViewRoot\'s surface is not valid. Bug #3399426" into honeycomb
* commit '01a5812902668d0dbba51cd0efe22bfba3711230': Catch exception when ViewRoot's surface is not valid. Bug #3399426
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_view_Surface.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index e4af33f..aa9c107 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -296,8 +296,10 @@ static inline SkBitmap::Config convertPixelFormat(PixelFormat format)
static jobject Surface_lockCanvas(JNIEnv* env, jobject clazz, jobject dirtyRect)
{
const sp<Surface>& surface(getSurface(env, clazz));
- if (!Surface::isValid(surface))
+ if (!Surface::isValid(surface)) {
+ doThrow(env, "java/lang/IllegalArgumentException", NULL);
return 0;
+ }
// get dirty region
Region dirtyRegion;