Ensure view is attached to window before removing it
I'm not able to reproduce the bug, but we can avoid calling removeView if the view isn't attached. Bug: 180114844 Test: Manual verification of existing behavior Change-Id: I1173f7d3656aaa10815f07717c09d3a3869d9878
This commit is contained in:
@@ -170,7 +170,9 @@ public class AssistManager {
|
||||
boolean visible = false;
|
||||
if (mView != null) {
|
||||
visible = mView.isShowing();
|
||||
mWindowManager.removeView(mView);
|
||||
if (mView.isAttachedToWindow()) {
|
||||
mWindowManager.removeView(mView);
|
||||
}
|
||||
}
|
||||
|
||||
mView = (AssistOrbContainer) LayoutInflater.from(mContext).inflate(
|
||||
|
||||
Reference in New Issue
Block a user