Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e90a8b06 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am 01a58129: am 0250bc2f: Merge "Catch exception when ViewRoot\'s surface is...

am 01a58129: am 0250bc2f: Merge "Catch exception when ViewRoot\'s surface is not valid. Bug #3399426" into honeycomb

* commit '01a58129':
  Catch exception when ViewRoot's surface is not valid. Bug #3399426
parents fdc8757a 01a58129
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1542,6 +1542,7 @@ public final class ViewRoot extends Handler implements ViewParent,
                int top = dirty.top;
                int right = dirty.right;
                int bottom = dirty.bottom;

                canvas = surface.lockCanvas(dirty);

                if (left != dirty.left || top != dirty.top || right != dirty.right ||
+3 −1
Original line number Diff line number Diff line
@@ -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;