Skip to content

Commit 6b5caee

Browse files
Romain GuyAndroid (Google) Code Review
authored andcommitted
Merge "Prevent crash in WebView when disabling the hw renderer Bug #6596807" into jb-dev
2 parents f372e33 + 527ee91 commit 6b5caee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/java/android/view/ViewRootImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,14 +671,15 @@ void destroyHardwareLayers() {
671671
}
672672

673673
public boolean attachFunctor(int functor) {
674+
//noinspection SimplifiableIfStatement
674675
if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) {
675676
return mAttachInfo.mHardwareRenderer.attachFunctor(mAttachInfo, functor);
676677
}
677678
return false;
678679
}
679680

680681
public void detachFunctor(int functor) {
681-
if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) {
682+
if (mAttachInfo.mHardwareRenderer != null) {
682683
mAttachInfo.mHardwareRenderer.detachFunctor(functor);
683684
}
684685
}

0 commit comments

Comments
 (0)