Fix threading problems with drawables
We can't use the same instance on both the main and the background thread, as this will lead to problems. Change-Id: Ieec525f028df2d0596667126d8f5004773461517 Fixes: 28745682
This commit is contained in:
@@ -109,9 +109,15 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
|
||||
Drawable captionBackgroundDrawableDrawable, Drawable userCaptionBackgroundDrawable,
|
||||
int statusBarColor, int navigationBarColor) {
|
||||
mDecorView = decorView;
|
||||
mResizingBackgroundDrawable = resizingBackgroundDrawable;
|
||||
mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable;
|
||||
mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable;
|
||||
mResizingBackgroundDrawable = resizingBackgroundDrawable != null
|
||||
? resizingBackgroundDrawable.getConstantState().newDrawable()
|
||||
: null;
|
||||
mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable != null
|
||||
? captionBackgroundDrawableDrawable.getConstantState().newDrawable()
|
||||
: null;
|
||||
mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable != null
|
||||
? userCaptionBackgroundDrawable.getConstantState().newDrawable()
|
||||
: null;
|
||||
if (mCaptionBackgroundDrawable == null) {
|
||||
mCaptionBackgroundDrawable = mResizingBackgroundDrawable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user