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

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

am 43a760ba: Merge "Don\'t crash on Surface.unlockAndPost() but log & try...

am 43a760ba: Merge "Don\'t crash on Surface.unlockAndPost() but log & try again Bug #6482593" into jb-dev

* commit '43a760ba':
  Don't crash on Surface.unlockAndPost() but log & try again Bug #6482593
parents c5fe4737 43a760ba
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -2257,7 +2257,7 @@ public final class ViewRootImpl implements ViewParent,
            mLayoutRequested = true;    // ask wm for a new surface next time.
            return false;
        } catch (IllegalArgumentException e) {
            Log.e(TAG, "IllegalArgumentException locking surface", e);
            Log.e(TAG, "Could not lock surface", e);
            // Don't assume this is due to out of memory, it could be
            // something else, and if it is something else then we could
            // kill stuff (or ourself) for no reason.
@@ -2343,7 +2343,14 @@ public final class ViewRootImpl implements ViewParent,
                unlockCanvasAndPostStartTime = System.nanoTime();
            }

            try {
                surface.unlockCanvasAndPost(canvas);
            } catch (IllegalArgumentException e) {
                Log.e(TAG, "Could not unlock surface", e);
                mLayoutRequested = true;    // ask wm for a new surface next time.
                //noinspection ReturnInsideFinallyBlock
                return false;
            }

            if (ViewDebug.DEBUG_LATENCY) {
                long now = System.nanoTime();