From 92d0602a7ce9b87a2c712215d97fb8f6df2fd2c2 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Thu, 29 Sep 2016 16:25:17 +0200 Subject: Fix crash if drawable doesn't have constant state Change-Id: I2364efb9dc1446bc1a8c50abf6bd34a73c226f7e Fixes: 31755893 --- core/java/com/android/internal/policy/BackdropFrameRenderer.java | 3 +++ 1 file changed, 3 insertions(+) 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) { -- cgit v1.2.3-59-g8ed1b