diff options
| author | 2016-09-29 16:25:17 +0200 | |
|---|---|---|
| committer | 2016-09-29 14:37:14 +0000 | |
| commit | 92d0602a7ce9b87a2c712215d97fb8f6df2fd2c2 (patch) | |
| tree | 4a32cf6b6fcd8524d1fcfc78c5808672711e10a5 | |
| parent | e2782906b54d189c37ca0c0c6666ab821a2b430a (diff) | |
Fix crash if drawable doesn't have constant state
Change-Id: I2364efb9dc1446bc1a8c50abf6bd34a73c226f7e
Fixes: 31755893
| -rw-r--r-- | core/java/com/android/internal/policy/BackdropFrameRenderer.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/com/android/internal/policy/BackdropFrameRenderer.java b/core/java/com/android/internal/policy/BackdropFrameRenderer.java index 619303f34c32..1abb59b006dd 100644 --- a/core/java/com/android/internal/policy/BackdropFrameRenderer.java +++ b/core/java/com/android/internal/policy/BackdropFrameRenderer.java @@ -110,12 +110,15 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame int statusBarColor, int navigationBarColor) { mDecorView = decorView; mResizingBackgroundDrawable = resizingBackgroundDrawable != null + && resizingBackgroundDrawable.getConstantState() != null ? resizingBackgroundDrawable.getConstantState().newDrawable() : null; mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable != null + && captionBackgroundDrawableDrawable.getConstantState() != null ? captionBackgroundDrawableDrawable.getConstantState().newDrawable() : null; mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable != null + && userCaptionBackgroundDrawable.getConstantState() != null ? userCaptionBackgroundDrawable.getConstantState().newDrawable() : null; if (mCaptionBackgroundDrawable == null) { |