From 8261a3f5ed1dbd5aa63b7819f2ef7a8e4a6ee9a1 Mon Sep 17 00:00:00 2001 From: George Mount Date: Tue, 5 May 2015 16:44:15 -0700 Subject: Fix crash during Activity Transition with TextureView. Bug 20675857 GhostView was synchronously forcing the View's parent to get the display list when it was created. TextureView's cannot create a display list until a surface is available and will crash if it is attempted. This change moves the request to an invalidate to get it to execute at a later time. Change-Id: I12afebdfd57eb29c1a35b23a63d045e319547faf --- core/java/android/view/GhostView.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core') diff --git a/core/java/android/view/GhostView.java b/core/java/android/view/GhostView.java index bc38e1a..9f46f45 100644 --- a/core/java/android/view/GhostView.java +++ b/core/java/android/view/GhostView.java @@ -40,8 +40,7 @@ public class GhostView extends View { mView.mGhostView = this; final ViewGroup parent = (ViewGroup) mView.getParent(); setGhostedVisibility(View.INVISIBLE); - parent.mRecreateDisplayList = true; - parent.updateDisplayListIfDirty(); + parent.invalidate(); } @Override -- cgit v1.1